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
  ────────────────────────────────────────────────────────────────────────────────
  artist_desk_website             Next.js        13.1 GB       12.8 GB    97.7%
  artistdesk-mobile               Flutter         3.1 GB        3.0 GB    96.8%
  artist-desk-admin               Node.js         1.7 GB        1.6 GB    94.1%
  tldr-web                        Next.js       580.0 MB      556.8 MB    96.0%
  puppeteer-scraping              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 artist_desk_website 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.1.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.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sweep_cli-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4ba49a74533122800f765acf5f5d375a387165aea53b39b44456763539e5df9c
MD5 f0bc039755c9c73cf9913601a3418b3a
BLAKE2b-256 8aa5e42a2ed353417677223ebec066ca2606e8b457f480457210711f71d6b8cb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sweep_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 21a9342a87d4836125e6344ab44db037422f71abcf3b71dd7b22e8d9fa344e14
MD5 1d92c3e27f38fb13ac6772c872acf971
BLAKE2b-256 c9b228c55e93f3e108b93d25e1326c0ac5f8de361fb98c1b1efd830b7f89ce5e

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