
I Created CLI-NER: An Open-Source Tool Written in Rust to Safely Free Up Disk Space on macOS (TUI, Dry-Run, and Support for Docker, Xcode, and Dev)
Hey everyone! 👋
Like many developers on macOS, I often found myself low on disk space thanks to Xcode DerivedData, forgotten Docker build caches, dangling images, and bloated dev caches. Most cleanup tools are either sketchy closed-source subscription apps (like CleanMyMac) or risky one-liner bash scripts that rm -rf without a safety net.
So I created CLI-NER — an open-source, fast, and safety-first CLI & TUI tool built in Rust to analyze and clean disk space on macOS.
🛡️ Why it's built differently (Safety-First):
- Reversible by default: Files are moved to the macOS Trash (
~/.Trash), not permanently deleted. - Dry-run by default:
cli-ner cleansimulates the operation first. You have to pass--executeto actually touch files. - Strict Blocklist & Allowlist: Critical system dirs (
/System,/usr) and personal data (~/Documents,~/.ssh,~/Library/Mail) are strictly untouched. - Developer-Aware:
- Docker: Interactive wizard, protects running containers, locked in-use images, and persistent volumes.
- Xcode: Safe checks for DerivedData/Archives (verifies Xcode isn't running).
- Node/Python/Brew: Cleans npm cache, pip cache, Homebrew orphans.
- Interactive TUI Dashboard: Built with
ratatui(cli-ner dashboard) to inspect operations history, charts, and audit logs. - Immutable JSONL Audit Trail: Everything is logged under
~/.cli-ner/logs/.
The project is 100% free and open source (MIT licensed). I would love to get your feedback, feature requests, or contributions! 🔗 GitHub Repo: https://github.com/fabrizioriccardo73/cli-ner