Skip to main content

Find and clean dev artifacts across all your projects. node_modules, .venv, target/, build/ — gone.

Project description

Sweep

Your projects are 90% junk. Sweep shows you exactly how much — and cleans it.

PyPI Downloads Python License Zero Dependencies


Your ~/projects folder is hoarding gigabytes of node_modules, .venv, target/, build/, and other build artifacts. Most of that space is regenerable junk you don't need.

Sweep scans your projects, shows you exactly how much of each project is junk vs actual code, and lets you reclaim it all with one keypress.

  SWEEP — 11 projects | 19.0 GB reclaimable (93% junk)

  PROJECT                        TYPE         FULL SIZE      ARTIFACTS   % JUNK
  ────────────────────────────────────────────────────────────────────────────────
  cloud-dashboard                 Next.js        13.1 GB       12.8 GB    97.7%
  pulse-mobile                    Flutter         3.1 GB        3.0 GB    96.8%
  nexus-admin                     Node.js         1.7 GB        1.6 GB    94.1%
  microkit-api                    Next.js       580.0 MB      556.8 MB    96.0%
  datastream-scraper              Node.js       315.0 MB      310.2 MB    98.5%
  ────────────────────────────────────────────────────────────────────────────────
  TOTAL                                          20.5 GB       19.0 GB    92.7%

  You can reclaim 19.0 GB out of 20.5 GB (93% is junk)

  [Space] select  [a] all  [Enter] delete  [q] quit

That cloud-dashboard project? 97.7% of its 13.1 GB is just node_modules and .next cache. Your actual code is only ~300 MB.

Install

pip install sweep-cli

Usage

# Scan current directory
sweep

# Scan a specific path
sweep ~/projects

# Dry run — just show what's there, no TUI
sweep ~/projects --dry-run

# JSON output for scripting
sweep ~/projects --json

# Only show projects with 100MB+ of artifacts
sweep --min-size 100MB

# Only show projects untouched for 6+ months
sweep --older-than 6m

# Control scan depth
sweep --depth 3

What It Shows You

For every project, Sweep breaks down:

Column What It Means
FULL SIZE Total size of the entire project folder
ARTIFACTS Size of deletable build artifacts (node_modules, .venv, target/, etc.)
% JUNK How much of your project is regenerable junk

Most projects are 80-98% junk — artifacts that get regenerated automatically when you run npm install, pip install, or cargo build.

Interactive TUI

Sweep launches an interactive terminal UI where you can:

Key Action
/ j k Navigate
Space Select/deselect project
a Select all / deselect all
s Sort by size
d Sort by date (oldest first)
n Sort by name
Enter Delete selected artifacts
q / Esc Quit

Color-coded safety:

  • Green — selected for deletion
  • Red — has uncommitted git changes (be careful!)

Supported Ecosystems

Ecosystem Detected By Cleans
Node.js package.json node_modules/
Next.js next.config.* .next/, node_modules/
Python pyproject.toml, setup.py, requirements.txt .venv/, venv/, __pycache__/, .tox/, .mypy_cache/
Rust Cargo.toml target/
Go go.mod vendor/
Java (Maven) pom.xml target/
Java (Gradle) build.gradle build/, .gradle/
.NET *.csproj, *.sln bin/, obj/
Flutter pubspec.yaml build/, .dart_tool/
Ruby Gemfile vendor/bundle/

Git-Aware Safety

Sweep checks each project's git status before deletion:

  • clean — no uncommitted changes, safe to delete
  • dirty — has uncommitted changes, highlighted in red as a warning
  • Projects without git are shown without status

Artifacts like node_modules and .venv are always safe to delete — they regenerate with a single command (npm install, pip install, etc.).

How It Works

  1. Walks your directory tree looking for project marker files (package.json, Cargo.toml, etc.)
  2. Detects the ecosystem and finds corresponding artifact directories
  3. Calculates full project size vs artifact size to show you the % junk
  4. Checks git status for safety
  5. Presents everything in a sortable, interactive TUI
  6. Deletes only the artifacts you select — your source code is never touched

Zero dependencies — pure Python stdlib (curses, os, shutil, argparse).

Support

If Sweep saves you disk space, consider buying me a coffee.

Buy Me A Coffee

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sweep_cli-0.1.2.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sweep_cli-0.1.2-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file sweep_cli-0.1.2.tar.gz.

File metadata

  • Download URL: sweep_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for sweep_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 571354d2c8a65c007fe5e06edddf6e28e0b99f290655f49b0d4bcf08a83b5abf
MD5 5e62f1db2201580043e412fc9360d8ea
BLAKE2b-256 12ad864940cd6883e9dc1ea0c69290d0d1830ec205ab629c595f7c98a574c629

See more details on using hashes here.

File details

Details for the file sweep_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sweep_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for sweep_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb28f3839cad118d2bc35990679fc2ada8788e298a3b2f74c6481b45ce8a5b0b
MD5 8a9ed604031d34699894c250ee83177a
BLAKE2b-256 77d3be8f4aaddc77540a04aa4586e44a771c8bc949ebf3d3c651f9030d15731f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page