dev-prune-linux-x64 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -1
- package/bin/dev-prune +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -287,6 +287,7 @@ A few more worth knowing on day one:
|
|
|
287
287
|
```bash
|
|
288
288
|
devp stats # how much has been reclaimed so far, and by which repositories
|
|
289
289
|
devp caches # every package manager cache, sized. The report deletes nothing
|
|
290
|
+
devp caches docker # what Docker holds, and the prune commands. Read-only, permanently
|
|
290
291
|
devp status --drift # anything installed that the lockfiles don't record?
|
|
291
292
|
devp doctor . # why is this repository not being pruned?
|
|
292
293
|
devp doctor --fix # repair a broken integration — never a first-time install
|
|
@@ -379,6 +380,13 @@ Package manager caches
|
|
|
379
380
|
Total 21.99 GiB across 12 caches
|
|
380
381
|
|
|
381
382
|
→ Nothing above was deleted, and dev-prune never deletes any of it.
|
|
383
|
+
|
|
384
|
+
Container engines
|
|
385
|
+
|
|
386
|
+
docker 47.64 GiB 36.69 GiB reclaimable · devp caches docker
|
|
387
|
+
|
|
388
|
+
Container images, volumes and build cache are not package manager caches and are not in
|
|
389
|
+
the total above — dev-prune reports them and never deletes them.
|
|
382
390
|
```
|
|
383
391
|
|
|
384
392
|
A cache lives outside every repository and is shared by all of them, so no single
|
|
@@ -395,6 +403,64 @@ a registered repository, and each such row names its store in the command it pri
|
|
|
395
403
|
|
|
396
404
|
</details>
|
|
397
405
|
|
|
406
|
+
<details>
|
|
407
|
+
<summary><b><code>devp caches docker</code></b> — the engine that is usually bigger than all of them</summary>
|
|
408
|
+
|
|
409
|
+
```console
|
|
410
|
+
$ devp caches docker
|
|
411
|
+
|
|
412
|
+
Container engines
|
|
413
|
+
|
|
414
|
+
docker
|
|
415
|
+
|
|
416
|
+
Images 37.36 GiB 29.28 GiB reclaimable 41 items, 9 in use
|
|
417
|
+
Containers 1.19 GiB 1.12 GiB reclaimable 12 items, 3 in use
|
|
418
|
+
Local Volumes 2.79 GiB 0 B reclaimable 5 items, 2 in use
|
|
419
|
+
Build Cache 6.29 GiB 6.29 GiB reclaimable 41 items, 0 in use
|
|
420
|
+
|
|
421
|
+
Total 47.64 GiB 36.69 GiB reclaimable
|
|
422
|
+
|
|
423
|
+
Reclaim it yourself what it takes with it
|
|
424
|
+
docker builder prune the build cache; costs a slower next build
|
|
425
|
+
docker image prune dangling images no tag points at any more
|
|
426
|
+
docker container prune stopped containers and each writable layer
|
|
427
|
+
docker system prune the three above at once; volumes untouched
|
|
428
|
+
docker system prune --volumes adds unused volumes — the one that deletes data
|
|
429
|
+
|
|
430
|
+
Nothing above was deleted, and nothing dev-prune runs on a schedule will ever delete it.
|
|
431
|
+
An image has no lockfile to prove it can be rebuilt, and a named volume is the one thing
|
|
432
|
+
here that cannot be rebuilt at all — so this command measures, prints the commands, and
|
|
433
|
+
leaves the decision with you.
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
Clearing 6 GiB of npm cache while a Docker install nobody has looked at in a year sits on
|
|
437
|
+
40 GiB is the mistake this exists to prevent. `devp caches podman` and `devp caches
|
|
438
|
+
nerdctl` are the same report for those engines, and `devp caches containers` runs every
|
|
439
|
+
one it finds and lists any local Kubernetes clusters (kind, k3d, minikube) by name.
|
|
440
|
+
|
|
441
|
+
**It is read-only, permanently.** There is no flag and no `clear` verb that makes
|
|
442
|
+
dev-prune run one of those commands — `devp caches clear docker` is a usage error that
|
|
443
|
+
says so — and no scheduler or Git hook reaches this code at all. That is the same rule
|
|
444
|
+
as everywhere else rather than extra caution: an image has no lockfile to prove it can be
|
|
445
|
+
rebuilt, the Dockerfile that built it may not be on this disk, and a named volume is the
|
|
446
|
+
one thing on the machine that cannot be rebuilt at all.
|
|
447
|
+
|
|
448
|
+
The figures come from the engine's own `system df`, not a walk of the disk. On Docker
|
|
449
|
+
Desktop and Podman the store lives inside a VM disk image the host filesystem cannot see,
|
|
450
|
+
so a size taken off the disk would be wrong by orders of magnitude in the reassuring
|
|
451
|
+
direction — and asking is the only way to learn what is *reclaimable*, which is the
|
|
452
|
+
figure that decides anything. 40 GB of images with 38 GB dangling is a different
|
|
453
|
+
situation from 40 GB with 2 GB dangling.
|
|
454
|
+
|
|
455
|
+
An engine that is installed with its daemon stopped is reported as exactly that, quoting
|
|
456
|
+
the engine's own first line, and contributes no figures: a blank, not a zero. An engine
|
|
457
|
+
that is not installed is absent from the report rather than listed as missing. Local
|
|
458
|
+
Kubernetes clusters are named and deliberately not sized — their nodes are containers
|
|
459
|
+
belonging to an engine already in the table, so a figure beside the cluster name would be
|
|
460
|
+
the same gigabytes counted twice.
|
|
461
|
+
|
|
462
|
+
</details>
|
|
463
|
+
|
|
398
464
|
<details>
|
|
399
465
|
<summary><b><code>devp doctor .</code></b> — the one reason a repository is being skipped</summary>
|
|
400
466
|
|
|
@@ -468,6 +534,7 @@ process that leaves a dirty working tree is a surprise.
|
|
|
468
534
|
| 🧩 **Any number of ecosystems per repository** | uv, npm and cargo in one root, or spread across `frontend/`, `services/api/` and `tools/cli/` — each discovered, verified and pruned on its own terms |
|
|
469
535
|
| ↩️ **One-command restore** | `devp restore .` reinstalls a tree; `devp restore --last-run` puts back exactly what the most recent pass deleted, across every repository it touched |
|
|
470
536
|
| 🕒 **Activity-aware** | Combines `git log` timestamps with source-file `mtime`, so uncommitted work protects a repository just as a commit does |
|
|
537
|
+
| 🐳 **Container report** | `devp caches docker` (also `podman`, `nerdctl`, or `containers` for all of them plus local Kubernetes clusters) breaks a container engine's disk into images, containers, local volumes and build cache, each with what the engine itself calls reclaimable, and prints the prune commands narrowest first with what each takes with it. **Read-only, permanently** — `devp caches clear docker` is a usage error, and no scheduler or hook reaches this code: an image has no lockfile to prove it can be rebuilt, and a named volume cannot be rebuilt at all. `devp caches` carries a one-line summary per engine, outside its own total |
|
|
471
538
|
| 📊 **Cache report** | `devp caches` sizes every package manager cache and store on the machine — npm to cargo to conda, Maven, Gradle, NuGet, vcpkg, Conan, Composer, CocoaPods and Hex — and prints the command that clears each. The report is read-only; `devp caches clear <manager>` runs that command for you, after asking. `devp config set cache_max_gb uv=10,npm=10` says how big is too big, per manager, and marks the ones past it — `devp caches clear --over-cap all` then empties exactly those, still only when you type it. Each manager also says how many of your registered repositories use it and what that works out to per repository, and `devp caches clear --unused all` empties the ones nothing uses at all. pnpm is reported once per filesystem, because a store it hardlinks into `node_modules` cannot cross one and projects kept off the system disk get a store of their own. Nothing on a schedule ever touches a cache, and Maven's `~/.m2/repository` is never cleared at all — it holds artifacts `mvn install:install-file` put there that no remote can hand back |
|
|
472
539
|
| 🩺 **`devp doctor`** | One read-only pass that ends by naming the *single* reason a repository would or would not be pruned. Runs no package manager, repairs nothing, safe to run twice. `devp doctor --fix` then mends what it found — installed-but-broken only |
|
|
473
540
|
| 🤖 **Self-installing automation** | OS-native scheduler (Task Scheduler, LaunchAgent, systemd user timer) and non-blocking Git hooks, installed at install time and restored after an upgrade. `auto_setup`, `auto_hooks`, `auto_daemon` or `DEV_PRUNE_NO_AUTO_SETUP=1` turn it off |
|
|
@@ -491,9 +558,10 @@ process that leaves a dirty working tree is a surprise.
|
|
|
491
558
|
| `devp undo` | :------------------------------------------------------------------ | Reverts the most recent `init` or `link` |
|
|
492
559
|
| `devp run [PATH]` | `--dry-run`, `--only`, `--skip`, `--except`, `--min-size`, `--json` | Prunes every registered repository, or one target |
|
|
493
560
|
| `devp status` | `--top N`, `--drift`, `--json` | Interactive dashboard; a plain table when there is no TTY. `--top N` shows only the N biggest repositories; `--drift` lists every environment holding packages its lockfile never recorded |
|
|
494
|
-
| `devp stats` | `--json` | What has already been reclaimed: lifetime total, prune passes, the last pass, and the biggest contributors |
|
|
561
|
+
| `devp stats` | `--json` | What has already been reclaimed: lifetime total from pruning, a separate lifetime total from `devp caches clear`, prune passes, the last pass, and the biggest contributors |
|
|
495
562
|
| `devp completions` | `bash`, `zsh`, `fish`, `powershell`, `elvish` | Prints a shell completion script to stdout, generated from the same argument definitions the binary parses with |
|
|
496
563
|
| `devp caches` | `clear <manager\|all>`, `--json` | Sizes every package manager cache on the machine and prints the command that clears each. The report deletes nothing and nothing on a schedule ever will; `clear` empties one when you type it, after asking |
|
|
564
|
+
| `devp caches docker` | `podman`, `nerdctl`, `containers [ENGINE]`, `--json` | What a container engine holds — images, containers, volumes, build cache — each sized, with what the engine calls reclaimable, then the prune commands. Read-only permanently: it prints them, you run them |
|
|
497
565
|
| `devp trust` | `--json` | What dev-prune may do on this machine: the guarantees the code enforces, then the scheduler, hooks and settings read live. Read-only |
|
|
498
566
|
| `devp restore [PATH]` | `--last-run` | Reinstalls dependencies for every project in a tree; `--last-run` undoes the last prune pass |
|
|
499
567
|
| `devp doctor [PATH]` | `--fix` | Diagnoses the installation, or one repository — ending with the single reason a pass would or would not touch it. `--fix` repairs what the checks found; it never performs a first-time install |
|
package/bin/dev-prune
CHANGED
|
Binary file
|
package/package.json
CHANGED