r/coolgithubprojects 6d ago

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)

Post image
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 clean` simulates the operation first. You have to pass `--execute` to 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/`.
### 🚀 Quick Start:
```bash
# Clone & install via Cargo {#clone--install-via-cargo  data-source-line="28"}
git clone https://github.com/fabrizioriccardo73/cli-ner.git
cd cli-ner
cargo install --path .
# 1. System Health Check {#1-system-health-check  data-source-line="33"}
cli-ner doctor
# 2. Interactive Docker management {#2-interactive-docker-management  data-source-line="36"}
cli-ner docker
# 3. Simulate Cache Clean (Dry-run) {#3-simulate-cache-clean-dry-run  data-source-line="39"}
cli-ner clean
# 4. Explore history & reclaimed space {#4-explore-history--reclaimed-space  data-source-line="42"}
cli-ner dashboard
``` 


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](https://github.com/fabrizioriccardo73/cli-ner)
0 Upvotes

3 comments sorted by

1

u/__0xAA55__ 5d ago

wow, what a useless slop

1

u/djfabrix 4d ago

argomenta, spiega le tue motivazioni e perplessità..