Skip to main content

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.
  • Presents scans with a colorful terminal dashboard and animated progress.

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

# Disable styling for basic terminals
devtidy scan . --no-color

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

Metadata

Release files for devtidy 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devtidy 0.2.0
File Size Uploaded
devtidy-0.2.0.tar.gz 16.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for devtidy 0.2.0
File Interpreter ABI Platform
devtidy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / devtidy-0.2.0.tar.gz

Download URL devtidy-0.2.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6c28beb6c55290aa257356a67a83981639578b437e075852f884712d9bf20af0
BLAKE2b-256 checksum
How to use checksums
9cf7da172dc3342a05f37093e8bc7dfe229cbb699f6c137a9f6cce6c9b0fa3c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Release files / devtidy-0.2.0-py3-none-any.whl

Download URL devtidy-0.2.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f488758b203e25661f117b666fd29f2d270dfce6588583054e4b8a4a58e7b286
BLAKE2b-256 checksum
How to use checksums
9195bc05e9abf4065315522e55e661419a1b8515f36a19c2297e1868db0f2147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page