Documentation
Introduction
RepoSweep is a Rust-native cleanup tool for developer repositories. It scans a chosen path for dependency folders, build outputs, and disposable caches, then lets you review and remove them through a scriptable CLI or an interactive terminal UI.
Created by Youssef Dhibi. Inspired by the Python project shatter, this is a separate Rust implementation offering a modular core crate and a powerful terminal UI.
Features
- Rust workspace split into
reposweep-core,reposweep-cli, andreposweep-tui - Interactive terminal UI for browsing scan results before deleting
- Non-interactive CLI commands for scanning and cleaning
- Scope filters for
cache,dependencies, orall - Accurate size calculation or faster scan mode with
--fast - Safe cleanup to trash by default, with optional permanent deletion
.reposweepignoresupport to skip protected subtrees entirely- Config bootstrap with
reposweep config init
Installation
You can easily install RepoSweep through curl on Linux/macOS or powershell on Windows.
Linux / macOS
curl -sSL https://raw.githubusercontent.com/youssefsz/reposweep/main/install.sh | bash
Windows PowerShell
powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/youssefsz/reposweep/main/install.ps1 | iex"
Cargo (Build from source)
cargo install --path crates/reposweep-cli
Upgrading & Uninstalling
Upgrade an installed binary in place or uninstall it from the current machine:
reposweep upgrade
Usage
Launch the interactive terminal UI:
reposweep
Launch the interactive terminal UI with an explicit path:
reposweep tui ~/projects
Scan a path from the non-interactive CLI:
reposweep scan ~/projects/my-app
Scan a path and emit JSON for scripting:
reposweep scan ~/projects/my-app --json
Scan only dependency directories older than 30 days:
reposweep scan ~/projects --scope dependencies --older-than 30d
Clean caches non-interactively by moving them to trash:
reposweep clean ~/projects/my-app --scope cache --strategy trash --yes
What It Cleans
Built-in rules currently cover common targets such as:
- JavaScript:
node_modules,.pnpm-store,.yarn,.next,.turbo,.parcel-cache,dist - Python:
__pycache__,.pytest_cache,.mypy_cache,.ruff_cache,.venv,venv,.tox - Rust:
target - Java:
.gradle - Dart/Flutter:
.dart_tool,.pub-cache - .NET:
bin,obj - Generic:
build,.cache,.idea
Protection & Config
Drop a .reposweepignore file into any directory you never want scanned. When present, that directory and its children are skipped.
The default config can be generated with:
reposweep config init
Architecture
crates/reposweep-core: scanning, rules, config, deletion servicescrates/reposweep-cli: command-line entrypoint and scripting workflowcrates/reposweep-tui: interactive terminal interface built on Ratatui