mole-mac-cleanup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMole - Mac Cleanup & Optimization Tool
Mole - Mac 清理与优化工具
Note for humans:without params opens an interactive TUI mode. Not useful for agents, but you might wanna try it manually! 😉mo
温馨提示: 不带参数运行会打开交互式TUI模式。对Agent来说没什么用,但你可以手动试试哦!😉mo
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, etc.build
集CleanMyMac、AppCleaner、DaisyDisk和iStat Menus功能于一体的全能工具包:
- 深度清理 —— 移除缓存、日志、浏览器残留文件
- 智能卸载 —— 卸载应用及其隐藏的残留文件
- 磁盘分析 —— 可视化磁盘使用情况,管理大文件
- 实时监控 —— 实时查看系统状态
- 项目构建产物清理 —— 清理、
node_modules、target等目录build
Non-Interactive Commands (Clawd-friendly)
非交互式命令(适合自动化操作)
Preview / Dry Run (ALWAYS USE FIRST)
预览/模拟运行(务必先执行)
bash
mo clean --dry-run # Preview cleanup plan
mo clean --dry-run --debug # Detailed preview with risk levels & file info
mo optimize --dry-run # Preview optimization actions
mo optimize --dry-run --debug # Detailed optimization previewbash
mo clean --dry-run # 预览清理计划
mo clean --dry-run --debug # 带风险等级和文件信息的详细预览
mo optimize --dry-run # 预览优化操作
mo optimize --dry-run --debug # 详细的优化预览Execute Cleanup
执行清理
bash
mo clean # Run deep cleanup (caches, logs, browser data, trash)
mo clean --debug # Cleanup with detailed logsbash
mo clean # 执行深度清理(缓存、日志、浏览器数据、回收站)
mo clean --debug # 带详细日志的清理System Optimization
系统优化
bash
mo optimize # Rebuild caches, reset services, refresh Finder/Dock
mo optimize --debug # With detailed operation logsWhat does:
mo optimize- 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
bash
mo optimize # 重建缓存、重置服务、刷新Finder/Dock
mo optimize --debug # 带详细操作日志的优化mo optimize- 重建系统数据库并清理缓存
- 重置网络服务
- 刷新Finder和Dock
- 清理诊断和崩溃日志
- 移除交换文件并重启动态分页器
- 重建启动服务和Spotlight索引
Whitelist Management
白名单管理
bash
mo clean --whitelist # Manage protected cache paths
mo optimize --whitelist # Manage protected optimization rulesbash
mo clean --whitelist # 管理受保护的缓存路径
mo optimize --whitelist # 管理受保护的优化规则Project Artifact Purge
项目构建产物清理
bash
mo purge # Clean old build artifacts (node_modules, target, venv, etc.)
mo purge --paths # Configure which directories to scanConfig file:
~/.config/mole/purge_pathsbash
mo purge # 清理旧构建产物(node_modules、target、venv等)
mo purge --paths # 配置要扫描的目录配置文件路径:
~/.config/mole/purge_pathsInstaller Cleanup
安装包清理
bash
mo installer # Find/remove .dmg, .pkg, .zip installersScans: Downloads, Desktop, Homebrew caches, iCloud, Mail attachments
bash
mo installer # 查找并移除.dmg、.pkg、.zip安装包扫描路径:下载文件夹、桌面、Homebrew缓存、iCloud、邮件附件
Setup & Maintenance
设置与维护
bash
mo touchid # Configure Touch ID for sudo
mo completion # Set up shell tab completion
mo update # Update Mole itself
mo remove # Uninstall Mole from system
mo --version # Show installed version
mo --help # Show helpbash
mo touchid # 配置Touch ID用于sudo验证
mo completion # 设置Shell自动补全
mo update # 更新Mole本身
mo remove # 从系统卸载Mole
mo --version # 显示已安装版本
mo --help # 显示帮助信息Typical Workflow
典型使用流程
-
Check what would be cleaned:bash
mo clean --dry-run --debug -
If looks good, run cleanup:bash
mo clean -
Optimize system (after cleanup):bash
mo optimize --dry-run mo optimize -
Clean dev project artifacts:bash
mo purge
-
查看将被清理的内容:bash
mo clean --dry-run --debug -
确认无误后执行清理:bash
mo clean -
清理完成后优化系统:bash
mo optimize --dry-run mo optimize -
清理开发项目产物:bash
mo purge
What Gets Cleaned (mo clean
)
mo cleanmo clean
的清理范围
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
- 用户应用缓存
- 浏览器缓存(Chrome、Safari、Firefox)
- 开发工具缓存(Xcode、Node.js、npm)
- 系统日志和临时文件
- 特定应用缓存(Spotify、Dropbox、Slack)
- 回收站
Notes
注意事项
- Terminal: Best with Ghostty, Alacritty, kitty, WezTerm. iTerm2 has issues.
- Safety: Use first. Built with strict protections.
--dry-run - Debug: Add for detailed logs.
--debug
- 终端兼容性: 推荐使用Ghostty、Alacritty、kitty、WezTerm。iTerm2存在兼容性问题。
- 安全性: 请先使用预览清理内容。工具内置严格的保护机制。
--dry-run - 调试: 添加参数可查看详细日志。
--debug