/dev-prune:dev-prunefrom dev-prune
Reclaims disk space by pruning dependency and build directories across 36+ package managers. Covers the dev-prune (devp) CLI: safety rules, exit codes, dry-run, lockfile verification, and troubleshooting.
Ships in dev-prune. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
devp)dev-prune deletes dependency and build directories that a lockfile can rebuild, from
Git repositories that have been idle. It refuses to delete anything it cannot prove is
recoverable. The binary is dev-prune; devp is the same executable under a second
name, and either works everywhere.
The user should not have to learn this tool. Read their intent, pick the command, run it, and explain the result. Everything you need is below; the docs map at the end is for anything that isn't.
Skill version: 1.24.0. This file describes that release of devp and no other, and
it is rewritten from the binary rather than maintained by hand. Before you rely on
anything below, run devp --version. If it prints a different number, you are reading
another release's instructions — its flags, JSON statuses and exit codes may not be
the ones installed, and a command you quote from here may not exist. The fix is one
command: devp skill rewrites every copy of this file from the installed binary,
including the one in your own skills directory. Re-read it afterwards, and use the file,
not what you remember of it. devp doctor reports a stale copy and devp doctor --fix
replaces it.
devp run --dry-run and show what would be
reclaimed before running anything that deletes. The only exception is when the user
has already seen the plan or explicitly says "just do it".devp prints the exact command to fix it. Surface that command. Do not
delete the directory manually, do not delete the lockfile, do not pass a flag to skip
it — no flag can skip it.--ignore-idle only lifts the idle-day wait. It lets a repository the user is
actively working in be pruned. Ask first. It does not bypass lockfile verification.
The flag was --force before 1.0.0; that spelling still works and prints a note.
When a user reaches for it, they are usually stuck on something else entirely — the
eight reasons a directory is skipped are in the troubleshooting table at the bottom
of this file, and devp run --dry-run names the actual one per repository.--deep on uninstall wipes configuration. Confirm with the user before using it.devp config set update_check false;
DEV_PRUNE_OFFLINE=1 keeps the whole process off the network regardless of any
setting). Nothing is downloaded until someone says yes: devp update asks [y/N] at
a terminal when a newer release exists, and that or devp update --install fetches the release binary for
the platform, refuses it unless its SHA-256 matches the sidecar published beside it,
and writes it to every copy this installation runs. auto_update — on by default,
devp config set auto_update false to stop it — does that same verified download at
the end of a prune pass, and never runs a package manager unattended. version_lock,
off by default, outranks all of it: with devp config set version_lock true nothing
dev-prune does replaces the binary, including a re-run of the install one-liner, and
there is no flag that bypasses it. The alternative is the install
channel's own command — re-run the install.sh/install.ps1 one-liner,
npm install -g dev-prune@latest, bun add -g dev-prune@latest, pnpm add -g dev-prune@latest, yarn global upgrade dev-prune,
uv tool upgrade dev-prune, pipx upgrade dev-prune, pip install --upgrade dev-prune, winget upgrade --id VKrishna04.dev-prune, scoop update dev-prune,
brew upgrade dev-prune (via the Life-Experimentalist/tap tap — a copy installed
by formula URL instead has no tap to consult, so re-run that URL line),
cargo binstall dev-prune --force (prebuilt), or
cargo install dev-prune --force (compiles). devp update --channels prints that
whole table offline, for when the stale copy is on a machine you are not sitting at.rm -rf a bloat directory by hand. If devp deleted it and it is needed
again, the way back is devp restore, not the package manager's own install. If the
user wants it gone, the way is devp run . --dry-run and then devp run . -y
(--ignore-idle, after asking, if the repository is active): the pass verifies the
lockfile first and records itself, so devp restore --last-run can undo it. A
hand-typed rm -rf has neither the proof nor the undo. Harnesses with command hooks
can turn this rule and the volume rule below into a confirmation prompt instead of
trusting memory — a copy-paste hook lives in docs/IDE_INTEGRATION.md (see the docs
map at the end of this file).Useful when the user asks "is this safe?" — these are enforced in code, not conventions:
.git root.requirements.txt) lists no packages..devprune.json and
project.devprune.json hold inert data only, and deserialize into the same eight keys —
so a cloned repository cannot grant itself allow_manifest_rewrite or name a
post-prune command however it is configured.cache_auto_trim, the scheduled pass empties the Go build cache or the
ccache cache if it is over cache_limit_gib (20 GiB by default). It is off by default,
never touches any other cache, and a Git hook never clears one. Do not turn it on unless
the user asks. devp caches reports their sizes and prints the clear command, and
devp caches clear <manager> runs it — the report prints both that and the manager's
own command per row, because only the first is counted in devp stats — but only when
the user asks for it, and it asks
before it acts. Do not reach for clear to free space: a cache is shared by every
project on the machine, so no one lockfile can prove it is recoverable, and it is what
makes devp restore fast. Suggest it only when the user has said they want the disk
space more than the speed. The one exception worth offering unprompted is
--unused: a manager no registered repository uses has nothing behind it, so
emptying it costs no re-download for anything still on the disk.devp caches clear <engine> — docker, podman,
nerdctl, finch, Apple's container — does, when the user names it: it runs builder prune -a -f, image prune -a -f and container prune -f, prints them first, asks, and counts what came back on
devp stats. Suggest it when the user wants disk space and has containers; the cost is
a pull of the whole layer stack and a cold build cache next time.docker system prune --volumes. Not through
dev-prune, whose table contains no volume prune and no --volumes anywhere, and not
by you running one yourself on the user's behalf. An image can be pulled again; what is
inside a volume is the only copy, and --volumes is how a local database disappears.
If the user asks to reclaim volume space, point them at devp caches clear docker --include-volumes: after the narrow steps it lists the unused volumes by name and the
user types the numbers of the ones to delete, each pick one unforced volume rm. You
cannot run that for them: it refuses --yes, --json and a piped stdin, so the
typing of each number is the consent, and that is the design. What you can run is
devp caches clear docker --include-volumes --dry-run: it deletes nothing, lists the
unused volumes by name and size, and prints the exact command above for the user to
paste at their own terminal. That is the whole hand-off: prepare the list, relay it,
hand over the command, stop. The hand-off is also timed: the real command only works
within ten minutes of a completed dry run for that engine, and typed cold it runs the
dry run instead and says so, so tell the user to paste the line while the list is
fresh. Do not translate a pick into docker volume rm yourself:
a raw engine command is never measured, while a pick made through devp is counted on
devp stats, which is the reason the flag exists inside devp at all. The dry-run list
is drawn before the narrow steps run, so the real run can offer more volumes than
you saw, because containers deleted by the pass free the volumes they were holding. docker
and podman only; the other engines cannot narrow their listing to unused volumes, so
there the user runs <engine> volume ls and decides by name themselves.~/.m2/repository. Maven's local repository is an install target as well
as a download cache — mvn install:install-file puts artifacts there that exist in no
remote at all — so devp caches sizes it and prints rm -rf ~/.m2/repository and
stops. devp caches clear maven is a usage error that says why; clear all skips it.
If the user wants that space, hand them the command; do not run it for them.ワークスペース/项目目录名称测试/프론트엔드 scans, verifies, prunes and restores like any
other, on Windows, macOS and Linux. Terminal tables pad by display column, not by
character, so full-width names stay aligned. Program messages are English only.| The user wants | Run |
|---|---|
| "how much space can I get back?" | devp run --dry-run |
| "show me my repos" | devp status (interactive; prints a plain table when not a TTY). In the dashboard: s sorts, f filters, / searches — display only, the totals always cover every registered repository. Tab hides or shows the inspector pane (per-directory sizes, a 26-week commit sparkline, the largest entries inside the bloat) |
| "just the worst offenders" / "top 10 biggest" | devp status --top 10 — trims the list, never the totals |
| "how much has graphify/understand-anything left behind?" | devp status (the Tools line/block), or repositories[].tools in --json. Report-only: never suggest deleting graphify-out/ or .understand-anything/, there is no lockfile behind either |
| "how much has this saved me?" / "what did it clean last week?" | devp stats — lifetime total from pruning, a separate one from devp caches clear <manager>, a third from devp caches clear <engine>, prune passes, the last pass, and the repositories that gave back the most. The three are never added: they cost a reinstall, a re-download everywhere, and a full image pull respectively |
| "which package manager is costing me the most?" / "is the scheduler actually running?" | devp stats again — its last two sections break the same reclaims down by package manager and by what started each pass (manual, scheduled, dashboard). A scheduled line at zero passes means nothing has run unattended; check devp status daemon |
| "which pass deleted what?" / "what did the scheduled run take last night?" / "why is my node_modules gone?" | devp history — one line per pass: when, what started it (manual, scheduled, dashboard), how much, how many directories and repositories. devp history --pass 1 opens one in full: the exact command line that ran it and every directory removed, grouped by repository. This is the command that answers "was that me or the daemon?" — and the only one that can, because nothing else records the trigger |
| "give me the whole history to look at" / "export what it has been doing" | devp history --export writes the JSON document to the user's documents folder, --export <path> to exactly where they say. Prefer devp history --json when you are the reader; prefer --export when the user wants a file. The per-pass detail list is capped at 200 entries on a terminal and never when redirected, so devp history --all > passes.txt is complete |
| "what are my biggest cleanups?" / "show me the high scores" / "leaderboard" | devp scores (same report as devp history --scores; --json for a document): the all-time three largest single-repository cleanups and three largest whole passes, medals on the top three of each, read from the same pass log as devp history |
| "add tab completion" | devp completions <bash|zsh|fish|powershell|elvish> — prints the script to stdout; the user redirects it |
| "clean up" / "free space" | devp run --dry-run, then devp run -y |
| "clean this project" | devp run . -y |
| "clean it even though I'm working on it" | devp run . --ignore-idle -y — ask first |
| "clean everything but the API project" | devp run --except api -y — never verified, never deleted, never reinstalled |
| "put the dependencies back" | devp restore . |
| "undo that prune" / "I need it all back" | devp restore --last-run — reinstalls exactly what the last pass deleted, in every repository it touched, rebuilding each virtual environment on the Python version it was originally built with |
a build fails because node_modules (or .venv, vendor, any pruned directory) is missing | devp restore <path>: anything devp removed goes back through devp, not through npm ci, pip install or the manager run by hand. Restore reuses the same detection, so a monorepo gets every project's install in one command, virtual environments come back on the Python they were built with, and the timed reinstall feeds the restore_estimate other commands report. When in doubt whether devp took it at all, devp history names the pass; devp restore --last-run covers everything the last pass deleted |
| "my uv cache is over 10 GB" / "tell me when a cache gets too big" | devp config set cache_max_gb default=10 — a ceiling in GiB for every manager at once, or default=10,npm=4 to give one its own figure (keyed by the names devp caches clear takes, not adapter names). A manager past its cap is marked in devp caches; the cap itself never deletes anything. Off by default; the first run suggests default=10. - clears the map |
| "my Go build cache keeps filling the drive" / "keep the harmless caches small by themselves" | devp config set cache_auto_trim true: after each scheduled pass (and a confirmed devp run), the Go build cache or the ccache cache is emptied with its own command if it is over cache_limit_gib (devp config set cache_limit_gib 10; whole GiB, default 20, per cache). Only those two: both just recompute. Off by default. devp run --dry-run lists what it would empty. devp caches marks any cache over the limit even with trim off |
| "clear the caches that got too big" | devp caches clear --over-cap all — empties only the managers past their cache_max_gb, leaves the rest alone. Still asks first, still costs the same re-download. With no caps set it clears nothing and says so |
| "which caches do I still need" / "clear the ones nothing uses" | devp caches says how many registered repositories use each manager and what its cache works out to per repository. A manager no registered repository uses is the one case a count is enough to act on: devp caches clear --unused all empties exactly those, and costs nothing to re-download for anything still on the disk. Shown only for the nineteen managers that are also adapter names — pip, conda, nuget, conan, hex, playwright, puppeteer, huggingface, cypress, electron, ccache and sccache have no adapter of the same name, so dev-prune says nothing rather than guessing. Refuses when no registered repository is on disk, because every cache would look unused |
| "my pnpm store looks tiny" / "my projects live on another drive" | devp caches looks for a pnpm store at the root of every filesystem that holds a registered repository, not just the one beside the home directory. pnpm hardlinks into node_modules and a hardlink cannot cross a filesystem, so projects off the system disk get a store of their own — V:\.pnpm-store, /mnt/data/.pnpm-store, /Volumes/Work/.pnpm-store. Not a Windows thing. Each is its own row and its clear command names it: pnpm store prune --store-dir <path> |
| "which drive is my cache on?" / "my V: drive is full" / "only show me what is on C:" | devp caches ends with a By drive line splitting the total per volume, largest first, and every row in --json carries a volume key. devp caches --volume V: (alias --drive; also /mnt/data, /Volumes/Work, or any path on the drive you mean, including .) narrows the whole report to one drive. On a machine whose projects live on a second disk, the machine-wide total is not the figure that decides anything — the gigabytes on the drive that is full are. The narrowing happens last, after every verdict, so a cache_max_gb cap and an unused-cache count still describe the whole machine. Container engines are left out of a filtered report: an engine reports its disk from inside a VM image with no path on this filesystem, so it belongs to no drive. --volume with clear, docker or containers is a usage error, not a silently ignored flag — the clear commands empty a manager wherever it is |
| "how much is Docker using?" / "what is taking my disk, I have containers" | devp caches docker (or caches podman, or caches containers for every engine plus local Kubernetes clusters) — images, containers, volumes and build cache, each sized, with how much the engine says is reclaimable. This report deletes nothing; devp caches clear docker is what deletes, when the user names the engine. Figures come from the engine's own system df, not a directory walk — on Docker Desktop and Podman the store is inside a VM disk the host cannot see. An engine that is installed with its daemon stopped is reported as that, with no figures: a blank, not a zero. devp caches shows a one-line summary per engine, outside its own total |
| "clear my docker build cache" / "reclaim the container space" | devp caches clear docker (or podman, nerdctl, finch, container) — runs the narrow prune commands, after printing them and asking, and counts the result on devp stats. --dry-run shows the commands and the estimate. Touches no volume on its own: the estimate says how much unused-volume space is being left alone, and --include-volumes (docker and podman) adds a pick list: unused volumes by name, the user types the numbers, one unforced volume rm each. That flag refuses --yes, --json and a piped stdin, so only a person at a terminal can use it; never volume prune, never --volumes. Not reachable from clear all, from any scheduler, or from a Git hook — naming the engine is the consent |
| "empty my npm cache" / "clear all the caches" | devp caches clear npm (or all) — ask first, and say what it costs: every project on the machine re-downloads on its next install, and devp restore stops being fast. --dry-run shows what would go. Never run this unprompted. maven is refused: print rm -rf ~/.m2/repository and let the user decide |
| "clear just these two caches" / "clear everything except npm" | The target takes a comma list: devp caches clear npm,uv empties exactly those — a one-time whitelist. The mirror is devp caches clear all --except npm,uv — everything but the names given, a one-time blacklist. --except only pairs with all (a named list already says what to clear), all inside a list is exit 2, and an engine or maven anywhere in a list is exit 2 — an engine's consent is naming it alone, and maven is never cleared, list or no list |
| "what is dev-prune allowed to do on my machine?" / "is this safe?" | devp trust — the guarantees the code enforces, then this machine read live: scheduler, hooks, and the three settings that widen anything (require_confirmation=false, allow_manifest_rewrite, opt-in adapters — enable_cargo, enable_gradle, enable_maven, enable_swift, enable_dart, enable_mix_build, enable_vcpkg, enable_cmake_build, enable_dotnet_build, enable_godot, enable_unity, enable_unreal, enable_defold, enable_cocos, enable_zig, enable_stack, enable_cabal, enable_sbt), then every copy of dev-prune/devp/devpw on the machine — everything on PATH plus each channel's install directory even when it has dropped off PATH — with the version it was built as, the manager that installed it, its SHA-256 and a VirusTotal lookup URL for that digest, the running one first. The version is read out of the file rather than by running it, so it is absent for anything built before 1.17.0, and the highest copy is marked latest release only when a release check has confirmed that; otherwise newest here, which is a claim about this disk and not about the project. Read-only; the digests are computed locally and the URLs are printed, never fetched, nothing is uploaded and nothing found is executed. Several copies is normal, not a finding: report the differing digests as "these update separately" and point at devp uninstall for the one they do not want |
| "git says dubious ownership" / "devp run says it cannot examine my repos" | devp trust --fix-ownership — adds every registered repository Git refuses to read to the global safe.directory list, after showing the list and asking; --yes for a script. Repositories Git will not read have no known age and are never pruned, which is why devp run reports them |
| "did I install anything my lockfiles don't know about?" | devp status --drift — every environment holding packages its lockfile never recorded, with the one command that records them. A pure read; this is what a prune would refuse on |
| "why isn't it cleaning this?" | devp doctor . — ends by naming the one reason a pass would or would not touch it. Across every repository at once: devp run --explain — read-only, every verdict listed including the quiet ones (still active with the actual age, opted out, under the size floor). Conflicts with --json; the --json --dry-run document already carries every status |
| "is anything wrong with my install?" | devp doctor |
| "fix whatever's broken" | devp doctor --fix — repairs installed-but-broken integrations (stale twin, stale devpw scheduler binary, dead-target hooks/scheduler, drifted chain, missing SKILL.md, dead registry entries); never a first-time install |
| "track my projects folder" | devp init ~/Code |
| "find my repos for me" / "set it up, I don't have a list of where my code is" | devp init --auto — works the roots out instead of being told them, and PATHS is ignored. Three sources: the parent directory of every repository already registered (the one that reaches a second drive), the workspace you are standing in, and the conventional code directories under the home directory (Code, Projects, Developer, dev, src, repos, git, work, workspace, Documents/GitHub, source/repos, go/src and the like). A root inside another root is dropped so a tree is walked once, and the home directory itself is never a root — scanning it would walk every cache on the machine. Each root is walked to the same 8 levels an ordinary devp init uses, and --dry-run works. Registering is not pruning — a new row still waits for idle_days and still needs a lockfile to prove every candidate directory rebuildable — so the worst a wrong guess costs is an extra row in devp status |
| "track this repo" | devp link . |
| "stop tracking this" | devp unlink . |
| "the registry is full of folders I deleted" | devp unlink --missing — clears every entry whose directory is gone |
| "I moved a repo and it lost its history" | Usually nothing to do: the next devp status, devp run or devp doctor heals it. An entry whose directory is gone follows the repository into a sibling Archive/-style directory, or anywhere its root commit proves it is the same repository, keeping its stats; a deleted AI-agent worktree entry is dropped; a bare name match alone never merges. If it was moved somewhere heal cannot prove: devp link <new path> — matching root commits let it adopt the old entry |
| "undo that" | devp undo (reverts the last init or link) |
| "never touch this repo" | create ignore.devprune.json in its root, or press i in devp status and confirm with y. A bulk scan will not even register it |
| "what's my config?" | devp config show |
| "change a setting" | devp config set idle_days 30 |
| "is the background stuff working?" | devp setup --status |
| "set it all up" | devp setup |
| "turn the automation off" | devp config set auto_setup false |
| "how many copies of devp do I have?" / "which devp does the scheduler run?" | devp installs (--json for scripts) — every copy on the machine, on PATH or not: version, install channel, PATH position, and which copy a new shell, the scheduler and the git hooks run. Read-only, no run lock. It searches every PATH folder and the folders the install script, cargo, Homebrew, Scoop, WinGet, npm, pnpm, yarn, bun, pip, pipx and uv use; a copy placed by hand in any other folder that is not on PATH cannot be found, so say that rather than claiming there is only one |
| "get rid of the extra devp copies" | devp installs clean — ask first, it removes software. Keeps the highest version (or --keep <path>), then for each other copy shows the manager's own uninstall command and asks [y/N]. Never deletes a manager-owned binary by hand, never touches the running or kept copy, a copy of unknown origin is described and left alone, never needs admin. --dry-run shows the plan and runs nothing; without a terminal it refuses unless -y is given. Exit 1 only if a confirmed step failed. Afterwards it re-points the scheduler and hooks at the kept copy, or prints <kept> setup. Do not run it on the user's behalf without them naming the copy to keep |
| "remove it" | devp uninstall — removes the program itself, PATH entry and agent skill included, then sweeps PATH and the well-known install dirs (~/.cargo/bin, ~/.local/bin, npm global, venv Scripts) for every other copy and removes them after one confirmation. Non-interactively the sweep needs -y or it skips those copies with a note. Each manager-owned copy gets its manager's uninstall line printed — on Windows that includes the manager that owns the running copy, because Windows will not let a manager delete a binary that is executing; tell the user to run that one line in a new shell. The running binary itself is renamed aside and queued for the next restart, so devp stops resolving immediately either way (add --deep to wipe config — confirm first) |
| "is there a newer version?" | devp update — prints the installed and latest versions plus the right upgrade command, then asks [y/N] before installing when a newer release exists and stdin is a terminal; run from a script or a pipe it never asks and installs nothing |
| "upgrade it" | devp update --install — downloads the release binary from GitHub, verifies its SHA-256, and replaces every copy this install runs (managed binary, devp alias, the running binary), then brings the devpw scheduler twin forward through its own verified download, a separate build the console bytes cannot become; a stale twin is reconciled even when the consoles are already current. The package manager that delivered the first copy is not run, and the one command that resyncs its version record is printed. Falls back to that manager's own upgrade command if there is no binary for this platform. auto_update does the download half by itself after a pass and is on by default; devp config set auto_update false stops it, and devp config set version_lock true stops every update path at once |
| "I installed it with cargo, I want it from winget instead" / "move it to uv" | devp install --channel <name> — installs through the manager named, then removes the old copy through the manager that owns it, in that order. devp install alone reports which channel owns this copy; --dry-run prints the plan and runs none of it. Names: installer, cargo, npm, bun, pnpm, yarn, uv, pipx, winget, scoop, homebrew. bun, pnpm and yarn install the same npm package but are each their own channel: a copy bun put there is upgraded and removed with bun, and running npm against it adds a second copy under npm's prefix while bun's stays stale on PATH |
| "I ran the one-liner but cargo/brew installed it first — which one runs?" | The one the one-liner installed. It works over any previous channel, needs no uninstall first, and never fails because of one; it puts its own directory first on PATH (prepended to the rc file on macOS/Linux, prepended to the User PATH on Windows) and names the copy it found rather than deleting another manager's file — then asks whether to collapse the two, running devp install --channel installer --yes from that older binary if you answer y. Anything else prints the command instead, and the question is skipped entirely with DEV_PRUNE_NO_MIGRATE_PROMPT=1, in CI, or with no terminal attached. The script deletes nothing either way. devp doctor lists every copy at any time, and reports the install receipt (install.json, written beside the binary by whichever script installed it: version, which script, when) |
"clean my Rust target/ too" / "clean my Java/Gradle/Maven builds too" / "clean my Flutter build caches too" / "clean my Elixir _build/ too" / "clean my C++ vcpkg_installed/ too" / "clean my CMake build/ too" / "clean my .NET bin/ and obj/ too" / "clean my Godot .godot/ too" / "clean my Unity Library/ too" / "clean my Unreal Intermediate/ too" / "clean my Zig caches too" / "clean my Haskell .stack-work/ or dist-newstyle/ too" / "clean my sbt target/ too" | devp config set enable_cargo true / enable_gradle true / enable_maven true / enable_swift true / enable_dart true / enable_mix_build true / enable_vcpkg true / enable_cmake_build true / enable_dotnet_build true / enable_godot true / enable_unity true / enable_unreal true / enable_defold true / enable_cocos true / enable_zig true / enable_stack true / enable_cabal true / enable_sbt true — opt-in adapters, idle-gated separately by build_idle_days (45). cmake_build claims only a tree holding a CMakeCache.txt that names a source directory inside the same repository, so a build/ made by hand is never touched. dotnet_build claims bin/+obj/ only when obj/project.assets.json records this directory’s own project file. godot claims .godot/ (and .import/ on Godot 3) beside a project.godot that carries a config_version= line; the editor re-imports the assets the next time it opens the project. unity claims Library/ and Temp/ beside a ProjectSettings/ProjectVersion.txt, and refuses while Temp/UnityLockfile says the editor is open. unreal claims DerivedDataCache/ and Intermediate/ beside a .uproject, never Saved/, Binaries/ or Content/. defold claims build/ beside a game.project. cocos claims library/ and temp/ only when package.json names Cocos Creator, so a plain Node project is never touched. zig claims .zig-cache/, zig-cache/ and zig-out/ beside a build.zig that declares a pub fn build. stack claims .stack-work/ beside a stack.yaml that names its resolver:. cabal claims dist-newstyle/ beside a cabal.project; a lone *.cabal file is never claimed. sbt claims target/ and project/target/ beside a build.sbt |
| "make npm wait a month" / "give one adapter its own idle window" | devp config set adapter_idle_days npm=30,cargo=90 — a floor per adapter, applied as max(idle_days, build_idle_days, this); - clears it. devp config wizard edits it beside the adapter checklist, where a language heading sets every adapter under it at once |
| "give my editor's agent the rules" | devp skill --agent <editor> — writes the per-repository rules file that editor reads. Own file: cursor, windsurf, antigravity, cline, roo, kilocode, continue, amazon-q, kiro, trae. Marked block inside a shared file: agents-md (AGENTS.md — Codex, Jules, Amp, OpenCode), copilot, gemini, junie, zed, aider (CONVENTIONS.md, which Aider reads only once read: CONVENTIONS.md is in .aider.conf.yml or --read CONVENTIONS.md is passed — the command says so after writing it). devp skill --help lists the exact paths. This list is fixed on purpose: for anything else, devp skill --rules-file <path> upserts the same marked block into a path you name, so a new, renamed or unlisted editor never waits on a release. Not sure which editors are here? Plain devp skill ends with a detection report — every editor whose traces are on the machine (home-directory footprint, installed VS Code-family extension) or in the repository, whether its rules here are current, stale or missing, and the command that writes them; the report is read-only. devp skill --detected, from the repository root, writes rules for everything on it in one pass |
| "just give me the prompt, nothing else" / "copy the onboarding text" | devp skill --prompt <workspace|agent> prints one onboarding prompt bare, with no header or fence, and writes nothing; add --copy to send it straight to the clipboard instead of stdout |
| "man pages" / "show me the manual" / "what commands are there?" | devp man — the contents page, every command grouped by what it is for. devp man <command> for one page (the same text as devp <command> --help). Roff only where something formats it: a redirect or a pipe gets roff, devp man | man -l - reads it formatted, devp man --dir ./man writes the full set |
| "what version?" | devp -V (also prints OS, arch, config path, PATH audit) |
| you need to read the answer rather than show it | add --json to run, status, stats, history, trust or caches — see below |
Global flags, valid on any subcommand: --dry-run, --ignore-idle (--force is the
deprecated alias), --yes / -y. A deleting devp run — registry-wide or targeted —
lists what would go and asks first; without a terminal it exits with an error naming
--yes instead of hanging, so a scripted run must pass -y (the rows above already do).
A . wherever [PATH] appears means the current working directory, and it is the
default for init, link, unlink, restore and config project — so devp link and
devp link . are the same command. devp run is the exception: with no path it runs
across every registered repository, and devp run . restricts it to this one. A
leading ~ is expanded by dev-prune itself, so devp init ~/Code works in PowerShell
and cmd as well as in bash.
Shorthands: devp hook, devp daemon and devp icon are the config subcommands of
the same name, and install / uninstall / on / off work wherever enable /
disable does. A misspelled action is rejected, not silently treated as status.
| Code | Meaning | What you should do |
|---|---|---|
0 | Success — including "nothing was idle enough to prune" and a cancelled TUI selection | Report what happened; do not retry |
1 | The command failed; the reason is on stderr | Read stderr, act on it, do not retry blindly |
2 | The arguments were not usable | Fix the command, consult the command map above |
A run in which any repository failed exits 1 even if others succeeded.
One devp per device. Every pass (run, restore, unlink --missing, hook registration)
takes an OS advisory lock, run.lock in the config directory, released when the process
ends. While another pass holds it, a scheduled run --daemon or a hook registration skips
with one info line naming the holder (pid, version, since) and exits 0; an interactive
run, restore, unlink, link, undo, init, config set, the config wizard,
doctor --fix or caches clear prints the same facts and exits 1, so wait for the other
pass and run it again. Read-only commands never wait, and status and update skip their own
bookkeeping write and exit 0. registry.json carries a
written_by field with the devp version that last wrote it; a devp older than that refuses to
write and exits 1 with "registry.json was written by devp X, this is Y; update this install
or remove it, see devp doctor". devp doctor lists every devp install: several distinct
versions are a warning (exit 0) naming each path, the scheduled task's target and the hook
shims' target. Remove the extras yourself; devp never deletes a binary.
devp run --json, devp status --json, devp stats --json, devp history --json,
devp scores --json, devp caches --json and devp trust --json each
emit one JSON document on stdout and nothing else; warnings go to stderr. --json
implies non-interactive, so it never blocks on a prompt. status --json and
stats --json change nothing at all, not even the registry file. (When a human runs
--json in a real terminal the document is also copied to their clipboard, with a
dimmed stderr note — piped output, the way you consume it, never triggers this.)
devp status --json # what exists, what is reclaimable, are the integrations up
devp status --top 10 --json # the same, trimmed to the ten biggest — totals still cover all
devp stats --json # what has already been reclaimed, and by which repositories
# .lifetime.cache_bytes_freed and .container_bytes_freed are
# `caches clear`, counted apart and never added in
devp run --dry-run --json # what a pass would do, with exact byte counts
devp run -y --json # do it
devp caches --json # every package-manager cache, sized, largest first;
# each row carries .volume, the drive it sits on;
# no progress text, only the document, on stdout
# (on a terminal without --json it shows the cache being
# measured and a still-working hint after ten seconds)
devp caches --volume V: --json # only that drive; .summary.volume says which, and
# `containers` is absent because it belongs to no drive
devp caches containers --json # what every installed engine holds; carries no prune command
devp caches clear docker --dry-run --json # the commands it would run, and the estimate;
# .summary.volumes_untouched is always true
devp trust --json # what the tool guarantees, what this machine has switched on, and the SHA-256 of every binary it owns
devp status --drift --json # unrecorded packages per environment, with the record command
devp history --json # every recorded pass: trigger, argv, and each directory removed
devp history --pass 1 --json # just the most recent one, still numbered `pass: 1`
devp scores --json # leaderboard of top 3 single-repo cleanups and top 3 total runs
stats reports history, status reports opportunity — reach for stats when the user
asks what dev-prune has done and status when they ask what it could do. On a machine
upgraded from 1.0.0 the per-repository figures and the pass list in stats start empty
while the lifetime total does not; the document's history_starts_at field says so, so
report the gap rather than reading it as "nothing was ever pruned".
by_manager and by_trigger are bounded by detail_starts_at (1.17.0) instead, because
they are summed from the prune log. Each carries its own passes_not_counted, and the two
are different numbers on purpose — quote the one belonging to the section you are quoting
from. by_manager covers pruning only: cache and container clears are not passes and are
not in it, so it will not add up to lifetime.bytes_freed and should never be presented
as if it should.
history is stats with the receipts. stats says ten passes freed 27 GiB; history
says which pass, what started it, the exact command line, and every directory it took.
Reach for it whenever a question is about a particular deletion rather than a total —
"what happened to this project's node_modules", "did the daemon run last night", "which
of my repositories does the scheduled pass keep hitting". In --json, branch on detail:
false means the pass predates 1.17.0 and only its four totals were ever recorded, so a
missing removed there is a gap in the record and not a pass that deleted nothing.
detail_starts_at names the release the per-directory log begins in. Match on argv when
you are looking for a flag; print command_line when you are showing the user.
devp status sizes every dependency tree in every registered repository, so on a large
registry it takes several seconds even though it is a pure read. Prefer --top N when
the user only wants the worst offenders.
Every document carries schema, an integer that increases only when a consumer would
have to change: a field removed, renamed, or given a new meaning. Adding a field does not
bump it — parse permissively and ignore what you do not recognise. It is 1 today.
The fields worth reading first:
| Path | Use it for |
|---|---|
summary.errors (run) | "did anything go wrong" — the whole answer, in one integer (counts lockfile_error, activity_check_error, delete_error and config_error) |
results[].status | pruned, skipped_dry_run, skipped_active, skipped_adapter_window, skipped_symlink, skipped_declaration, skipped_nested_repo, skipped_drive, ignored, no_bloat, disabled, path_missing, not_a_repo, lockfile_error, activity_check_error, delete_error, config_error |
results[].message | the failure detail — present on the four error statuses, on skipped_symlink, where it names the link, on skipped_declaration, where it says why the declaration was refused, on skipped_nested_repo, where it names the git repository found inside the directory, and on skipped_drive, where it says the repository's drive changed or is not connected (a skip, not an error) |
results[].fix_command | present only on lockfile_error, and only when the fix is one mechanical command you may run unattended |
repositories[].state (status) | candidate, active, ignored, no_bloat, path_missing, config_error |
repositories[].error | the parse failure — present only on config_error |
inactive[] / totals.inactive_repositories (status) | repositories on a drive that is not connected (path, drive). They are not in repositories[] and not in any other total, were not examined, and are never pruned or dropped; they return on their own with the drive. Tell the user the drive is unplugged rather than that anything is wrong |
totals.reclaimable_bytes | the number to quote back to the user |
totals.restore_estimate / repositories[].restore_estimate_secs | how long putting it back would take, from restores timed on this machine — null until there is one. Never quote it as a whole answer unless covered_bytes equals totals.reclaimable_bytes |
results[].shared_bytes / directories[].shared_bytes | bytes hardlinked into a pnpm/bun store and therefore excluded from bytes — if the user asks why the figure is smaller than the folder size, this is the answer |
summary.total_bytes (caches) | every package-manager cache added up; caches[].clear_command is what the user runs, never you |
caches[].volume / summary.volume (caches) | the drive or filesystem a cache sits on (V:\ on Windows, a mount point elsewhere) — group by it rather than re-deriving a mount table from path. Absent where dev-prune cannot tell. summary.volume appears only under --volume, and its presence means every figure in the document describes one drive rather than the machine |
caches[].partial (caches clear) | true when a clear failed after freeing space: the row has an error, cleared is false, and freed_bytes is above zero. Report both the space that came back and that the clear did not finish. Such a row counts in summary.failed, and the exit code is 1 |
summary.freed_bytes (caches clear, engine) | system df before minus after — never the sum of steps[]. Layers are shared, so those add up to more than the disk ever held |
containers[] (caches) / engines[] (caches containers) | what each container engine holds. Never added to summary.total_bytes — that figure answers "what could devp caches clear free", and none of this is that. An engine with available: false carries reason and no size keys: absent is not zero, so do not report 0 GB when dev-prune could not find out |
repositories[].tools (status) | graphify's graphify-out/ and understand-anything's .understand-anything/ at the repository root, each with a name, path and bytes. Never added to reclaimable_bytes and never a run candidate: neither has a lockfile proving it can be rebuilt without re-running the tool's own extraction passes, LLM calls included. Report the size; never suggest deleting it |
status tags and state tags are separate vocabularies: the first is what a pass did,
the second is why a repository is or is not a candidate. Both are stable and lowercase
snake_case; the human wording above them is not, so never match on it.
| Flag | Effect |
|---|---|
--only npm,pnpm | act on these package managers alone; an unknown name is an error, not a silent no-op |
--skip cargo | leave these alone — the usual way to keep a slow cargo build out of a pass |
--min-size 100 | ignore anything under 100 MiB for this run, overriding min_size_mb |
A repository is not assumed to be one project. dev-prune walks the root and up to six
levels below it, and every directory a package manager recognises is verified and pruned
on its own terms — uv, npm and cargo in one root, or spread across frontend/,
services/api/ and tools/cli/. Output is by repository-relative path:
• MyMonorepo → frontend/node_modules (412.7 MiB) [pnpm]
• MyMonorepo → services/api/.venv (188.2 MiB) [uv]
• MyMonorepo → tools/cli/target (1.41 GiB) [cargo]
Discovery never enters a dependency tree, a virtual environment, a hidden directory, or
a nested .git.
When npm, pnpm, yarn and bun all claim the same node_modules, one owner is chosen: the
packageManager field in package.json, else whichever manager's bookkeeping files are
inside the installed tree, else the most recently written lockfile. For Python, uv wins
over plain venv when uv.lock or [tool.uv] is present.
| Ecosystem | Detected by | Deletes | Verified with | Restored with |
|---|---|---|---|---|
| npm | package-lock.json | node_modules | npm ci --dry-run --ignore-scripts | npm ci |
| pnpm | pnpm-lock.yaml | node_modules | pnpm install --lockfile-only --frozen-lockfile | pnpm install --frozen-lockfile |
| yarn | yarn.lock | node_modules | yarn install --immutable --mode update-lockfile (Berry) | yarn install --immutable |
| bun | bun.lockb, bun.lock | node_modules | bun install --frozen-lockfile --dry-run --ignore-scripts | bun install --frozen-lockfile |
| uv | uv.lock, [tool.uv] | .venv | uv lock --locked | uv sync |
| venv | requirements.txt + pyvenv.cfg | every dir holding pyvenv.cfg | requirements.txt lists ≥1 package and accounts for every installed package | python -m venv .venv && pip install -r requirements.txt |
| pycache | __pycache__ by name alone; .pytest_cache, .mypy_cache, .ruff_cache by their CACHEDIR.TAG | whichever of those it found | a .py file exists anywhere in the repository (rebuild-from-source proof) | none needed — Python, pytest, mypy or ruff regenerate it on their next run |
| poetry | poetry.lock, [tool.poetry] | .venv | poetry check --lock, plus no installed package missing from the lockfile | poetry install |
| pdm | pdm.lock, [tool.pdm] / pdm.backend | .venv, __pypackages__ | pdm lock --check | pdm install |
| pipenv | Pipfile | .venv (in-project installs only) | pipenv verify | pipenv install --deploy |
| pixi | pixi.toml, pixi.lock, [tool.pixi] | .pixi | pixi.lock carries its version: and records at least one conda or PyPI package | pixi install |
| cargo (opt-in) | Cargo.toml | target | cargo metadata --locked | next cargo build |
| go | go.mod | vendor | go mod download | go mod vendor |
| composer | composer.json | vendor (skipped when it holds a vendor/bundle) | composer validate --no-check-publish --no-check-all | composer install |
| bundler | Gemfile | vendor/bundle (vendored installs only) | bundle lock --check | bundle install |
| cocoapods | Podfile | Pods | Podfile.lock has its SPEC CHECKSUMS section and is no older than the Podfile | pod install |
| mix | mix.exs | deps (never _build) | mix.lock is a complete Elixir map and no older than mix.exs | mix deps.get |
| terraform | any *.tf / *.tf.json | .terraform/providers (never environment, terraform.tfstate or modules) | .terraform.lock.hcl records at least one provider | terraform init -backend=false |
| gradle (opt-in) | build.gradle[.kts] / settings.gradle[.kts] | build, .gradle | manifest present and readable (rebuild-from-source proof) | next ./gradlew build |
| maven (opt-in) | pom.xml | target | pom.xml present and looks like a Maven manifest | next mvn package |
| swift (opt-in) | Package.swift | .build (never .swiftpm) | Package.swift declares a Package( (rebuild-from-source proof) | next swift build |
| dart (opt-in) | pubspec.yaml | .dart_tool (never build) | pubspec.lock has a packages: section and is no older than pubspec.yaml | dart pub get / flutter pub get |
| mix_build (opt-in) | mix.exs | _build (never deps) | mix.exs and mix.lock both present | next mix compile |
| vcpkg (opt-in) | vcpkg.json | vcpkg_installed (never build) | vcpkg.json parses and declares a non-empty dependencies list | next vcpkg install |
| cmake_build (opt-in) | CMakeLists.txt | any tree holding a CMakeCache.txt (build, cmake-build-debug, out/build/<preset>) | the tree's own CMakeCache.txt records a CMAKE_HOME_DIRECTORY that still holds a CMakeLists.txt and sits inside this repository | next cmake -S . -B <dir> && cmake --build <dir> |
| dotnet_build (opt-in) | *.csproj / *.fsproj / *.vbproj | bin, obj | obj/project.assets.json parses and records this directory's own project file; bin only alongside that proven obj, and only when it holds nothing but Debug/Release directories | next dotnet build |
| godot (opt-in) | project.godot | .godot (Godot 4), .import (Godot 3) | project.godot is readable and carries a config_version= line | editor re-imports on next open, or godot --headless --import |
| unity (opt-in) | ProjectSettings/ProjectVersion.txt | Library, Temp (never Assets, Packages or ProjectSettings) | ProjectVersion.txt carries an m_EditorVersion: line, and Temp/UnityLockfile is absent (an open editor is refused, not raced) | editor re-imports on next open |
| unreal (opt-in) | any *.uproject file | DerivedDataCache, Intermediate (never Saved, Binaries or Content) | the .uproject parses as JSON with a "FileVersion" key | editor rebuilds the DDC on next open; regenerate project files for the IDE |
| defold (opt-in) | game.project | build (never .internal or assets) | game.project carries a [project] section | next build from the editor or bob.jar |
| cocos (opt-in) | package.json naming Cocos Creator | library, temp (never build, which is exported output) | package.json names "creator" or a cocos-creator engine, so a plain Node project is never claimed | editor re-imports on next open |
| zig (opt-in) | build.zig | .zig-cache, zig-cache, zig-out | build.zig declares a pub fn build | next zig build |
| stack (opt-in) | stack.yaml | .stack-work | stack.yaml names its resolver: (or snapshot:) | next stack build |
| cabal (opt-in) | cabal.project | dist-newstyle | cabal.project declares its packages (a lone *.cabal is never claimed) | next cabal build |
| sbt (opt-in) | build.sbt | target, project/target | build.sbt carries a setting, or project/build.properties pins sbt.version | next sbt compile |
cargo, gradle, maven, swift, dart, mix_build, vcpkg, cmake_build, dotnet_build, godot, unity, unreal, defold, cocos, zig, stack, cabal and sbt ship disabled
— a build directory takes far longer to regenerate than a dependency directory (a full
recompile, not a download). Enable them with devp config set enable_cargo true /
enable_gradle true / enable_maven true / enable_swift true / enable_dart true /
enable_mix_build true / enable_vcpkg true / enable_cmake_build true / enable_dotnet_build true / enable_godot true / enable_unity true / enable_unreal true / enable_defold true / enable_cocos true / enable_zig true / enable_stack true / enable_cabal true / enable_sbt true; while disabled
they are invisible (not detected, not listed, --only cargo prunes nothing). Their candidates also wait for
build_idle_days (45 by default), applied as the maximum of it and the
repository's effective idle_days — the build-tool gate can only ever make pruning
later, never earlier.
Any single adapter can wait longer still: adapter_idle_days (cargo=90,npm=30) is a
per-adapter floor, applied as max(idle_days, build_idle_days, adapter_idle_days[name])
— it can raise one adapter's window and never lower it.
bundler and pipenv claim only the in-repository install — vendor/bundle after
bundle config set path vendor/bundle, and .venv under PIPENV_VENV_IN_PROJECT.
Their defaults are shared stores under the user's home, which dev-prune never touches —
not as a prune and not through devp caches either: those directories are where other
projects' dependencies are installed, not a cache. If the user asks why a Ruby or
Pipenv project reclaims nothing, that is the answer.
Any adapter, opt-in or not, can be switched off with disabled_adapters — that one is
a preference, not a safety gate.
Every verification command is read-only. A lockfile that has drifted from its
manifest is a refusal, not something to quietly fix — a prune pass can be started by the
scheduler, and it must never leave a modified tracked file behind. Each adapter's writing
form (npm install --package-lock-only, uv lock, cargo generate-lockfile,
go mod tidy, …) runs in exactly two cases: no lockfile exists at all, or the user set
allow_manifest_rewrite true.
Global (devp config get|set|show) — in %APPDATA%\dev-prune on Windows,
~/Library/Application Support/dev-prune on macOS, $XDG_CONFIG_HOME/dev-prune on Linux:
The language this is all in
| Key | Default | Meaning |
|---|---|---|
language | en | Catalogue for dev-prune's own headings and summary lines: en, zh, hi, te, ta, kn, ml, bn, mr, gu, pa, sa. Never translate a value you read out of --json, a key you pass to config set, a flag name or an adapter name — those are English in every catalogue by design. DEV_PRUNE_LANG overrides it for one command; an untranslated key falls back to English |
recommendations | true | Whether devp run --dry-run ends with the Detected, but switched off section (and the --json recommendations key) naming opt-in adapters that would have found something. Presentation only: changes nothing about what is scanned or deleted. When the user says the hint is noise, devp config set recommendations false |
What gets pruned
| Key | Default | Meaning |
|---|---|---|
idle_days | 15 | Days untouched before a repository is a candidate |
min_size_mb | 0 | Smallest bloat directory worth deleting, in MiB; 0 means no floor |
scan_depth | 6 | How many directory levels below a repository root discovery descends; config set accepts 1–32 |
disabled_adapters | (none) | Adapters to leave alone entirely, comma-separated by name. A disabled adapter is not detected, not counted, not pruned — as if that ecosystem were not installed. - clears the list |
adapter_idle_days | (none) | Per-adapter idle windows, as cargo=90,npm=30. A floor, never a bypass: max(idle_days, build_idle_days, this). - clears it |
auto_follow_drives | true | Whether a drive that returns at another place (new letter or mount point) is recognised by its volume identity and its entries re-pointed with their history. Off, they stay inactive. A path that now belongs to a different volume is never pruned either way |
Before anything is deleted
| Key | Default | Meaning |
|---|---|---|
require_confirmation | true | Whether a prune pass asks before deleting |
allow_manifest_rewrite | false | Whether a pass may run the writing sync form that repairs a drifted or missing lockfile |
command_timeout_secs | 600 | Ceiling on any one package-manager command dev-prune runs: the lockfile check before a delete, and the reinstall devp restore performs. Nothing is compiled under it — the opt-in build adapters run no command at all during a prune — except a restore whose install builds a native module. The limit is per command, not per run, and scans have no overall limit: only a single git call that stops answering is cut off, after 120 seconds, and that repository is skipped for the pass |
Build trees — every one off by default
| Key | Default | Meaning |
|---|---|---|
enable_cargo | false | Turn the opt-in Cargo adapter on (target/ is compiler output — it comes back by recompiling, not downloading) |
enable_gradle | false | Turn the opt-in Gradle adapter on |
enable_maven | false | Turn the opt-in Maven adapter on |
enable_swift | false | Turn the opt-in Swift Package Manager adapter on |
enable_dart | false | Turn the opt-in Dart/Flutter adapter on |
enable_mix_build | false | Turn the opt-in Elixir Mix build-tree adapter on. Mix is Elixir's build tool; _build/ is where it puts the compiled project and every compiled dependency, so it comes back by recompiling. Distinct from the always-on mix adapter, which claims only the downloaded deps/ beside it |
enable_vcpkg | false | Turn the opt-in vcpkg adapter on (vcpkg_installed/ holds ports vcpkg built from source — it comes back by recompiling) |
enable_cmake_build | false | Turn the opt-in CMake adapter on (claims only a tree holding a CMakeCache.txt that names a source directory inside the same repository — a build/ you made by hand is never touched) |
enable_dotnet_build | false | Turn the opt-in .NET adapter on (bin/ and obj/, claimed only when NuGet's obj/project.assets.json records this directory's own project file — a bin/ holding anything of yours is never touched) |
enable_godot | false | Turn the opt-in Godot adapter on (.godot/, and .import/ on Godot 3, hold the editor's imported-resource cache; the editor rebuilds it from your assets the next time it opens the project) |
enable_unity | false | Turn the opt-in Unity adapter on (Library/ and Temp/ hold the editor's import cache, claimed only beside a ProjectSettings/ProjectVersion.txt; refused while Temp/UnityLockfile says the editor is open; the editor re-imports on next open) |
enable_unreal | false | Turn the opt-in Unreal adapter on (DerivedDataCache/ and Intermediate/ beside a .uproject; never Saved/, Binaries/ or Content/; the editor rebuilds the DDC on next open) |
enable_defold | false | Turn the opt-in Defold adapter on (build/ beside a game.project; the next build regenerates it; .internal/ and assets/ are never claimed) |
enable_cocos | false | Turn the opt-in Cocos Creator adapter on (library/ and temp/, claimed only when package.json names Cocos Creator; exported build/ output is never claimed) |
enable_zig | false | Turn the opt-in Zig adapter on (.zig-cache/, zig-cache/ and zig-out/ beside a build.zig that declares a pub fn build; the next zig build puts all three back) |
enable_stack | false | Turn the opt-in Haskell Stack adapter on (.stack-work/ beside a stack.yaml that names its resolver: or snapshot:; the pinned snapshot makes the rebuild reproducible) |
enable_cabal | false | Turn the opt-in Haskell Cabal adapter on (dist-newstyle/ beside a cabal.project that declares its packages; a lone *.cabal file is never claimed) |
enable_sbt | false | Turn the opt-in sbt adapter on (target/ and project/target/ beside a build.sbt that carries a setting, or whose project/build.properties pins sbt.version) |
build_idle_days | 45 | Extra idle gate for the build-tool adapters (cargo, gradle, maven, swift, dart, mix_build, vcpkg, cmake_build, dotnet_build, godot, unity, unreal, defold, cocos, zig, stack, cabal, sbt); applied as max(build_idle_days, idle_days) |
Shared download caches
| Key | Default | Meaning |
|---|---|---|
cache_max_gb | (none) | Per-manager cache size caps in GiB, as default=10,npm=4. Keyed by cache-manager name (npm, pnpm, uv, pip, cargo, go, nuget, …), not adapter name, plus default for every manager not named separately. Marks an over-cap manager in devp caches; only devp caches clear --over-cap acts on it. - clears it |
cache_auto_trim | false | When true, the scheduled pass (and a confirmed devp run) empties the Go build cache or the ccache cache if it is over cache_limit_gib. No other cache is touched |
cache_limit_gib | 20 | Whole GiB (at least 1) above which one of those two caches is trimmed. Per cache. devp caches marks any cache over it either way |
Running without being asked
| Key | Default | Meaning |
|---|---|---|
auto_setup | true | Whether the integration pass may run unattended. A fresh machine is also asked once, before anything installs; devp setup records the yes |
auto_config | false | Whether link/init write a default .devprune.json into repositories they register |
auto_daemon | true | Whether that pass may register the OS scheduler |
auto_discover | true | Whether the scheduled background pass (devp run --daemon) looks for unregistered repositories by itself, using the same roots as devp init --auto, and registers what it finds. A manual devp run never does. Registering is not pruning — a discovered repository still waits for idle_days and still needs a lockfile to prove every candidate directory rebuildable — and a repository holding an ignore.devprune.json is never registered. devp config set auto_discover false turns it off |
check_interval_days | 2 | How often the OS scheduler runs |
auto_hooks | true | Whether that pass may install global Git hooks |
auto_hooks_chain | false | Whether unattended setup may take a core.hooksPath another tool holds, forwarding every hook on to it. Off by default: that setting is one slot, global to the machine, and taking it rewires husky, pre-commit or lefthook for every repository the user has |
Keeping dev-prune current
| Key | Default | Meaning |
|---|---|---|
update_check | true | Whether to ask GitHub for the latest release. Sends nothing but the request itself |
update_check_interval_days | 7 | Days between automatic release checks; devp update always asks |
update_check_timeout_secs | 5 | How long the release check waits for GitHub before giving up |
auto_update | true | Download and install a newer release by itself at the end of a prune pass, once the release check has found one. Never runs a package manager unattended, and does nothing on WinGet/Scoop/Homebrew, where the manager owns the upgrade; a failed upgrade warns and never fails the pass |
version_lock | false | Pin this copy to the version it is. Outranks everything above: auto_update does not run however it is set, devp update --install and devp install --channel refuse, and the install scripts leave the binary alone. No flag bypasses it; devp config set version_lock false is the only way back |
Per repository:
ignore.devprune.json in the root — instant skip, checked before anything is parsed.
It is honoured at registration too: a bulk scan (devp init, with or without --auto,
and the daemon's own discovery) will not register a repository that holds it, so a
repository can decline before it ever appears in devp status. devp link <path>
still registers it, because naming one repository is not a bulk scan..devprune.json — "project_name", "ignore": true, "override_idle_days": 30,
"min_size_mb": 100, "scan_depth": 10, "disable_daemon": true (excluded from
scheduled passes only), "disable_hooks": true (not auto-registered by the global
hook). Inert data only. Written into .git/info/exclude, so it never reaches a commit.project.devprune.json — the same keys, the same schema, and committed. Created by
devp config project . --team, and deliberately not excluded.Where both exist, every key the project file names wins; the personal file answers every
key it does not. That is the inverse of the usual local-overrides-shared convention and
is deliberate: these are decisions a project makes, and "this repository is not worth
pruning" should survive a colleague's stale local file. "Names a key" means the key is
literally in the file — a project file that never mentions ignore does not un-ignore
anything, which is why --team creates it holding only its $schema line.
Declared directories. Either file may also carry a prunable section:
{ "prunable": { "directories": [
{ "path": "tools/vendor", "rebuild": "make vendor", "why": "regenerated from tools/manifest.toml" }
] } }
That is how a repository names a tree no adapter can recognise. rebuild is required; if
nothing has to rebuild the directory, write "rebuild": "echo not needed", which works on
every platform. dev-prune prints the command and never runs it. The directory must also
be git-ignored and untracked, or it is refused; add it to .gitignore first. Start the command with
the tool itself — npm --prefix docs run build, never cd docs && npm run build: the
first word is checked against the machine, and a shell builtin like cd is refused
everywhere. These are pruned by the
ordinary pass under the adapter name declared, so they obey --dry-run, --min-size,
--only and the schedule. This is the one section where the two files' lists add up
rather than one winning.
Vetoing one. project.devprune.json is committed, so a declaration is the whole
team's, and a tree the project regenerates can be the one holding something on this
machine. prunable.exclude is the answer:
{ "prunable": { "exclude": ["tools/vendor"] } }
Spelled the same way as a path — tools/vendor, tools/vendor/, ./tools/vendor
and tools\vendor all match — and honoured from whichever file names it, because a veto
only ever deletes less. The entry it names is skipped entirely: not pruned, and not
reported. Write it into .devprune.json, never the shared file; the whole point is that
one person's answer does not become everybody's.
Declaring and excluding one path in the same file is a typo, not a decision: the
exclusion wins, so the declaration never runs. devp doctor reports it. Across the two
files it is the intended use and stays silent.
Where these files go. The repository root, always. Every path inside them is relative
to that root, so a copy in a subdirectory parses, looks applied, and is read by nothing.
devp doctor warns about strays it finds; it does not move them, because moving one
changes what every path inside it means. When writing one for a user, write it at the
root of the repository — not beside the project it is about.
project.devprune.json is created by devp config project . --team, holding nothing but
its $schema line. Run that first if the file does not exist, then write the prunable
section into it — the $schema line is what gives the user completion and validation in
their editor, so do not write the file by hand without it.
When you fill this in for a user, name only directories you have confirmed are
regenerated — and give a rebuild you have actually seen work in that repository, not
a plausible-looking one. dev-prune will refuse a declaration whose path leaves the
repository, holds Git-tracked files, or whose rebuild names a tool the machine does not
have, and report it as skipped_declaration. It also reads the manifest the tool would
read, where there is one, and refuses npm run build against a package.json with no
build script, make vendor against a Makefile with no vendor target, or uv run x
against a pyproject.toml whose [project.scripts] has no x — note that
[tool.uv.scripts] is not a table uv reads, so a script declared only there does not
count. Those are reads, never runs, and a command shape they cannot resolve is allowed
through. That refusal is a backstop, not a substitute for checking.
devp config project <PATH> prints an Effective values table naming the file each
value in force came from, whenever both files exist. Prefer reading that over inferring
precedence from the two files yourself.
Only ever write .devprune.json. devp config --update, the workspace toggles and the
dashboard's i key all do, and none of them touches the shared file — a tool editing a
tracked file on somebody's branch is a change they did not ask for. Edit
project.devprune.json only when the user has asked for a project-wide decision, and tell
them it is a commit.
Either file failing to parse skips the repository and reports the syntax error rather
than falling back to defaults — the unreadable file may have been the one saying
"ignore": true. devp doctor --fix repairs the personal file by renaming it aside; it
reports a broken project.devprune.json and leaves it for git checkout.
The integrations install themselves: at install time, and again on the first command
after an upgrade if anything went missing. devp setup is that same pass run by hand,
and devp setup --status reports without changing anything.
It installs five things — the devp second binary, the exported SKILL.md, global Git
auto-registration hooks (post-commit, post-checkout, post-merge, each running
dev-prune link . --quiet in the background), the OS scheduler (schtasks on Windows, a
LaunchAgent on macOS, a systemd user timer on Linux) running dev-prune run --yes --daemon, and the file-manager icon registration for *.devprune.json.
It declines rather than forces. It skips the hooks when git is not on PATH. It does
not touch editor settings — devp config icon registers the icon with the OS file
manager (Explorer, Finder, Nautilus and friends) and, for editors, only prints a
settings.json snippet for you to paste. And the setup pass itself registers no
repository: installing the integrations and deciding what to track are separate.
Discovery happens in the scheduled pass instead. With auto_discover on — the default
— dev-prune run --daemon looks for unregistered repositories using the same roots as
devp init --auto and registers what it finds; a manual devp run never does, and
devp config set auto_discover false stops it. Nothing about that widens what gets
deleted: a newly registered repository is pruned only once it is idle past idle_days,
only where a lockfile proves every candidate directory can be rebuilt, and only after the
same safety invariants pass — so the worst a wrong guess costs is an extra row in
devp status. A repository holding an ignore.devprune.json is not registered at all.
A repository that was moved is not registered twice: when discovery finds one whose root
commit matches a registered path that no longer exists, that entry is re-pointed to the new
path with its history. Separately, every devp run, devp status and devp doctor --fix
drops a registry entry (never anything on disk) that has been missing, or has stopped being
a git checkout, for 30 days, and only while its drive or share is present, so an unplugged
drive never loses entries. A repository on a drive that is not connected is inactive:
left out of every pass, never dropped, back to normal when the drive returns. The
registry records each repository's volume identity (volume_id: serial and file system on
Windows, filesystem UUID on Linux, volume UUID on macOS), so a drive that returns under
another letter or mount point is recognised and its entries are re-pointed with their
history (auto_follow_drives, on by default, turns that off), and a path now held by a
different volume is inactive, never treated as the same place. A filesystem with no UUID
and a network share have no identity: they go inactive when unmounted and are not
followed. Just before each repository is pruned or restored the drive is asked again, and
a mismatch skips that repository with drive for <repository> changed or is no longer connected, skipped (status skipped_drive in --json, not an error, exit code
unchanged). A Windows devp never registers, scans or prunes a path under \\wsl$ or
\\wsl.localhost: install devp inside the distribution instead.
Git supports exactly one global
core.hooksPath, and while it is set Git stops looking in any repository's own.git/hooks. dev-prune restores that itself: it writes a shim for every hook name Git looks for, each ending byexecing the repository's own hook of the same name with the same arguments, stdin and exit code — so a repo-localpre-commitgate still runs and can still block the commit.reference-transactionandpost-index-changeare left unshimmed on purpose; both fire many times per ordinary fetch and the shell spawns would be a cost users feel. dev-prune also does not simply give up when another tool holds the slot.devp hook install --chaintakes the slot and writes a shim per hook thatexecs the displaced directory's hook of the same name — same arguments, same stdin, same exit code — so husky, pre-commit or lefthook keep running exactly as before.devp hook uninstallrestores the previouscore.hooksPath. Chaining is opt-in (auto_hooks_chain, defaultfalse): unattended setup will not rewire another tool's Git configuration, so with it off the pass skips the hooks and names the owner. The chain is a snapshot — a hook the other tool adds later has no shim;devp hook statusnames the drifted ones anddevp hook install --chainrebuilds. To decline the whole thing instead:devp config set auto_hooks falseanddevp config hook disable.
Off switches, narrowest first: auto_hooks_chain, auto_discover, auto_daemon,
auto_hooks, auto_setup. None of it installs until the machine’s first attended
run accepts the setup walkthrough — quitting that installs nothing, durably. For containers
and CI, DEV_PRUNE_NO_AUTO_SETUP=1 overrides all five with no config file — the same
variable the install scripts read, so setting it once covers install time and every run
after it.
Use devp config set <key> <value> and devp config show. Both are one-shot, both
print what they did, and neither waits for a keypress.
Never run devp config wizard. It opens a full-screen configurator for a person to
drive, and an agent holding a pty passes every terminal check it makes while never
sending the keypress it waits for. If something must run it anyway, --no-tui or
DEV_PRUNE_NO_TUI=1 gets the line-by-line form instead — but config set is the
right answer, because it does not need a terminal at all.
There is a second reason, and it is the more important one. The configurator's first screen is a declaration: what dev-prune is, who published it, the channels a real copy comes from, the guarantees the code enforces, and the Apache-2.0 terms the whole thing is offered under. It is shown once, and running the configurator marks it as seen. An agent that opens it therefore spends the one screen that exists so a human can decide whether to trust this tool — and the human never gets it. Do not consume it on their behalf.
devp trust and devp trust --json report the same facts, read-only, as often as you
like. Use those. If the user has never run dev-prune interactively, say so and let them
run devp config wizard themselves rather than doing it for them. Tell them it is one
key: holding Enter walks the whole configurator, taking the recommended answer on
every row and landing on a summary that needs one more Enter to save — or a takes
the rest in one keystroke. Nothing is written until that final Enter, and
allow_manifest_rewrite is never taken automatically by either.
devp config recommended is safe for you to run when the user has asked for the
recommended setup. It is one-shot, prints every change, needs no terminal, and does not
mark the declaration as seen — the walkthrough still opens for them later. It turns on
enable_cargo, enable_gradle, enable_maven, enable_swift, enable_dart,
enable_mix_build, enable_vcpkg, enable_cmake_build, enable_dotnet_build, enable_godot, enable_unity, enable_unreal, enable_defold, enable_cocos, enable_zig, enable_stack, enable_cabal and enable_sbt, all of which make build
trees deletable, and sets cache_max_gb to default=10 — a reporting ceiling that
still deletes nothing. If the user has already set a ceiling of their own it is left
alone, so running this never throws away a number they picked.
--with-cautious additionally sets allow_manifest_rewrite, which lets cargo and
go update Cargo.lock and go.mod during a restore — files Git tracks. Do not
pass it unless the user asked for that specifically. An unexpected working-tree change
is exactly the kind of thing an agent must not cause on somebody’s behalf.
To switch one ecosystem off without touching anything else:
devp config get disabled_adapters # (none), or the current list
devp config set disabled_adapters go,composer # the whole list, not an addition
devp config set disabled_adapters - # every adapter active again
The value is the complete list every time — there is no add or remove verb, so read the current one before writing a new one or the user loses the rest of their choices.
Start with devp doctor for the installation, or devp doctor <path> for one repository
— it runs every check in the table below at once, changes nothing, and ends by naming the
single reason a prune pass would or would not touch that repository. Exit 1 means
something is genuinely broken; warnings alone exit 0. When the verdict says findings
can be repaired automatically, devp doctor --fix mends them — it re-runs the same setup
passes automatic installation uses, so it can never do more than devp setup would, and
it never performs a first-time install. Reach for the table when you need the fix for a
specific symptom the report named.
| Symptom | Cause | Fix |
|---|---|---|
devp: command not found | The bin directory is not on PATH in this shell | devp -V prints the bin directory and a PATH audit. Open a new terminal; if it persists, re-run the installer |
Command works as dev-prune but not devp | The second executable is missing — devp is a real binary next to dev-prune, not a shell alias | dev-prune setup |
| "not a git repository" | dev-prune only operates inside a .git root | git init, or point at the real repository root |
| Repository shows as Active, nothing pruned | Committed or modified inside idle_days | Expected. devp config set idle_days N, or --ignore-idle for one run (ask first) |
| A directory is Not examined (adapter idle window) | That adapter waits longer than the repository has been idle — build_idle_days (45) for the opt-in build adapters, or its adapter_idle_days entry | Expected. Wait it out, lower the window, or --ignore-idle for one run (ask first) |
| Repository shows Ignored | ignore.devprune.json exists, or "ignore": true | Delete the file, or press i in devp status |
| A project in the repository is never listed | It sits deeper than scan_depth (6 levels) | devp config set scan_depth N, or set "scan_depth" in that repository's .devprune.json |
| A small bloat directory is never offered | It is under min_size_mb | devp run --min-size 0 for one pass, or devp config set min_size_mb 0 |
A repository is not in devp status at all | It was never registered, or it holds an ignore.devprune.json, which a bulk scan declines to register | devp link . in it, devp init <parent dir>, or devp init --auto to work the roots out. devp link registers an opted-out repository too; deleting the file is the other way |
| No longer a git repository | The directory is still on disk but its .git is gone — the clone was recreated by hand, or git worktree prune removed a worktree | devp unlink <path> drops the entry (--missing will not — it only clears paths that are gone), or git init <path> makes it a repository again if the directory is worth keeping tracked. The registry drops it itself after 30 days. Reported, never an error: the pass still exits 0 |
| Path Missing | The directory was moved or deleted | If moved: devp link <new path> alone — the matching root commit adopts the old entry, history and all, and the dead row goes (the scheduled pass does the same for a repository it discovers). If deleted: devp unlink <old path>, or devp unlink --missing for a registry full of them; left alone, the entry is dropped after 30 days while its drive or share is present |
| Inactive (drive not connected) | The repository's drive is unplugged or unmounted, or its letter now belongs to a different volume | Plug the drive back in; nothing else is needed. devp unlink --missing leaves these entries alone on purpose, devp unlink <path> removes one deliberately |
| Lockfile verification fails | The lockfile has drifted from the manifest, and verification is read-only so it refuses rather than repairing | Run the exact command dev-prune printed (it is the writing form for that ecosystem), in that project. Or devp config set allow_manifest_rewrite true to let dev-prune run it during the pass. Never delete the lockfile |
| "holds package(s) that the lockfile does not record" | Something was installed without recording it — npm install --no-save, a bare pip install into a pinned venv, an ad-hoc uv pip install | devp status --drift lists every such environment with the exact record command (npm install <pkg>, uv add <package>, pip freeze > requirements.txt). Run it, or uninstall the extras. Never delete the directory manually |
| "holds dev-prune, which requirements.txt does not account for" | The tool was pip installed inside that project's own virtualenv, so it is an unrecorded package in the very environment it would prune | Move it out — pip uninstall dev-prune, then uv tool install dev-prune — or record it deliberately with pip freeze > requirements.txt. Either one makes the environment prunable. The refusal is the ordinary unrecorded-package one; only the suggested repair differs |
"npm is not available" | that manager is not installed, or not on PATH | Install it. dev-prune will not delete a tree it cannot prove it can rebuild |
| Verification times out | A slow registry or a very large project | devp config set command_timeout_secs 1800 |
| Hooks not installed | git absent from PATH, or another tool owns core.hooksPath | devp setup --status says which. Install git, or devp hook install --chain to sit in front of the other tool and forward to it |
| Scheduler not running | auto_daemon false, or the pass was declined | devp setup --status, then devp daemon install |
| Automation came back after uninstall | The first-run question was answered yes again — uninstalling clears the recorded answer, so nothing reinstalls without a new one | Decline the walkthrough when asked, or devp config set auto_setup false |
| A bloat directory was skipped silently | It is a symlink or junction | Expected and deliberate — it points at storage the repository does not own |
Audit a machine's reclaimable space, safely:
devp init ~/Code # register everything under a workspace root
devp run --dry-run # report only — deletes nothing, runs no manager
When nobody has said where the code is:
devp init --auto --dry-run # the roots it worked out, and what it would register
devp init --auto # register all of it
Reclaim space, then get one project working again:
devp run -y
devp restore ~/Code/the-one-I-need-now
Set up on a fresh machine without background automation:
DEV_PRUNE_NO_AUTO_SETUP=1 devp init ~/Code
devp config set auto_setup false
Diagnose before asking the user anything:
devp doctor # installation: binary, PATH, install channel, config, integrations, registry
devp doctor . # this repository: why it would or would not be pruned
Read these when the answer is not above. Local paths work in a checkout; the URLs work anywhere.
A machine-readable summary for agents lives at https://devprune.vkrishna04.me/llms.txt.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
disk-space, dependency-cleanup, devp, package-manager, build-cache
npx claudepluginhub life-experimentalist/dev-prune --plugin dev-pruneOther plugins' skills for the same job