Back to home
Contributing
Welcome
macOS Cleanup is open-source (MIT) and contributions are welcome. You can fix bugs, extend the YAML rulesets, improve safety guards, or polish the documentation.
Development Setup
Clone the repository:
bash
git clone https://github.com/KasprowiczM/macOS_cleanup.git
cd macOS_cleanupRun a read-only analysis in plain command-line mode to verify that the script executes correctly:
bash
bash cleanup_all.sh --cli --dry-runTo validate Bash scripts, we use Shellcheck:
bash
shellcheck cleanup_all.sh lib/*.shExtending Rulesets
Cleanup rules live in cleanup_rules.yaml, and every category is a row of the category registry that the interface, the planner and the reports all read. To add a rule for an application or dev tool, add a definition matching this format:
YAML
- name: "App Name"
bundle_ids:
- "com.vendor.appname"
type: dev-tool # browser | mail | dev-tool | system | media-editor | ...
paths:
- path: "~/Library/Caches/com.vendor.appname"
type: cache
safety: ask # safe | ask | never
notes: "Clear description of the path and its risks"How to Contribute
- Fork the repo and create a feature branch from
main - Make your changes — follow established patterns and add clear comments
- Ensure compatibility — scripts must be compatible with Bash 3.2+ (the macOS default)
- Test your changes via local dry-runs and check the output in the run folder under ~/.local/state/macos-cleanup/runs/
- Submit a Pull Request with a detailed description of what you did
Project Structure
macOS_cleanup/
bin/
cleanup_all.sh
cleanup_rules.yaml
i18n/
lib/
schemas/
share/
docs/
tests/The layout of the development checkout (not of an installed copy).
Code Style
- Bash: shellcheck, Bash 3.2 compatibility
- YAML rules: cleanup_rules.yaml must be valid YAML
- Commit messages: use clear and concise descriptions (e.g., fix, feat, docs)