| name | mole-mac-cleanup |
| description | Use when the user asks to clean, optimize, uninstall, inspect disk usage, or purge project artifacts on macOS. |
| author | Benjamin Jesuiter <bjesuiter@gmail.com> |
| metadata | {"clawdbot":{"emoji":"🧹","os":["darwin"],"requires":{"bins":["mo"]},"install":[{"id":"brew","kind":"brew","formula":"mole","bins":["mo"],"label":"Install Mole via Homebrew"}]}} |
Mole - Mac Cleanup & Optimization Tool
Repo: https://github.com/tw93/Mole
Command: mo (not mole!)
Install: brew install mole
Note for humans: mo without params opens an interactive TUI mode. Not useful for agents, but you might wanna try it manually! 😉
What It Does
All-in-one toolkit combining CleanMyMac, AppCleaner, DaisyDisk, and iStat Menus:
- Deep cleaning — removes caches, logs, browser leftovers
- Smart uninstaller — removes apps + hidden remnants
- Disk insights — visualizes usage, manages large files
- Live monitoring — real-time system stats
- Project artifact purge — cleans
node_modules, target, build, etc.
Non-Interactive Commands (Clawd-friendly)
Preview / Dry Run (ALWAYS USE FIRST)
mo clean --dry-run
mo clean --dry-run --debug
mo optimize --dry-run
mo optimize --dry-run --debug
Execute Cleanup
mo clean
mo clean --debug
System Optimization
mo optimize
mo optimize --debug
What mo optimize does:
- Rebuild system databases and clear caches
- Reset network services
- Refresh Finder and Dock
- Clean diagnostic and crash logs
- Remove swap files and restart dynamic pager
- Rebuild launch services and Spotlight index
Whitelist Management
mo clean --whitelist
mo optimize --whitelist
Project Artifact Purge
mo purge
mo purge --paths
Config file: ~/.config/mole/purge_paths
Installer Cleanup
mo installer
Scans: Downloads, Desktop, Homebrew caches, iCloud, Mail attachments
Setup & Maintenance
mo touchid
mo completion
mo update
mo remove
mo --version
mo --help
Typical Workflow
-
Check what would be cleaned:
mo clean --dry-run --debug
-
If looks good, run cleanup:
mo clean
-
Optimize system (after cleanup):
mo optimize --dry-run
mo optimize
-
Clean dev project artifacts:
mo purge
What Gets Cleaned (mo clean)
- User app cache
- Browser cache (Chrome, Safari, Firefox)
- Developer tools (Xcode, Node.js, npm)
- System logs and temp files
- App-specific cache (Spotify, Dropbox, Slack)
- Trash
Notes
- Terminal: Best with Ghostty, Alacritty, kitty, WezTerm. iTerm2 has issues.
- Safety: Use
--dry-run first. Built with strict protections.
- Debug: Add
--debug for detailed logs.