sweep-cli-0.3.0 is not a library.
๐งน Sweep
Fast system cleaner for macOS and Linux. 10x faster than shell-based tools.
Sweep combines CleanMyMac, AppCleaner, DaisyDisk, and iStat Menus into a single 4MB binary โ written in Rust, no dependencies, MIT licensed.
# or
|
Why Sweep?
| Sweep | Mole | CleanMyMac | |
|---|---|---|---|
| Price | Free | Free CLI / $$ app | $$$$ subscription |
| Platform | macOS + Linux | macOS only | macOS only |
| Speed | Parallel Rust (3-5s scan) | Shell scripts (30-60s) | Slow GUI |
| AI/ML aware | โ HuggingFace, Ollama, torch | โ | โ |
| Docker cleanup | โ | โ | โ |
| Dependencies | None (single binary) | Shell + Go + Homebrew | Full app bundle |
| License | MIT | GPL-3 | Proprietary |
| Undo/recovery | Moves to Trash (Finder) | Moves to Trash | Proprietary |
Quick Start
Add --dry-run to any command to preview without deleting.
Features
๐ Disk Analyzer (Interactive)
- Browse directories with arrow keys
- Progressive scanning (shows results as they arrive)
- Multi-select with Space, bulk delete
- Moves to Trash via Finder (recoverable)
- Size cache for instant 2nd load
๐ค AI/ML Cache Cleaning (Unique to Sweep)
Finds and cleans:
- HuggingFace models & datasets (~20-100 GB)
- Ollama downloaded models
- PyTorch/TensorFlow caches
- Conda/pip package caches
- LM Studio models
โก Developer Artifact Cleaning
node_modulesolder than 7 days- Cargo
target/directories - Python
.venvenvironments - Build/dist directories
- Selectable โ choose what to keep
๐ป Real-time System Monitor
- CPU per-core usage
- Memory + swap
- Disk space
- Battery health + cycles
- Top processes (with "hot" indicator)
- Auto-refreshes every second
๐ App Uninstaller
- Finds all installed apps with sizes
- Detects remnants (preferences, caches, launch agents)
- Shows leftover count per app
โ System Optimization
- Flush DNS cache
- Rebuild Launch Services
- Refresh Dock & Finder
- Remove .DS_Store files
- Clean browser caches
Architecture
src/
โโโ main.rs CLI entry (clap)
โโโ cache.rs Size cache (instant 2nd load)
โโโ history.rs Operation log (undo support)
โโโ scanner/
โ โโโ mod.rs Parallel filesystem scanner
โโโ cleaners/
โ โโโ system.rs System cache paths
โ โโโ browser.rs Chrome, Safari, Firefox, Brave, Arc, Edge
โ โโโ ai.rs HuggingFace, Ollama, torch, conda, pip
โ โโโ dev.rs node_modules, target, .venv, build
โ โโโ docker.rs Docker system prune
โ โโโ apps.rs App uninstaller + remnant finder
โ โโโ trash.rs Trash management
โ โโโ optimize.rs System optimization tasks
โโโ commands/
โโโ interactive.rs Arrow-key menu
โโโ scan.rs Interactive disk explorer
โโโ clean.rs System cache cleaner
โโโ ai.rs AI/ML cache cleaner
โโโ dev.rs Build artifact cleaner (selectable)
โโโ docker.rs Docker cleanup
โโโ uninstall.rs App uninstaller
โโโ optimize.rs System optimization
โโโ installer.rs .dmg/.pkg finder
โโโ status.rs Real-time system monitor
โโโ footer.rs Shared quit/continue prompt
Building
# Requires Rust 1.70+
Contributing
We welcome contributions! See CONTRIBUTING.md for details.
Easy ways to help:
- ๐ง Linux support โ add Linux-specific paths and optimizations
- ๐งน New cleaners โ Xcode, Android Studio, JetBrains, VS Code
- ๐จ UI improvements โ better TUI rendering, color themes
- ๐ฆ Packaging โ Homebrew formula, AUR package, Debian .deb
- ๐งช Tests โ unit tests for cleaners and scanner
- ๐ Docs โ better examples, screenshots, video demo
License
MIT โ use it however you want.