Safely find and reclaim stale developer build artifacts and environments.
Project description
DevTidy
DevTidy is a conservative, cross-platform command-line tool for finding stale
developer artifacts such as node_modules, Python virtual environments, build
outputs, and tool caches.
It is an original implementation built around a simple rule: scanning should be easy, but removing data should require an explicit decision.
Highlights
- Dry-run scanning is the default.
- Recognizes project context before flagging risky directories.
- Refuses to operate on protected system and home-directory roots.
- Never follows directory symlinks.
- Supports age, size, category, and exclusion filters.
- Can archive files with a manifest and restore them later.
- Produces machine-readable JSON for scripts and CI.
- Stores cleanup history locally. No telemetry or network calls.
Install
pipx install devtidy
For local development:
python -m pip install -e .
Quick start
# Scan the current directory (never deletes)
devtidy
# Scan selected project folders
devtidy scan ~/Projects ~/work --older-than 30d --min-size 100MB
# Archive matches so they can be restored
devtidy clean ~/Projects --older-than 60d --archive --yes
# Permanently delete matches
devtidy clean ~/Projects --older-than 90d --delete --yes
# Restore the most recent archive session
devtidy restore --latest
# JSON output for automation
devtidy scan . --json
Commands
scan
Find candidates without changing the filesystem. This is also the default command when no command is supplied.
Useful options:
--older-than 30d: only include projects inactive for the given duration.--min-size 100MB: only include artifacts at least this large.--category node,python,cache,build: select rule categories.--exclude PATTERN: skip matching paths; may be repeated.--max-depth N: limit traversal depth.--json: return structured output.
clean
Uses the same filters as scan. Exactly one of --archive or --delete is
required. --yes is mandatory for non-interactive execution.
Archives live in ~/.devtidy/archives by default. Each session contains a JSON
manifest recording original paths, sizes, and timestamps.
restore
Restore an archive by session ID, or use --latest. DevTidy will not overwrite
an existing path unless --overwrite is supplied.
history and rules
history shows local cleanup sessions. rules explains every built-in match
and the project evidence required for it.
Built-in safety
DevTidy refuses filesystem roots, user home directories, and common operating system directories as scan roots. It also checks that every cleanup target is inside an approved root immediately before acting, which helps protect against path changes between scanning and cleanup.
Virtual environments must contain pyvenv.cfg. A node_modules directory must
belong to a project containing package.json. Build directories are only
matched inside recognized projects. Generic folders named env, build, or
dist are therefore not removed merely because their name looks familiar.
Name ideas considered
- DevTidy: clear, friendly, and broad enough for future cleanup rules.
- RepoRinse: memorable, but sounds limited to repositories.
- DevSweep: direct, though more generic.
- ByteBroom: playful, but too close to the inspiration's branding.
- ProjectPrune: descriptive, but may imply source-code deletion.
Project source and issue tracking are available at https://github.com/harish-ai-engineer/devtidy.
License
MIT
Project details
Release history Release notifications | RSS feed
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 devtidy-0.1.0.tar.gz.
File metadata
- Download URL: devtidy-0.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
316a4d1257b7516c5b86271c2563764a38706272cdc10acdb644825b3e1f12b4
|
|
| MD5 |
f25c162705c2c9f6e21df7df9243524f
|
|
| BLAKE2b-256 |
1be7ec2bae0a433160692da16196274893198c319ee6ffa46e91b7fb17a62346
|
File details
Details for the file devtidy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: devtidy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cdc24df1bc6729604a242c10b151f9c74431047257f383f1c4decae9992f04f
|
|
| MD5 |
e65b63bf831c80358ef2489b63cd6af5
|
|
| BLAKE2b-256 |
c63c930b2247ec6682f9db997ffeb9c55b75e45686cca1e29405c9a46bc3567e
|