# ๐งน 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.
```bash
brew install sweep # coming soon
# or
## Why Sweep?
| 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
```bash
sweep # Interactive menu
sweep scan ~ # Analyze disk (interactive explorer)
sweep clean # Clean system caches
sweep ai # Clean AI/ML caches (HuggingFace, Ollama)
sweep dev # Clean build artifacts (node_modules, target)
sweep docker # Clean Docker junk
sweep uninstall # Remove apps + remnants
sweep optimize # Flush DNS, rebuild caches
sweep installer # Remove .dmg/.pkg files
sweep status # Real-time system monitor
```
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_modules` older than 7 days
- Cargo `target/` directories
- Python `.venv` environments
- 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
```bash
# Requires Rust 1.70+
cargo build --release
./target/release/sweep
```
## Contributing
We welcome contributions! See [CONTRIBUTING.md](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.