sweep-cli 0.2.0

Fast system cleaner for macOS and Linux โ€” clean caches, uninstall apps, analyze disk, optimize system. Single binary.
sweep-cli-0.2.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.

brew install sweep   # coming soon
# or
curl -fsSL https://sweep.dev/install.sh | bash

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

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

# Requires Rust 1.70+
cargo build --release
./target/release/sweep

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.