1pub const INIT_LONG: &str = "\
14Crawl the given directory trees for Git repositories and register every one found, up \
15to 8 levels deep. Registration is one entry in dev-prune's own registry file — nothing \
16in the repository is created, changed or deleted.
17
18After registering, it runs the same integration pass as `devp setup` (installing \
19whatever is missing, reporting whatever it skipped) and the same quiet release check \
20as `devp update`.
21
22Registration is what makes a repository visible to `devp run`, `devp status` and the \
23background pass. Repositories are never auto-discovered at prune time: what dev-prune \
24touches is exactly what you registered.";
25
26pub const INIT_EXAMPLES: &str = "\
27EXAMPLES:
28 devp init Register repositories under the current directory
29 devp init ~/Code Register everything under ~/Code
30 devp init ~/Code ~/Work/oss Multiple trees in one pass
31 devp scan ~/Code Same command — `scan` and `onboard` are aliases
32 DEV_PRUNE_NO_AUTO_SETUP=1 devp init ~/Code
33 Register repositories, install nothing
34
35UNDO:
36 devp undo Reverts the most recent init or link";
37
38pub const LINK_LONG: &str = "\
39Register one Git repository for pruning. The path defaults to `.`, so inside a \
40repository `devp link` is the whole command. Registration writes one entry to \
41dev-prune's registry; the repository itself is untouched.
42
43`--quiet` is the form the global Git hook invokes: it prints nothing (a hook fires \
44inside someone's commit, whose terminal is not dev-prune's to write to) and it skips \
45repositories whose `.devprune.json` sets `disable_hooks`, so a workspace that opted \
46out of auto-registration stays out.";
47
48pub const LINK_EXAMPLES: &str = "\
49EXAMPLES:
50 devp link Register the current directory
51 devp link ~/Code/my-app Register a repository by path
52 devp link . --quiet What the Git hook runs; silent, honours opt-outs
53
54UNDO:
55 devp undo Reverts the most recent init or link
56 devp unlink Unregister (keeps every file on disk)";
57
58pub const UNLINK_LONG: &str = "\
59Remove a repository from dev-prune's registry. This deletes the registry entry and \
60nothing else — no workspace file is touched, and the repository's `.devprune.json`, \
61if it has one, stays where it is.
62
63`--missing` removes every registered path whose directory no longer exists, instead \
64of one named repository. Deleted clones, reformatted drives and moved workspaces all \
65leave dead entries behind; `devp doctor` counts them in one warning and points here \
66rather than printing one `devp unlink` line per dead path.";
67
68pub const UNLINK_EXAMPLES: &str = "\
69EXAMPLES:
70 devp unlink Unregister the current directory
71 devp unlink ~/Code/old-app Unregister a repository by path
72 devp unlink --missing Drop every entry whose path no longer exists";
73
74pub const UNDO_LONG: &str = "\
75Revert the most recent `devp init` or `devp link`: whatever repositories that one \
76action registered are unregistered again. Only registration is undone — `undo` never \
77deletes files, and it is not the undo for a prune (that is `devp restore --last-run`).";
78
79pub const UNDO_EXAMPLES: &str = "\
80EXAMPLES:
81 devp undo Unregister whatever the last init/link registered
82
83RELATED:
84 devp restore --last-run The undo for a prune pass — reinstalls what it deleted";
85
86pub const RUN_LONG: &str = "\
87Execute a prune pass: across every registered repository with no path, or on one \
88repository with `devp run <path>`. Each repository goes through the same gauntlet, \
89and a directory is deleted only when every check passes:
90
91 1. `ignore.devprune.json` in the root, or `\"ignore\": true` — skipped instantly.
92 2. Idle check: last commit and newest source mtime, against `idle_days` (15 by
93 default). `--ignore-idle` lifts this one check and nothing else.
94 3. Project discovery: the root and up to `scan_depth` levels below it (6 by
95 default), so a monorepo's every package is found.
96 4. The package manager's own binary must be present — a directory whose manager
97 is missing cannot be verified, so it is not touched.
98 5. Lockfile verification: the manager itself confirms the lockfile can rebuild
99 the directory. No flag bypasses this, and none ever will.
100 6. Size floor (`min_size_mb` / `--min-size`), symlink refusal, nested-repository
101 refusal.
102
103Interactively, a registry-wide pass opens a selection TUI showing what would be \
104deleted before anything is; a targeted `devp run <path>` lists every directory with \
105its size and the total, notes that `devp restore` brings it back, and asks. Either \
106way `-y` skips the confirmation, `--dry-run` reports what a pass would do without \
107deleting anything at all, and without a terminal the run exits with an error naming \
108`--yes` rather than waiting on a prompt. Adapter names for `--only`/`--skip` are: npm, pnpm, yarn, bun, uv, \
109poetry, pdm, pipenv, venv, cargo, go, composer, bundler, cocoapods, mix, mix_build, \
110gradle, maven, swift, terraform, dart, vcpkg, cmake_build — an unknown name is an \
111error listing the valid ones, not a silently empty pass. cargo, gradle, maven, \
112swift, dart, mix_build, vcpkg and cmake_build are opt-in (`devp config set \
113enable_cargo true`) and idle-gated separately by `build_idle_days`, because a \
114build directory takes far longer to get back than a dependency directory. \
115`devp config wizard` switches them on by language, and can give any one adapter \
116its own idle window.
117
118`--except` is the safe spelling of \"clean up but keep the API project\": the named \
119repositories are never verified, never deleted and never restored, which beats \
120pruning them and downloading everything back. Entries match by full path or by \
121directory name, case-insensitively, `~` expanded.
122
123`--explain` answers \"why was that repository not pruned?\": every repository and \
124directory is listed with its verdict, including the states a normal pass keeps quiet \
125about — still active (with the actual age), opted out, under the size floor. It is \
126read-only and cannot be combined with `--json`.";
127
128pub const RUN_EXAMPLES: &str = "\
129EXAMPLES:
130 devp run --dry-run What would be pruned, and why the rest would not
131 devp run Prune across all registered repositories (asks first)
132 devp run -y Same, no confirmation prompt
133 devp run . Prune only the current repository (asks first)
134 devp run ~/Code/my-app --ignore-idle -y
135 Prune it even though it was touched recently
136 devp run --except api-service,~/Code/playground
137 Everything except the ones you name
138 devp run --only cargo,uv --dry-run
139 Only these package managers
140 devp run --skip venv --min-size 50
141 Skip venvs; ignore directories under 50 MiB
142 devp run --json --dry-run One JSON document on stdout (schema in CLI_REFERENCE)
143 devp run --explain Why each repository would or would not be pruned
144
145Run interactively with a terminal, `--json` also copies the document to the clipboard.
146A run in which any repository failed exits 1, even if others succeeded.";
147
148pub const STATUS_LONG: &str = "\
149The dashboard: every registered repository with its state (Candidate, Active, \
150Ignored, No Bloat, Path Missing, or an unreadable `.devprune.json`), its reclaimable \
151space, and its last activity. In a terminal this is an interactive TUI; piped or \
152redirected it prints a plain table; `--json` replaces either with one document and \
153changes nothing at all.
154
155Sizes are what deleting the directory actually gives back: bytes hardlinked into a \
156pnpm or bun store are measured per file and excluded, because the store keeps them.
157
158TUI KEYS:
159 Up/Down, j/k Move PgUp/PgDn Jump ten rows
160 Home/End, g/G First/last p Prune-select mode (candidates pre-selected)
161 Space Toggle row a Toggle all candidates
162 Enter Prune the selection i Toggle ignore in .devprune.json
163 Esc Leave mode / exit q, Ctrl-C Exit
164
165SHORTCUTS:
166 devp status daemon = devp config daemon status
167 devp status . hook = devp config hook . status";
168
169pub const STATUS_EXAMPLES: &str = "\
170EXAMPLES:
171 devp status The dashboard (TUI in a terminal, table when piped)
172 devp status --top 10 Only the ten biggest repositories; totals unaffected
173 devp status --drift What would a prune refuse on, and how to record it
174 devp status --json | jq '.totals.reclaimable_bytes'
175 Machine-readable; stdout carries the document only
176 devp status --top 5 --json The trim is reported as a top-level \"top\" field
177
178Run interactively with a terminal, `--json` also copies the document to the clipboard.";
179
180pub const STATS_LONG: &str = "\
181What dev-prune has already done, as opposed to what it could do next: lifetime space \
182reclaimed, how many prune passes there have been, the most recent pass and how to \
183undo it, the last passes, and the repositories that have given back the most. \
184Read-only — it reads the registry and touches nothing.";
185
186pub const STATS_EXAMPLES: &str = "\
187EXAMPLES:
188 devp stats The report
189 devp stats --json | jq '.lifetime.bytes_freed'
190 Lifetime bytes as a number
191
192Run interactively with a terminal, `--json` also copies the document to the clipboard.";
193
194pub const MAN_LONG: &str = "Render the manual, from the same clap definitions `--help` prints, so the manual cannot describe a flag the program does not have.
195
196`devp man` at a terminal prints the contents page: every command grouped by what it is for, one line each, plus the flags that go before the command and the exit codes. `devp man <command>` prints that one command's page — the same text `devp <command> --help` prints, because they are the same definition.
197
198The roff source is something `man` formats, not something a person reads, and on Windows there is no `man` to hand it to, so it appears only where something can use it: redirect or pipe the output and it is roff again, so `devp man > devp.1` and `devp man | man -l -` are unchanged. `--roff` forces roff at a terminal too.
199
200`--dir` writes the full set (`devp.1`, `dev-prune.1`, and one `devp-<command>.1` per subcommand) into a directory, ready to copy onto `manpath`.";
201
202pub const MAN_EXAMPLES: &str = "EXAMPLES:
203 devp man The contents page, on any platform
204 devp man run One command's page
205 devp man | man -l - Read it formatted by man (Linux/macOS)
206 devp man --roff > devp.1 Save the roff source
207 devp man run --roff > devp-run.1 Save one page's roff source
208 devp man --dir ./man Write the full set into ./man
209 sudo cp man/*.1 /usr/local/share/man/man1/ Install them system-wide";
210
211pub const COMPLETIONS_LONG: &str = "\
212Print a shell completion script to stdout — the script and nothing else, because the \
213output is meant to be redirected or eval'd and anything extra becomes a shell error \
214on every new terminal.
215
216The script is generated from the same argument definition the binary parses with, so \
217a flag cannot exist in one and be missing from the other. It completes whichever name \
218invoked it: `devp completions bash` completes `devp`, `dev-prune completions bash` \
219completes `dev-prune` — generate one for each name you actually type.";
220
221pub const COMPLETIONS_EXAMPLES: &str = "\
222EXAMPLES:
223 source <(devp completions bash) Bash, current shell
224 devp completions bash > ~/.local/share/bash-completion/completions/devp
225 devp completions zsh > ~/.zfunc/_devp Zsh (a directory on $fpath)
226 devp completions fish > ~/.config/fish/completions/devp.fish
227 devp completions powershell | Out-File -Append -Encoding utf8 $PROFILE
228 PowerShell, permanently";
229
230pub const CACHES_LONG: &str = "\
231Find every package-manager cache and store on the machine, size each one, and print \
232the command that clears it — largest first, with a total. On its own it deletes \
233nothing, and nothing that runs on a schedule ever will: a cache is shared by every \
234repository, so no single lockfile can prove its contents recoverable, which is the \
235bar every dev-prune deletion has to clear. Clearing one also turns the next `devp \
236restore` into a download.
237
238`devp caches clear <manager>` runs the command this table prints, after showing you \
239what goes and asking.
240
241Covered: npm, pnpm, yarn, bun, uv, pip, conda, cargo, go, maven, gradle, nuget, vcpkg, \
242conan, composer, cocoapods and hex. Each manager is asked where its cache is (`npm \
243config get cache`, `go env GOMODCACHE`, …) rather than assumed, with read-only queries \
244run from your home directory; a manager that is not installed falls back to the \
245conventional location, because a cache left behind by an uninstalled manager is \
246exactly the multi-gigabyte directory nobody remembers.";
247
248pub const CACHES_EXAMPLES: &str = "\
249EXAMPLES:
250 devp caches The table, largest first, with clear commands
251 devp caches --json | jq '.summary.total_bytes'
252 Machine-readable
253 devp caches clear npm Empty one, after asking
254 devp caches clear all --dry-run What would go, and nothing touched
255
256Run interactively with a terminal, `--json` also copies the document to the clipboard.";
257
258pub const CACHES_DOCKER_LONG: &str = "\
259What the engine is holding, in its own words: images, containers, local volumes and build cache, each with a count, a size, and how much of that size it believes it could give back. Then the commands that would give it back, narrowest first.
260
261Read-only, permanently. dev-prune deletes only what a lockfile proves it can rebuild, and nothing here clears that bar: an image's registry tag can be retagged or deleted, the Dockerfile that built it may not be on this disk, and a named volume is the one thing on the machine that is not reproducible at all. So this prints the prune commands and never runs them, with or without `--yes`.
262
263The numbers come from the engine's own `system df` rather than from a directory walk. On Docker Desktop and Podman the store lives inside a VM disk image the host cannot see, and `~/.docker` is configuration rather than data — a size taken off the filesystem would be wrong by orders of magnitude, in the reassuring direction. Asking the engine is also the only way to learn what is *reclaimable*, which is the figure that decides anything: 40 GB of images with 38 GB dangling is a different situation from 40 GB with 2 GB dangling.
264
265An engine that is installed with its daemon stopped is reported as exactly that, in the engine's own words, rather than as an absence.";
266
267pub const CACHES_CONTAINERS_LONG: &str = "\
268The same read-only report as `devp caches docker`, for every container engine on this machine — docker, podman and nerdctl — or for the one you name.
269
270Local Kubernetes clusters are listed by name and deliberately not sized. kind, k3d and minikube run their nodes as containers, or as a VM disk belonging to an engine already in the table, so their disk is counted there. A figure beside the cluster name would be the same gigabytes twice. Delete one with its own tool — `kind delete cluster`, `minikube delete`, `k3d cluster delete` — which is what actually releases the space. The cluster list is read out of your kubeconfig with `kubectl config get-contexts`, which contacts nothing: a context pointing at a production cluster is filtered out by name here rather than by being dialled.";
271
272pub const CACHES_CONTAINERS_EXAMPLES: &str = "\
273EXAMPLES:
274 devp caches docker Images, containers, volumes, build cache
275 devp caches podman The same, for Podman
276 devp caches containers Every engine installed, plus local clusters
277 devp caches containers nerdctl Just that one
278 devp caches docker --json | jq '.summary.reclaimable_bytes'
279 Machine-readable
280
281Nothing here deletes anything. The prune commands are printed for you to run.";
282
283pub const CACHES_CLEAR_LONG: &str = "\
284Empty one manager's cache, or every one of them. What is about to go is listed and \
285sized first, and unless `--yes` answers for you, it asks.
286
287This is a convenience, not automation. No scheduler, no Git hook and no `devp run` \
288will ever clear a cache — this only runs when you type it.
289
290Wherever the manager ships its own subcommand, that is what runs: `npm cache clean \
291--force`, `pnpm store prune`, `go clean -modcache`. The manager knows what is still \
292referenced, which a directory delete cannot work out, and its own bookkeeping stays \
293consistent. cargo, gradle, vcpkg and hex ship nothing equivalent, so those \
294are cleared by removing the directory this command resolved and sized — never a string \
295handed to a shell.
296
297Maven is reported and never cleared. `~/.m2/repository` is an install target as \
298well as a download cache — `mvn install:install-file` puts artifacts there that no \
299remote can hand back — so dev-prune sizes it and prints `rm -rf ~/.m2/repository` \
300for you to run. `clear maven` says so and stops; `clear all` skips it.
301
302Two flags narrow what `all` means, so you do not have to pick the caches by hand. \
303`--over-cap` keeps only the managers that have outgrown the ceiling you set in \
304`cache_max_gb`; with no cap set anywhere it clears nothing and says so. `--unused` keeps \
305only the managers that no registered repository uses — a cache with nothing behind it \
306was filled for projects that are not on this disk any more. It counts only repositories \
307dev-prune knows about, so `devp link` anything you keep outside the registry first, and \
308it refuses to run at all when there are no registered repositories to check against.
309
310Nothing else in a cache is lost; every manager re-downloads what it needs. What it costs \
311is time, in every project on the machine, on the next install and the next `devp \
312restore`. The freed size reported afterwards is measured rather than assumed, because \
313a `prune` keeps what is still in use.";
314
315pub const CACHES_CLEAR_EXAMPLES: &str = "\
316EXAMPLES:
317 devp caches clear npm One manager, after confirming
318 devp caches clear cargo Both cargo rows: the registry cache and its sources
319 devp caches clear all --dry-run Everything that would go, and nothing touched
320 devp caches clear all --over-cap
321 Only the ones past their cache_max_gb
322 devp caches clear all --unused Only the ones no registered repository uses
323 devp caches clear all --yes No prompt, for a script
324 devp caches clear go --json --yes
325 Machine-readable (`--json` requires `--yes`)
326
327Exit code 1 if any cache could not be cleared; the rows are printed either way.
328Exit code 2 for `maven`, which is reported but never cleared.";
329
330pub const TRUST_LONG: &str = "\
331What dev-prune is allowed to do on this machine, on one screen. Read-only — it reads \
332the registry and the OS and changes nothing.
333
334Two sections, and the split is the point. The first is guaranteed by the code: the \
335seven safety invariants plus the two questions asked as often as any of them — there \
336is no telemetry endpoint, and build output is never deleted. Those rows read the same \
337on every machine and have no setting and no flag behind them. The second is read live \
338off this machine: whether the scheduler is installed, whether the Git hooks register \
339repositories on their own, how many repositories are registered, and the settings that \
340widen what may happen without you asking for it.
341
342There is no letter grade. A report that says `trust level: MEDIUM` tells you nothing \
343you can act on, so the widened settings are named instead — `devp config show` has \
344every one of them, and `devp config set <key> <value>` puts one back.
345
346The long form of the guarantees is docs/SAFETY_INVARIANTS.md.";
347
348pub const TRUST_EXAMPLES: &str = "\
349EXAMPLES:
350 devp trust The report
351 devp trust --json | jq '.summary.widened'
352 Just the settings that widen what may happen
353 devp trust --json | jq -e '.summary.widened_count == 0'
354 Exit 1 from jq if this machine has widened anything
355
356Run interactively with a terminal, `--json` also copies the document to the clipboard.";
357
358pub const CONFIG_LONG: &str = "\
359Everything configurable lives under here: global settings (get/set/show/wizard), the \
360per-repository `.devprune.json` (project), the OS background scheduler (daemon), the \
361global Git auto-registration hooks (hook), and the file-manager icon registration \
362(icon).
363
364SHORTHANDS — `daemon`, `hook` and `icon` work without the leading `config`, and the \
365action words people reach for are accepted:
366 devp hook install = devp config hook enable
367 devp hook uninstall = devp config hook disable
368 devp daemon on / off = devp config daemon enable / disable
369 devp icon = devp config icon
370Accepted action words: enable/install/on, disable/uninstall/remove/off, status/show. \
371Anything else is rejected — a mistyped action never silently degrades into a status \
372report.";
373
374pub const CONFIG_EXAMPLES: &str = "\
375EXAMPLES:
376 devp config show Every global setting and its value
377 devp config get idle_days One setting
378 devp config set idle_days 30 Change it (rejects out-of-range values)
379 devp config recommended Turn on everything the first run recommends
380 devp config wizard Walk through every setting, Enter keeps the current
381 devp config project . Inspect or create this repo's .devprune.json
382 devp config daemon status Is the background pass scheduled?
383 devp config . daemon disable Opt this repository out of the background pass
384 devp config hook enable --chain Take core.hooksPath, forwarding to the tool holding it
385 devp config icon Register the .devprune.json icon and schema";
386
387pub const CONFIG_GET_LONG: &str = "\
388Print one global setting's current value. The keys, defaults and meanings:
389
390 idle_days 15 Days untouched before a repo is a candidate
391 min_size_mb 0 Smallest directory worth deleting (0 = no floor)
392 scan_depth 6 Directory levels below a repo root discovery descends (1-32)
393 require_confirmation true Whether a prune pass asks before deleting
394 allow_manifest_rewrite false Whether verification may repair a drifted lockfile
395 command_timeout_secs 600 Ceiling on any one package-manager command
396 auto_setup true Whether the integration pass may run unattended
397 auto_daemon true …and may register the OS scheduler
398 check_interval_days 2 How often the scheduler runs a pass
399 auto_hooks true …and may install the global Git hooks
400 auto_hooks_chain false …and may chain onto another tool's core.hooksPath
401 update_check true Whether the periodic release check runs
402 update_check_interval_days 7 Minimum gap between two release checks
403 update_check_timeout_secs 5 How long that one request may hang
404
405Three have a per-repository override in `.devprune.json`, where they win for that \
406tree only: `idle_days` (spelled `override_idle_days` there), `min_size_mb` and \
407`scan_depth`. The rest are deliberately global — a committed `.devprune.json` must \
408not be able to grant a repository `allow_manifest_rewrite` over its own manifests.";
409
410pub const CONFIG_GET_EXAMPLES: &str = "\
411EXAMPLES:
412 devp config get idle_days
413 devp config get update_check";
414
415pub const CONFIG_SET_LONG: &str = "\
416Change one global setting. A value outside the accepted range is rejected with the \
417range in the message, never silently clamped — `scan_depth 0` and `scan_depth 40` are \
418both refused outright. Keys are the same list `devp config get --help` shows.";
419
420pub const CONFIG_SET_EXAMPLES: &str = "\
421EXAMPLES:
422 devp config set idle_days 30
423 devp config set min_size_mb 50
424 devp config set command_timeout_secs 1200
425 devp config set update_check false Turn the release check off for good";
426
427pub const CONFIG_SHOW_LONG: &str = "\
428Print every global setting with its current value. With `--update`, also run a sync \
429pass across all registered repositories, refreshing each one's `.devprune.json` \
430scaffolding without touching values you have changed.";
431
432pub const CONFIG_SHOW_EXAMPLES: &str = "\
433EXAMPLES:
434 devp config show
435 devp config show --update";
436
437pub const CONFIG_PROJECT_LONG: &str = "\
438Inspect a repository's `.devprune.json`, or create it when missing. The file holds \
439the per-repository overrides — `override_idle_days`, `min_size_mb`, `scan_depth`, \
440`ignore`, `disable_daemon`, `disable_hooks` — and carries a `$schema` line so any \
441editor with JSON Schema support validates and completes it.
442
443`--update` refreshes the file's scaffolding (schema pointer, missing keys) while \
444keeping every value you have set. A file that does not parse is refused, not reset — \
445fix it, or pass `--update` deliberately.
446
447Writing the file also records it in the repository's `.git/info/exclude`, so the \
448config — one machine's preference, not part of the project — never shows up in \
449`git status`. The shared, tracked `.gitignore` is never modified.
450
451`--team` addresses `project.devprune.json` instead: same keys, same schema, and \
452deliberately not excluded, because it is the half meant to be committed. Every key it \
453names wins over `.devprune.json`; every key it leaves out is still yours to answer. It \
454is created empty apart from the schema line for that reason. Nothing dev-prune writes \
455on your behalf ever edits it.
456
457Both files can also carry `prunable.directories`: directories no lockfile describes, \
458each with the `rebuild` command that puts it back. Unlike every other key, the two \
459files' lists add up rather than one winning — a team declaration never discards your \
460own. Before deleting one, dev-prune checks that it is inside the repository, that Git \
461is tracking nothing in it, and that the rebuild command's tool is on this machine.
462
463`prunable.exclude` lists declared paths to leave alone on this machine, whoever \
464declared them — how you keep a directory the committed file calls rebuildable without \
465editing a file the whole team shares. Spelled the same way as a `path`, and honoured \
466from whichever file names it, because a veto only ever deletes less. Naming one path in \
467both lists of the *same* file is a typo rather than a decision — the exclusion still \
468wins, so the declaration never runs — and `devp doctor` says so.
469
470Both files are read from the repository root and nowhere else, because the paths inside \
471them are relative to that root. A copy one directory down parses and does nothing at \
472all; `devp doctor` names it rather than moving it, since moving it would change what \
473every path inside it means.";
474
475pub const CONFIG_PROJECT_EXAMPLES: &str = "\
476EXAMPLES:
477 devp config project . Show (or create) this repository's config
478 devp config project ~/Code/api
479 devp config project . --update Refresh scaffolding, keep your values
480 devp config project . --team Create the committed project.devprune.json";
481
482pub const CONFIG_DAEMON_LONG: &str = "\
483The OS background scheduler — Task Scheduler on Windows, launchd on macOS, systemd \
484timers on Linux — which runs `devp run --daemon` every `check_interval_days` days.
485
486Globally: `enable` registers the schedule, `disable` removes it, `status` reports \
487it. With a path first, the same words act on one repository via `disable_daemon` in \
488its `.devprune.json`: the machine-wide pass keeps running, that repository sits it \
489out.";
490
491pub const CONFIG_DAEMON_EXAMPLES: &str = "\
492EXAMPLES:
493 devp daemon status Machine-wide scheduler state
494 devp daemon enable Register the schedule (also: install, on)
495 devp daemon disable Remove it (also: uninstall, remove, off)
496 devp config . daemon disable This repository opts out of the background pass
497 devp config ~/Code/api daemon enable";
498
499pub const CONFIG_HOOK_LONG: &str = "\
500The global Git hooks (via `core.hooksPath`) that auto-register any repository you \
501commit in — `devp link --quiet`, silent, honouring opt-outs. `enable` installs them, \
502`disable` removes them (restoring what was there), `status` reports them. With a \
503path first, the same words act on one repository via `disable_hooks`.
504
505Git has exactly one global `core.hooksPath` and no way to chain two, so a tool that \
506holds it (husky, pre-commit, lefthook) shuts every other one out. `--chain` is the \
507way through: dev-prune takes the slot and writes, per hook, a shim that does its own \
508work and then execs the same-named hook in the displaced directory — their hooks \
509keep firing, their exit codes still block commits. `devp hook uninstall` puts the \
510original back. The chain snapshots the other tool's hooks at install time; `devp \
511hook status` reports any that have drifted, and `devp hook install --chain` rebuilds.";
512
513pub const CONFIG_HOOK_EXAMPLES: &str = "\
514EXAMPLES:
515 devp hook status Installed? Chained? Drifted?
516 devp hook install Take the free core.hooksPath slot
517 devp hook install --chain Take a slot husky/pre-commit/lefthook holds, forwarding
518 devp hook uninstall Restore the previous core.hooksPath
519 devp config . hook disable This repository opts out of auto-registration";
520
521pub const CONFIG_ICON_LONG: &str = "\
522Register `*.devprune.json` with the OS file manager and write the icon files and the \
523JSON Schema into the config directory. On Linux this is a complete registration \
524(shared-mime-info plus hicolor icons — Nautilus, Dolphin, Thunar, Nemo, PCManFM). On \
525Windows, Explorer resolves icons by last extension only, so the config folder gets \
526its own icon instead of hijacking every `.json` on the machine. On macOS a UTI must \
527come from an application bundle, which a single binary is not.
528
529It also prints an editor snippet to paste yourself — it never edits your editor \
530settings, your PATH, or your shell startup files.";
531
532pub const CONFIG_ICON_EXAMPLES: &str = "\
533EXAMPLES:
534 devp icon Same command, without the leading `config`";
535
536pub const CONFIG_RECOMMENDED_LONG: &str = "\
537Turn on everything the first run recommends, without sitting through the first run.
538
539The recommendations are the adapters and behaviours that are off by default because \
540they are not universally wanted, not because they are risky: Cargo, Gradle, Maven, \
541Swift, Dart, Mix builds, vcpkg and CMake builds. Accepting them all is one command \
542here and one keypress in `devp config wizard`, and both read the same list, so the \
543two can never drift apart.
544
545One recommendation is held back: `allow_manifest_rewrite` lets `cargo` and `go` tidy \
546up their own manifests during a restore, which edits files in your working tree. \
547That is worth having and it is worth knowing about first, so it arrives only when \
548you type --with-cautious. Everything printed is also printed by `devp config show`, \
549which lists whatever you have not taken yet.
550
551Nothing here is irreversible: `devp config set <key> false` puts any of it back, and \
552this command never marks the settings as reviewed — the walkthrough you skipped is \
553still owed to you, and will still open.";
554
555pub const CONFIG_RECOMMENDED_EXAMPLES: &str = "\
556EXAMPLES:
557 devp config recommended Everything recommended without a caveat
558 devp config recommended --with-cautious That, plus allow_manifest_rewrite
559 devp config show What is still outstanding
560 devp config set enable_cargo false Put one back";
561
562pub const CONFIG_WIZARD_LONG: &str = "\
563Open every global setting in a full-screen configurator, with the `devp trust` \
564declaration in front of it: what this tool is allowed to do is on screen before any \
565of it is configurable.
566
567Enter is the \"keep going\" key: on a row with an untaken recommendation it takes \
568that advice and moves on, on any other row it just moves on, and on the Finish line \
569it opens a summary of exactly what will be written — one more Enter writes it. So \
570holding nothing but Enter reviews every setting, accepts the safe recommendations, \
571and finishes. The walk never takes the cautious tier (`allow_manifest_rewrite`); \
572turning that on stays a deliberate Space on its row. Arrows move without accepting \
573anything; Space changes the highlighted setting — a toggle flips, a number opens a \
574field, `disabled_adapters` opens the adapter checklist; `r` puts one back. `q` \
575leaves without saving anything, from anywhere.
576
577`devp config recommended` is the one-command version of the suggestions screen, for \
578when you know what you want and do not want to walk the list.
579
580It runs itself once on a first install — so the defaults are something you agreed \
581to, not something you inherited — and again after an upgrade adds a setting this \
582machine has never been shown, which it marks NEW and opens on. Settings you have \
583already confirmed are never re-asked.
584
585It never runs unattended: no TTY means skipped, not guessed at. `--no-tui`, and the \
586DEV_PRUNE_NO_TUI environment variable, ask one question per line instead — for \
587terminals the full-screen view cannot drive, and for agents, which hold a real \
588terminal and will never press a key. To configure this tool from a script, use \
589`devp config set <key> <value>`, which needs no terminal at all.";
590
591pub const CONFIG_WIZARD_EXAMPLES: &str = "\
592EXAMPLES:
593 devp config wizard
594 devp config wizard --no-tui One question per line
595 devp config set disabled_adapters go Leave Go projects alone entirely
596 devp config set disabled_adapters - Every adapter active again";
597
598pub const RESTORE_LONG: &str = "\
599Put dependencies back: detect each project's lockfile and run its manager's install \
600(`npm ci`, `pnpm install`, `uv sync`, `cargo fetch`, …). Mirrors pruning — every \
601project in the tree is restored, each by its own manager, so a monorepo comes back \
602whole.
603
604`--last-run` restores exactly what the most recent prune pass deleted, across every \
605repository it touched, and nothing else: the undo for a `devp run`. Each prune \
606records what it removed (a dry run records nothing), and the flag fails cleanly if \
607no pass has been recorded yet. It cannot be combined with a path — silently ignoring \
608the path would restore the wrong thing.";
609
610pub const RESTORE_EXAMPLES: &str = "\
611EXAMPLES:
612 devp restore Restore the current directory's projects
613 devp restore ~/Code/my-app
614 devp restore --last-run Undo the last prune pass, everywhere it acted";
615
616pub const UPDATE_LONG: &str = "\
617Print the installed version, ask GitHub's public API for the latest release, and \
618show the upgrade command for how this copy was installed. `--install` runs the upgrade through the \
619package manager that owns this copy (cargo, npm, bun, pnpm, yarn, uv, pipx, or the \
620installer script). `--channels` prints the command for every channel instead of only \
621this one, and touches nothing. `auto_update` is on by default and does the verified-download half by \
622itself at the end of a prune pass when a newer release is known — never the \
623package-manager half, and nothing at all on WinGet, Scoop and Homebrew, where the \
624manager owns the upgrade; `devp config set auto_update false` stops it. An upgrade never interrupts the \
625scheduler: the scheduled pass runs a managed copy that refreshes itself from the \
626new binary on its next run.
627
628`devp config set version_lock true` outranks all of it. While the pin is on this \
629copy stays on the version it is: `auto_update` does not run however it is set, \
630`--install` refuses, `devp install --channel` refuses because moving channels \
631installs the latest release, and the install scripts leave the binary alone. \
632No flag bypasses it -- `devp config set version_lock false` is the way back.
633
634The same check also runs quietly from `devp run` and `devp status`, at most once \
635every `update_check_interval_days` (7 by default), printing one line only when a \
636newer version exists. It is the only thing in dev-prune that opens a network \
637connection, sends no body and no identifier, and `devp config set update_check \
638false` turns it off for good; `--offline` skips it for one run without changing the \
639setting.";
640
641pub const UPDATE_EXAMPLES: &str = "\
642EXAMPLES:
643 devp update Version, latest release, upgrade command
644 devp update --install Upgrade now, through the owning channel
645 devp update --channels Every channel's upgrade command, no network
646 devp update --offline No network this run";
647
648pub const INSTALL_LONG: &str = "\
649Move this installation from one package manager to another.
650
651`devp update` always upgrades the copy that is running, through whichever channel \
652installed it. This command changes *which* channel owns it: it installs through the \
653manager you name, then removes the old copy through the manager that put it there — in \
654that order, so a failed install leaves the working copy untouched.
655
656Removing the old copy through its own manager, rather than deleting the file, is the \
657point: uv, pipx, npm, cargo and the rest each keep a record of what they installed, and \
658a manager whose record still says dev-prune is there will put the old binary back.
659
660bun, pnpm and yarn install the same npm package and are each their own channel, not \
661npm. A copy `bun add -g dev-prune` put in place is upgraded with bun and removed with \
662bun; running npm against it installs a second copy under npm's prefix and leaves the \
663first one stale and still on PATH.
664
665Nothing is migrated, because nothing needs to be. Settings, the repository registry and \
666the undo history live in the config directory, which no package manager owns.
667
668With no `--channel` it prints which manager installed this copy and what `--channel` \
669accepts. `--dry-run` prints the commands without running any of them.";
670
671pub const INSTALL_EXAMPLES: &str = "\
672EXAMPLES:
673 devp install Which channel owns this copy
674 devp install --channel winget --dry-run Print the plan, change nothing
675 devp install --channel uv Move onto uv, and remove the old copy
676 devp install --channel cargo --yes Skip the confirmation prompt";
677
678pub const SKILL_LONG: &str = "\
679Teach your AI assistant this tool. Exports SKILL.md — the full agent-facing manual: \
680every command, the JSON contracts, the safety invariants, the troubleshooting tree — \
681into the config directory, installs it into any detected agent skills directory \
682(`~/.claude/skills/dev-prune/`, the same install `devp setup` performs), and prints \
683ready-to-copy onboarding prompts for assistants without one (Gemini Antigravity, \
684Cursor, Windsurf, Copilot, OpenClaw).
685
686`--agent <EDITOR>` instead writes per-repository rules into the current repository, in \
687the file that editor's agent reads. Ten editors get a file of their own — cursor, \
688windsurf, antigravity, cline, roo, kilocode, continue, amazon-q, kiro, trae — and six \
689share a file with other tools, so dev-prune owns a marked block inside it: agents-md \
690(`AGENTS.md`, the cross-tool convention Codex, Jules, Amp and OpenCode read), copilot \
691(`.github/copilot-instructions.md`), gemini (`GEMINI.md`), junie \
692(`.junie/guidelines.md`), zed (`.rules`) and aider (`CONVENTIONS.md`, the one file its \
693editor does not read by finding it — writing it prints the `read: CONVENTIONS.md` line \
694that makes Aider load it). Every byte outside the markers is left as found. \
695`devp skill --help` lists each value with its exact path. Claude Code needs no \
696per-repository file — its skill installs globally.";
697
698pub const SKILL_EXAMPLES: &str = "\
699EXAMPLES:
700 devp skill Export SKILL.md, print onboarding prompts
701 devp skill --agent cursor Write .cursor/rules/dev-prune.mdc here
702 devp skill --agent agents-md Upsert the marked block in AGENTS.md";
703
704pub const SETUP_LONG: &str = "\
705Install whatever integration is missing and leave the rest alone: the `devp` alias, \
706the managed binary directory on your PATH (a user PATH entry on Windows, \
707`~/.local/bin` symlinks elsewhere — what keeps `devp` working after the venv or npx \
708cache it came from disappears), the exported SKILL.md and its agent-directory \
709install, the file-manager icon registration, the global Git hooks, and the OS \
710scheduler. Safe to run repeatedly: it is the same pass the install scripts run, the \
711same one `devp init` runs, and the same one that runs by itself on the first command \
712after an upgrade.
713
714It skips rather than forces: Git hooks when `git` is missing or another tool holds \
715`core.hooksPath` (take the slot with `devp hook install --chain`), the alias when \
716the running process is `devp` itself on Windows, and anything switched off by \
717`auto_setup`, `auto_hooks`, `auto_daemon` or `DEV_PRUNE_NO_AUTO_SETUP=1`.
718
719When a VS Code-family editor is on your PATH (VS Code, VSCodium, Cursor, Windsurf, \
720Positron, Kiro, or an Insiders build) and the dev-prune extension is not installed, \
721one run also asks — once ever, only at a terminal — whether to install it into each \
722editor found. Each editor installs from its own registry; when a fork's registry does \
723not carry the extension, the `.vsix` from the extension's own newest release is \
724installed instead. Decline and it never asks again; install it yourself later with \
725`code --install-extension VKrishna04.dev-prune`.";
726
727pub const SETUP_EXAMPLES: &str = "\
728EXAMPLES:
729 devp setup Install what is missing, report what was skipped
730 devp setup --status Report only; change nothing
731 DEV_PRUNE_NO_AUTO_SETUP=1 devp init ~/Code
732 Register repositories, install nothing";
733
734pub const DOCTOR_LONG: &str = "\
735One read-only pass that answers \"why is this not doing what I expect\". Without a \
736path it checks the installation: binary and twin, PATH, registry health, every \
737stored setting revalidated, SKILL.md, icons, hooks, scheduler, the package-manager \
738binaries your repositories actually need, and the release-check state. With a path \
739it checks that repository and ends by naming the single reason a prune would or \
740would not touch it.
741
742`--fix` is diagnosis first, then treatment — and it mends installed-but-broken only: \
743a stale or missing `devp` twin, a missing SKILL.md export, hooks or a scheduler \
744whose recorded binary moved, a drifted hook chain, and registry entries whose \
745repository is gone. Each repair is the corresponding `devp setup` pass re-run, so a \
746repair can never do more than setup itself would. It never performs a first-time \
747install, and never touches an unreadable registry — a parse failure is for you to \
748look at, not for a tool to guess at.
749
750EXIT CODES: 0 when everything works, warnings included — a missing scheduler should \
751not fail a script. 1 only for genuine breakage: an unreadable registry, an \
752out-of-range setting, a dead registered path, a directory that is not a Git \
753repository. `--fix` exits 1 when any repair failed or was out of reach.";
754
755pub const DOCTOR_EXAMPLES: &str = "\
756EXAMPLES:
757 devp doctor Check the installation
758 devp doctor . Why would a prune touch (or skip) this repository?
759 devp doctor ~/Code/api
760 devp doctor --fix Repair what the installation check finds broken";
761
762pub const UNINSTALL_LONG: &str = "\
763Remove dev-prune from the machine: the OS scheduler, the global Git hooks (only if \
764`core.hooksPath` still points at dev-prune), the file-type icons, the installed \
765agent skill, the PATH entry (or `~/.local/bin` symlinks), and the binaries — the \
766managed pair, the copy you invoked, and, with your confirmation, every other copy \
767found on PATH or in the well-known install directories (`~/.cargo/bin`, \
768`~/.local/bin`, npm's global directory, pip's Scripts directories). A copy owned by \
769a package manager is listed with its manager, and after removal the manager's own \
770uninstall command is printed so its records can be cleared too.
771
772On Windows, where a running executable cannot delete itself, a detached helper \
773removes the last files a few seconds after the command exits — no reboot, no closed \
774terminal.
775
776Without `--deep` the configuration survives, so a reinstall picks up where you left \
777off. With `--deep` the global config folder and every registered repository's \
778`.devprune.json` go too; that asks for confirmation, and refuses outright with no \
779terminal to ask on unless `-y` is passed. Exits 1 if anything could not be removed, \
780naming each leftover.";
781
782pub const UNINSTALL_EXAMPLES: &str = "\
783EXAMPLES:
784 devp uninstall Remove the program; keep config for a reinstall
785 devp uninstall --deep Also wipe config and per-repo .devprune.json (asks)
786 devp uninstall --deep -y Non-interactive; also confirms the stray-copy sweep";