CLI tools for cleaning artifacts and builds
Project description
Artifact-Scythe
Reclaim disk space by harvesting the build artifacts you forgot about.
scythe is a Python CLI that walks your projects directory, identifies each
project's ecosystem (Node, Python, Rust, Java, Go, Ruby, .NET) from its
marker files, and locates the bulky build artifacts that ecosystem leaves
behind — node_modules, .venv, __pycache__, target/, build/, and
the rest. It reports how much space each one is wasting and, when you tell
it to, deletes them.
It is safe by default: every clean previews what is about to happen and
asks for confirmation, and a --dry-run mode lets you check the plan
before running for real.
Why
A laptop used daily for a year typically holds 30–80 GB of stale
node_modules, abandoned virtualenvs, cached compiler output, and CI
scratch directories. None of it is load-bearing — but finding and removing
it by hand across dozens of project folders is tedious and error-prone.
scythe does it in two commands.
Quick start
pip install artifact-scythe
scythe scan ~/projects # see what's eating your disk
scythe clean ~/projects --dry-run # preview the deletions
scythe clean ~/projects # do it (with confirmation)
Install
From PyPI (recommended)
pipx install artifact-scythe # isolated install, preferred for CLIs
# or
pip install artifact-scythe
The PyPI distribution name is
artifact-scythe(thescytheslot on PyPI was taken), but the installed command and the Python module are bothscythe. Existing scripts written againstscythe ...keep working unchanged.
From source
git clone https://github.com/elielMengue/scythe.git
cd scythe
pip install -e ".[dev]"
Usage
scythe scan — discover projects and measure artifacts
scythe scan . # current directory
scythe scan ~/dev --depth 2 # bound recursion depth
scythe scan ~/dev --only node,python # filter by ecosystem
scythe scan ~/dev --older-than 30 # only artifacts older than 30 days
scythe scan ~/dev --format tree # table | tree | compact | json
scythe scan ~/dev --format json -o report.json # also csv via .csv suffix
scan is read-only. It produces a report; nothing is deleted.
scythe clean — delete detected artifacts
scythe clean ~/dev --dry-run # simulate (always do this first)
scythe clean ~/dev --interactive # pick projects manually
scythe clean ~/dev --only rust # only Rust target/ directories
scythe clean ~/dev --older-than 30 --dry-run # only target stale artifacts
scythe clean ~/dev --force # skip the confirmation prompt
scythe clean ~/dev -o run-report.json # export a JSON report
clean runs the same scan first, prints a summary, then either prompts
before deleting or executes immediately depending on flags. Deletion
is permanent — files are not moved to the trash.
scythe info
Prints the installed version and the list of supported ecosystems and patterns.
Supported ecosystems
| Ecosystem | Marker files | Artifact patterns |
|---|---|---|
| Node.js | package.json, yarn.lock, pnpm-lock.yaml |
node_modules, dist, build, .next, .nuxt, out, .cache, .parcel-cache, .turbo, coverage |
| Python | requirements.txt, setup.py, pyproject.toml, Pipfile, poetry.lock |
.venv, venv, env, __pycache__, .pytest_cache, .mypy_cache, .ruff_cache, .tox, *.egg-info, dist, build, .eggs, htmlcov |
| Rust | Cargo.toml, Cargo.lock |
target |
| Java (Maven) | pom.xml |
target, .m2/repository |
| Java (Gradle) | build.gradle, build.gradle.kts, settings.gradle |
build, .gradle, out |
| Go | go.mod, go.sum |
bin, pkg, vendor |
| Ruby | Gemfile, Gemfile.lock, .ruby-version |
vendor/bundle, .bundle, tmp |
| .NET | *.csproj, *.fsproj, *.vbproj, *.sln |
bin, obj, packages, .vs |
The --only flag accepts both canonical names (node, python,
java_maven, java_gradle, dotnet, ...) and short aliases (py,
js, rs, golang, .net, cs).
Safety
cleandeletes viashutil.rmtree/Path.unlink— files are gone, not in the trash bin. Run--dry-runfirst when in doubt.- Source-control dirs (
.git,.svn,.hg,.bzr), editor metadata (.idea,.vscode), and OS metadata (.DS_Store,Thumbs.db) are skipped during traversal. - Symlinks are not followed unless
--follow-symlinksis passed. - Use
--depth Non very large filesystems to avoid runaway scans.
Development
Python 3.10+ is required.
git clone https://github.com/elielMengue/scythe.git
cd scythe
pip install -e ".[dev]"
pytest -v # full test suite
pytest --cov=scythe # with coverage
pytest tests/test_scanner.py # a single file
CI runs the test suite on Linux, macOS, and Windows for Python 3.10,
3.11, and 3.12. See .github/workflows/ci.yml.
Contributing
Issues and pull requests are welcome.
To add support for a new ecosystem, extend two places:
PROJECT_MARKERSinscythe/scanner/scanner.py— how to recognise the project.ARTIFACT_PATTERNSinscythe/detector/detector.py— what to clean.
Then add a fixture and an assertion in tests/test_detector.py that
exercises the new pattern. Keeping these two maps in sync is the core
invariant of the codebase.
Roadmap
- Configuration & foundations
- Directory scanner
- Artifact detection
- Rich-based UI (table / tree / compact / JSON)
- Cleaning engine (
--dry-run,--interactive,--force, JSON report) - Advanced features — in progress (
--only,--older-thanshipped; planned:--min-size,--ignore, trash-mode) - Comprehensive tests & validation
- Broader distribution (Homebrew tap, Scoop)
See CHANGELOG.md for the release history.
License
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file artifact_scythe-0.5.2.tar.gz.
File metadata
- Download URL: artifact_scythe-0.5.2.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
479ea66ca2c8974d43eda1dea9039b6ebf7fc8faf3df6d5d5ffc4875a6f7c9af
|
|
| MD5 |
2f8332d3374af85b6246fff04f0e952e
|
|
| BLAKE2b-256 |
90b1504e281b5e2c625f41c02ae354e40b598ec9705ff253e4cb9c2c8ca02549
|
Provenance
The following attestation bundles were made for artifact_scythe-0.5.2.tar.gz:
Publisher:
release.yml on elielMengue/scythe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
artifact_scythe-0.5.2.tar.gz -
Subject digest:
479ea66ca2c8974d43eda1dea9039b6ebf7fc8faf3df6d5d5ffc4875a6f7c9af - Sigstore transparency entry: 1427767010
- Sigstore integration time:
-
Permalink:
elielMengue/scythe@21566e670d4b7fbb8e9d58d7364bbd720879bbe8 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/elielMengue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@21566e670d4b7fbb8e9d58d7364bbd720879bbe8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file artifact_scythe-0.5.2-py3-none-any.whl.
File metadata
- Download URL: artifact_scythe-0.5.2-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
965231cbc2e8988f02694256acb6a30774472b960dcea0ca89767fbc6bc10e90
|
|
| MD5 |
85409b63ab0b2c37693c420e6d9ba196
|
|
| BLAKE2b-256 |
eb269d62c26b0e6ae5f2efa10025943590298c4edd7b0026d5a6fc3c0322d823
|
Provenance
The following attestation bundles were made for artifact_scythe-0.5.2-py3-none-any.whl:
Publisher:
release.yml on elielMengue/scythe
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
artifact_scythe-0.5.2-py3-none-any.whl -
Subject digest:
965231cbc2e8988f02694256acb6a30774472b960dcea0ca89767fbc6bc10e90 - Sigstore transparency entry: 1427767104
- Sigstore integration time:
-
Permalink:
elielMengue/scythe@21566e670d4b7fbb8e9d58d7364bbd720879bbe8 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/elielMengue
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@21566e670d4b7fbb8e9d58d7364bbd720879bbe8 -
Trigger Event:
push
-
Statement type: