Skip to main content

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.
  • 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

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

devtidy-0.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

devtidy-0.2.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file devtidy-0.2.0.tar.gz.

File metadata

  • Download URL: devtidy-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for devtidy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6c28beb6c55290aa257356a67a83981639578b437e075852f884712d9bf20af0
MD5 00addf5290c41aa1bed2f67669ac1bd6
BLAKE2b-256 9cf7da172dc3342a05f37093e8bc7dfe229cbb699f6c137a9f6cce6c9b0fa3c5

See more details on using hashes here.

File details

Details for the file devtidy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: devtidy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for devtidy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f488758b203e25661f117b666fd29f2d270dfce6588583054e4b8a4a58e7b286
MD5 5fda578e8d213ef9752e8358d23afa75
BLAKE2b-256 9195bc05e9abf4065315522e55e661419a1b8515f36a19c2297e1868db0f2147

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