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 selection TUI shows what would be deleted before anything is; `-y` \
104skips the confirmation, and `--dry-run` reports what a pass would do without deleting \
105anything at all. Adapter names for `--only`/`--skip` are: npm, pnpm, yarn, bun, uv, \
106venv, poetry, pdm, pipenv, cargo, go, composer, bundler, cocoapods, mix, gradle, \
107maven, swift — an unknown name is an error listing the valid ones, not a silently \
108empty pass. gradle, maven and swift are opt-in (`devp config set enable_gradle \
109true`) and idle-gated separately by `build_idle_days`, because a build directory \
110takes far longer to get back than a dependency directory.
111
112`--except` is the safe spelling of \"clean up but keep the API project\": the named \
113repositories are never verified, never deleted and never restored, which beats \
114pruning them and downloading everything back. Entries match by full path or by \
115directory name, case-insensitively, `~` expanded.
116
117`--explain` answers \"why was that repository not pruned?\": every repository and \
118directory is listed with its verdict, including the states a normal pass keeps quiet \
119about — still active (with the actual age), opted out, under the size floor. It is \
120read-only and cannot be combined with `--json`.";
121
122pub const RUN_EXAMPLES: &str = "\
123EXAMPLES:
124 devp run --dry-run What would be pruned, and why the rest would not
125 devp run Prune across all registered repositories (asks first)
126 devp run -y Same, no confirmation prompt
127 devp run . Prune only the current repository
128 devp run ~/Code/my-app --ignore-idle -y
129 Prune it even though it was touched recently
130 devp run --except api-service,~/Code/playground
131 Everything except the ones you name
132 devp run --only cargo,uv --dry-run
133 Only these package managers
134 devp run --skip venv --min-size 50
135 Skip venvs; ignore directories under 50 MiB
136 devp run --json --dry-run One JSON document on stdout (schema in CLI_REFERENCE)
137 devp run --explain Why each repository would or would not be pruned
138
139Run interactively with a terminal, `--json` also copies the document to the clipboard.
140A run in which any repository failed exits 1, even if others succeeded.";
141
142pub const STATUS_LONG: &str = "\
143The dashboard: every registered repository with its state (Candidate, Active, \
144Ignored, No Bloat, Path Missing, or an unreadable `.devprune.json`), its reclaimable \
145space, and its last activity. In a terminal this is an interactive TUI; piped or \
146redirected it prints a plain table; `--json` replaces either with one document and \
147changes nothing at all.
148
149Sizes are what deleting the directory actually gives back: bytes hardlinked into a \
150pnpm or bun store are measured per file and excluded, because the store keeps them.
151
152TUI KEYS:
153 Up/Down, j/k Move PgUp/PgDn Jump ten rows
154 Home/End, g/G First/last p Prune-select mode (candidates pre-selected)
155 Space Toggle row a Toggle all candidates
156 Enter Prune the selection i Toggle ignore in .devprune.json
157 Esc Leave mode / exit q, Ctrl-C Exit
158
159SHORTCUTS:
160 devp status daemon = devp config daemon status
161 devp status . hook = devp config hook . status";
162
163pub const STATUS_EXAMPLES: &str = "\
164EXAMPLES:
165 devp status The dashboard (TUI in a terminal, table when piped)
166 devp status --top 10 Only the ten biggest repositories; totals unaffected
167 devp status --drift What would a prune refuse on, and how to record it
168 devp status --json | jq '.totals.reclaimable_bytes'
169 Machine-readable; stdout carries the document only
170 devp status --top 5 --json The trim is reported as a top-level \"top\" field
171
172Run interactively with a terminal, `--json` also copies the document to the clipboard.";
173
174pub const STATS_LONG: &str = "\
175What dev-prune has already done, as opposed to what it could do next: lifetime space \
176reclaimed, how many prune passes there have been, the most recent pass and how to \
177undo it, the last passes, and the repositories that have given back the most. \
178Read-only — it reads the registry and touches nothing.";
179
180pub const STATS_EXAMPLES: &str = "\
181EXAMPLES:
182 devp stats The report
183 devp stats --json | jq '.lifetime.bytes_freed'
184 Lifetime bytes as a number
185
186Run interactively with a terminal, `--json` also copies the document to the clipboard.";
187
188pub const MAN_LONG: &str = "\
189Render the manual as man pages, from the same clap definitions `--help` prints, so the \
190manual cannot describe a flag the program does not have. With no arguments the main \
191`devp(1)` page goes to stdout, ready to pipe into `man -l -`; `--dir` writes the full \
192set (`devp.1`, `dev-prune.1`, and one `devp-<command>.1` per subcommand) into a \
193directory, ready to copy onto `manpath`.";
194
195pub const MAN_EXAMPLES: &str = "\
196EXAMPLES:
197 devp man | man -l - Read the main page now (Linux/macOS)
198 devp man --dir ./man Write the full set into ./man
199 sudo cp man/*.1 /usr/local/share/man/man1/ Install them system-wide";
200
201pub const COMPLETIONS_LONG: &str = "\
202Print a shell completion script to stdout — the script and nothing else, because the \
203output is meant to be redirected or eval'd and anything extra becomes a shell error \
204on every new terminal.
205
206The script is generated from the same argument definition the binary parses with, so \
207a flag cannot exist in one and be missing from the other. It completes whichever name \
208invoked it: `devp completions bash` completes `devp`, `dev-prune completions bash` \
209completes `dev-prune` — generate one for each name you actually type.";
210
211pub const COMPLETIONS_EXAMPLES: &str = "\
212EXAMPLES:
213 source <(devp completions bash) Bash, current shell
214 devp completions bash > ~/.local/share/bash-completion/completions/devp
215 devp completions zsh > ~/.zfunc/_devp Zsh (a directory on $fpath)
216 devp completions fish > ~/.config/fish/completions/devp.fish
217 devp completions powershell | Out-File -Append -Encoding utf8 $PROFILE
218 PowerShell, permanently";
219
220pub const CACHES_LONG: &str = "\
221Find every package-manager cache and store on the machine, size each one, and print \
222the command that clears it — largest first, with a total. On its own it deletes \
223nothing, and nothing that runs on a schedule ever will: a cache is shared by every \
224repository, so no single lockfile can prove its contents recoverable, which is the \
225bar every dev-prune deletion has to clear. Clearing one also turns the next `devp \
226restore` into a download.
227
228`devp caches clear <manager>` runs the command this table prints, after showing you \
229what goes and asking.
230
231Covered: npm, pnpm, yarn, bun, uv, pip, cargo, go, maven, gradle, nuget, vcpkg and \
232conan. Each manager is asked where its cache is (`npm config get cache`, `go env \
233GOMODCACHE`, …) rather than assumed, with read-only queries run from your home \
234directory; a manager that is not installed falls back to the conventional location, \
235because a cache left behind by an uninstalled manager is exactly the multi-gigabyte \
236directory nobody remembers.";
237
238pub const CACHES_EXAMPLES: &str = "\
239EXAMPLES:
240 devp caches The table, largest first, with clear commands
241 devp caches --json | jq '.summary.total_bytes'
242 Machine-readable
243 devp caches clear npm Empty one, after asking
244 devp caches clear all --dry-run What would go, and nothing touched
245
246Run interactively with a terminal, `--json` also copies the document to the clipboard.";
247
248pub const CACHES_CLEAR_LONG: &str = "\
249Empty one manager's cache, or every one of them. What is about to go is listed and \
250sized first, and unless `--yes` answers for you, it asks.
251
252This is a convenience, not automation. No scheduler, no Git hook and no `devp run` \
253will ever clear a cache — this only runs when you type it.
254
255Wherever the manager ships its own subcommand, that is what runs: `npm cache clean \
256--force`, `pnpm store prune`, `go clean -modcache`. The manager knows what is still \
257referenced, which a directory delete cannot work out, and its own bookkeeping stays \
258consistent. cargo, maven, gradle and vcpkg ship nothing equivalent, so those are \
259cleared by removing the directory this command resolved and sized — never a string \
260handed to a shell.
261
262Nothing in a cache is lost; every manager re-downloads what it needs. What it costs \
263is time, in every project on the machine, on the next install and the next `devp \
264restore`. The freed size reported afterwards is measured rather than assumed, because \
265a `prune` keeps what is still in use.";
266
267pub const CACHES_CLEAR_EXAMPLES: &str = "\
268EXAMPLES:
269 devp caches clear npm One manager, after confirming
270 devp caches clear cargo Both cargo rows: the registry cache and its sources
271 devp caches clear all --dry-run Everything that would go, and nothing touched
272 devp caches clear all --yes No prompt, for a script
273 devp caches clear go --json --yes
274 Machine-readable (`--json` requires `--yes`)
275
276Exit code 1 if any cache could not be cleared; the rows are printed either way.";
277
278pub const TRUST_LONG: &str = "\
279What dev-prune is allowed to do on this machine, on one screen. Read-only — it reads \
280the registry and the OS and changes nothing.
281
282Two sections, and the split is the point. The first is guaranteed by the code: the \
283seven safety invariants plus the two questions asked as often as any of them — there \
284is no telemetry endpoint, and build output is never deleted. Those rows read the same \
285on every machine and have no setting and no flag behind them. The second is read live \
286off this machine: whether the scheduler is installed, whether the Git hooks register \
287repositories on their own, how many repositories are registered, and the settings that \
288widen what may happen without you asking for it.
289
290There is no letter grade. A report that says `trust level: MEDIUM` tells you nothing \
291you can act on, so the widened settings are named instead — `devp config show` has \
292every one of them, and `devp config set <key> <value>` puts one back.
293
294The long form of the guarantees is docs/SAFETY_INVARIANTS.md.";
295
296pub const TRUST_EXAMPLES: &str = "\
297EXAMPLES:
298 devp trust The report
299 devp trust --json | jq '.summary.widened'
300 Just the settings that widen what may happen
301 devp trust --json | jq -e '.summary.widened_count == 0'
302 Exit 1 from jq if this machine has widened anything
303
304Run interactively with a terminal, `--json` also copies the document to the clipboard.";
305
306pub const CONFIG_LONG: &str = "\
307Everything configurable lives under here: global settings (get/set/show/wizard), the \
308per-repository `.devprune.json` (project), the OS background scheduler (daemon), the \
309global Git auto-registration hooks (hook), and the file-manager icon registration \
310(icon).
311
312SHORTHANDS — `daemon`, `hook` and `icon` work without the leading `config`, and the \
313action words people reach for are accepted:
314 devp hook install = devp config hook enable
315 devp hook uninstall = devp config hook disable
316 devp daemon on / off = devp config daemon enable / disable
317 devp icon = devp config icon
318Accepted action words: enable/install/on, disable/uninstall/remove/off, status/show. \
319Anything else is rejected — a mistyped action never silently degrades into a status \
320report.";
321
322pub const CONFIG_EXAMPLES: &str = "\
323EXAMPLES:
324 devp config show Every global setting and its value
325 devp config get idle_days One setting
326 devp config set idle_days 30 Change it (rejects out-of-range values)
327 devp config wizard Walk through every setting, Enter keeps the current
328 devp config project . Inspect or create this repo's .devprune.json
329 devp config daemon status Is the background pass scheduled?
330 devp config . daemon disable Opt this repository out of the background pass
331 devp config hook enable --chain Take core.hooksPath, forwarding to the tool holding it
332 devp config icon Register the .devprune.json icon and schema";
333
334pub const CONFIG_GET_LONG: &str = "\
335Print one global setting's current value. The keys, defaults and meanings:
336
337 idle_days 15 Days untouched before a repo is a candidate
338 min_size_mb 0 Smallest directory worth deleting (0 = no floor)
339 scan_depth 6 Directory levels below a repo root discovery descends (1-32)
340 require_confirmation true Whether a prune pass asks before deleting
341 allow_manifest_rewrite false Whether verification may repair a drifted lockfile
342 command_timeout_secs 600 Ceiling on any one package-manager command
343 auto_setup true Whether the integration pass may run unattended
344 auto_daemon true …and may register the OS scheduler
345 check_interval_days 2 How often the scheduler runs a pass
346 auto_hooks true …and may install the global Git hooks
347 auto_hooks_chain false …and may chain onto another tool's core.hooksPath
348 update_check true Whether the periodic release check runs
349 update_check_interval_days 7 Minimum gap between two release checks
350 update_check_timeout_secs 5 How long that one request may hang
351
352Three have a per-repository override in `.devprune.json`, where they win for that \
353tree only: `idle_days` (spelled `override_idle_days` there), `min_size_mb` and \
354`scan_depth`. The rest are deliberately global — a committed `.devprune.json` must \
355not be able to grant a repository `allow_manifest_rewrite` over its own manifests.";
356
357pub const CONFIG_GET_EXAMPLES: &str = "\
358EXAMPLES:
359 devp config get idle_days
360 devp config get update_check";
361
362pub const CONFIG_SET_LONG: &str = "\
363Change one global setting. A value outside the accepted range is rejected with the \
364range in the message, never silently clamped — `scan_depth 0` and `scan_depth 40` are \
365both refused outright. Keys are the same list `devp config get --help` shows.";
366
367pub const CONFIG_SET_EXAMPLES: &str = "\
368EXAMPLES:
369 devp config set idle_days 30
370 devp config set min_size_mb 50
371 devp config set command_timeout_secs 1200
372 devp config set update_check false Turn the release check off for good";
373
374pub const CONFIG_SHOW_LONG: &str = "\
375Print every global setting with its current value. With `--update`, also run a sync \
376pass across all registered repositories, refreshing each one's `.devprune.json` \
377scaffolding without touching values you have changed.";
378
379pub const CONFIG_SHOW_EXAMPLES: &str = "\
380EXAMPLES:
381 devp config show
382 devp config show --update";
383
384pub const CONFIG_PROJECT_LONG: &str = "\
385Inspect a repository's `.devprune.json`, or create it when missing. The file holds \
386the per-repository overrides — `override_idle_days`, `min_size_mb`, `scan_depth`, \
387`ignore`, `disable_daemon`, `disable_hooks` — and carries a `$schema` line so any \
388editor with JSON Schema support validates and completes it.
389
390`--update` refreshes the file's scaffolding (schema pointer, missing keys) while \
391keeping every value you have set. A file that does not parse is refused, not reset — \
392fix it, or pass `--update` deliberately.
393
394Writing the file also records it in the repository's `.git/info/exclude`, so the \
395config — one machine's preference, not part of the project — never shows up in \
396`git status`. The shared, tracked `.gitignore` is never modified.";
397
398pub const CONFIG_PROJECT_EXAMPLES: &str = "\
399EXAMPLES:
400 devp config project . Show (or create) this repository's config
401 devp config project ~/Code/api
402 devp config project . --update Refresh scaffolding, keep your values";
403
404pub const CONFIG_DAEMON_LONG: &str = "\
405The OS background scheduler — Task Scheduler on Windows, launchd on macOS, systemd \
406timers on Linux — which runs `devp run --daemon` every `check_interval_days` days.
407
408Globally: `enable` registers the schedule, `disable` removes it, `status` reports \
409it. With a path first, the same words act on one repository via `disable_daemon` in \
410its `.devprune.json`: the machine-wide pass keeps running, that repository sits it \
411out.";
412
413pub const CONFIG_DAEMON_EXAMPLES: &str = "\
414EXAMPLES:
415 devp daemon status Machine-wide scheduler state
416 devp daemon enable Register the schedule (also: install, on)
417 devp daemon disable Remove it (also: uninstall, remove, off)
418 devp config . daemon disable This repository opts out of the background pass
419 devp config ~/Code/api daemon enable";
420
421pub const CONFIG_HOOK_LONG: &str = "\
422The global Git hooks (via `core.hooksPath`) that auto-register any repository you \
423commit in — `devp link --quiet`, silent, honouring opt-outs. `enable` installs them, \
424`disable` removes them (restoring what was there), `status` reports them. With a \
425path first, the same words act on one repository via `disable_hooks`.
426
427Git has exactly one global `core.hooksPath` and no way to chain two, so a tool that \
428holds it (husky, pre-commit, lefthook) shuts every other one out. `--chain` is the \
429way through: dev-prune takes the slot and writes, per hook, a shim that does its own \
430work and then execs the same-named hook in the displaced directory — their hooks \
431keep firing, their exit codes still block commits. `devp hook uninstall` puts the \
432original back. The chain snapshots the other tool's hooks at install time; `devp \
433hook status` reports any that have drifted, and `devp hook install --chain` rebuilds.";
434
435pub const CONFIG_HOOK_EXAMPLES: &str = "\
436EXAMPLES:
437 devp hook status Installed? Chained? Drifted?
438 devp hook install Take the free core.hooksPath slot
439 devp hook install --chain Take a slot husky/pre-commit/lefthook holds, forwarding
440 devp hook uninstall Restore the previous core.hooksPath
441 devp config . hook disable This repository opts out of auto-registration";
442
443pub const CONFIG_ICON_LONG: &str = "\
444Register `*.devprune.json` with the OS file manager and write the icon files and the \
445JSON Schema into the config directory. On Linux this is a complete registration \
446(shared-mime-info plus hicolor icons — Nautilus, Dolphin, Thunar, Nemo, PCManFM). On \
447Windows, Explorer resolves icons by last extension only, so the config folder gets \
448its own icon instead of hijacking every `.json` on the machine. On macOS a UTI must \
449come from an application bundle, which a single binary is not.
450
451It also prints an editor snippet to paste yourself — it never edits your editor \
452settings, your PATH, or your shell startup files.";
453
454pub const CONFIG_ICON_EXAMPLES: &str = "\
455EXAMPLES:
456 devp icon Same command, without the leading `config`";
457
458pub const CONFIG_WIZARD_LONG: &str = "\
459Open every global setting in a full-screen configurator, with the `devp trust` \
460declaration in front of it: what this tool is allowed to do is on screen before any \
461of it is configurable.
462
463Arrows move; Space changes the highlighted setting — a toggle flips, a number opens \
464a field, `disabled_adapters` opens the adapter checklist; `r` puts one back; `y` \
465accepts everything as shown. The last screen lists exactly what will be written, \
466before it is written. `q` leaves without saving anything.
467
468It runs itself once on a first install — so the defaults are something you agreed \
469to, not something you inherited — and again after an upgrade adds a setting this \
470machine has never been shown, which it marks NEW and opens on. Settings you have \
471already confirmed are never re-asked.
472
473It never runs unattended: no TTY means skipped, not guessed at. `--no-tui`, and the \
474DEV_PRUNE_NO_TUI environment variable, ask one question per line instead — for \
475terminals the full-screen view cannot drive, and for agents, which hold a real \
476terminal and will never press a key. To configure this tool from a script, use \
477`devp config set <key> <value>`, which needs no terminal at all.";
478
479pub const CONFIG_WIZARD_EXAMPLES: &str = "\
480EXAMPLES:
481 devp config wizard
482 devp config wizard --no-tui One question per line
483 devp config set disabled_adapters go Leave Go projects alone entirely
484 devp config set disabled_adapters - Every adapter active again";
485
486pub const RESTORE_LONG: &str = "\
487Put dependencies back: detect each project's lockfile and run its manager's install \
488(`npm ci`, `pnpm install`, `uv sync`, `cargo fetch`, …). Mirrors pruning — every \
489project in the tree is restored, each by its own manager, so a monorepo comes back \
490whole.
491
492`--last-run` restores exactly what the most recent prune pass deleted, across every \
493repository it touched, and nothing else: the undo for a `devp run`. Each prune \
494records what it removed (a dry run records nothing), and the flag fails cleanly if \
495no pass has been recorded yet. It cannot be combined with a path — silently ignoring \
496the path would restore the wrong thing.";
497
498pub const RESTORE_EXAMPLES: &str = "\
499EXAMPLES:
500 devp restore Restore the current directory's projects
501 devp restore ~/Code/my-app
502 devp restore --last-run Undo the last prune pass, everywhere it acted";
503
504pub const UPDATE_LONG: &str = "\
505Print the installed version, ask GitHub's public API for the latest release, and \
506show the upgrade command for how this copy was installed. By default it never \
507downloads or replaces its own binary; `--install` runs the upgrade through the \
508package manager that owns this copy (cargo, npm, uv, pipx, or the installer \
509script), and `devp config set auto_update true` runs that by itself at the end of \
510a prune pass when a newer release is known. An upgrade never interrupts the \
511scheduler: the scheduled pass runs a managed copy that refreshes itself from the \
512new binary on its next run.
513
514The same check also runs quietly from `devp run` and `devp status`, at most once \
515every `update_check_interval_days` (7 by default), printing one line only when a \
516newer version exists. It is the only thing in dev-prune that opens a network \
517connection, sends no body and no identifier, and `devp config set update_check \
518false` turns it off for good; `--offline` skips it for one run without changing the \
519setting.";
520
521pub const UPDATE_EXAMPLES: &str = "\
522EXAMPLES:
523 devp update Version, latest release, upgrade command
524 devp update --install Upgrade now, through the owning channel
525 devp update --offline No network this run";
526
527pub const SKILL_LONG: &str = "\
528Teach your AI assistant this tool. Exports SKILL.md — the full agent-facing manual: \
529every command, the JSON contracts, the safety invariants, the troubleshooting tree — \
530into the config directory, installs it into any detected agent skills directory \
531(`~/.claude/skills/dev-prune/`, the same install `devp setup` performs), and prints \
532ready-to-copy onboarding prompts for assistants without one (Gemini Antigravity, \
533Cursor, Windsurf, Copilot, OpenClaw).
534
535`--agent <EDITOR>` instead writes per-repository rules into the current repository, \
536in the file that editor's agent reads. Ten editors get a file of their own — cursor, \
537windsurf, antigravity, cline, roo, kilocode, continue, amazon-q, kiro, trae — and five \
538share a file with other tools, so dev-prune owns a marked block inside it: agents-md \
539(`AGENTS.md`, the cross-tool convention Codex, Jules, Amp and OpenCode read), copilot \
540(`.github/copilot-instructions.md`), gemini (`GEMINI.md`), junie \
541(`.junie/guidelines.md`) and zed (`.rules`). Every byte outside the markers is left as \
542found. `devp skill --help` lists each value with its exact path. \
543Claude Code needs no per-repository file — its skill installs globally.";
544
545pub const SKILL_EXAMPLES: &str = "\
546EXAMPLES:
547 devp skill Export SKILL.md, print onboarding prompts
548 devp skill --agent cursor Write .cursor/rules/dev-prune.mdc here
549 devp skill --agent agents-md Upsert the marked block in AGENTS.md";
550
551pub const SETUP_LONG: &str = "\
552Install whatever integration is missing and leave the rest alone: the `devp` alias, \
553the managed binary directory on your PATH (a user PATH entry on Windows, \
554`~/.local/bin` symlinks elsewhere — what keeps `devp` working after the venv or npx \
555cache it came from disappears), the exported SKILL.md and its agent-directory \
556install, the file-manager icon registration, the global Git hooks, and the OS \
557scheduler. Safe to run repeatedly: it is the same pass the install scripts run, the \
558same one `devp init` runs, and the same one that runs by itself on the first command \
559after an upgrade.
560
561It skips rather than forces: Git hooks when `git` is missing or another tool holds \
562`core.hooksPath` (take the slot with `devp hook install --chain`), the alias when \
563the running process is `devp` itself on Windows, and anything switched off by \
564`auto_setup`, `auto_hooks`, `auto_daemon` or `DEV_PRUNE_NO_AUTO_SETUP=1`.
565
566When a VS Code-family editor is on your PATH (VS Code, VSCodium, Cursor, Windsurf, \
567Positron, Kiro, or an Insiders build) and the dev-prune extension is not installed, \
568one run also asks — once ever, only at a terminal — whether to install it into each \
569editor found. Each editor installs from its own registry; when a fork's registry does \
570not carry the extension, the `.vsix` from the latest GitHub release is installed \
571instead. Decline and it never asks again; install it yourself later with \
572`code --install-extension VKrishna04.dev-prune`.";
573
574pub const SETUP_EXAMPLES: &str = "\
575EXAMPLES:
576 devp setup Install what is missing, report what was skipped
577 devp setup --status Report only; change nothing
578 DEV_PRUNE_NO_AUTO_SETUP=1 devp init ~/Code
579 Register repositories, install nothing";
580
581pub const DOCTOR_LONG: &str = "\
582One read-only pass that answers \"why is this not doing what I expect\". Without a \
583path it checks the installation: binary and twin, PATH, registry health, every \
584stored setting revalidated, SKILL.md, icons, hooks, scheduler, the package-manager \
585binaries your repositories actually need, and the release-check state. With a path \
586it checks that repository and ends by naming the single reason a prune would or \
587would not touch it.
588
589`--fix` is diagnosis first, then treatment — and it mends installed-but-broken only: \
590a stale or missing `devp` twin, a missing SKILL.md export, hooks or a scheduler \
591whose recorded binary moved, a drifted hook chain, and registry entries whose \
592repository is gone. Each repair is the corresponding `devp setup` pass re-run, so a \
593repair can never do more than setup itself would. It never performs a first-time \
594install, and never touches an unreadable registry — a parse failure is for you to \
595look at, not for a tool to guess at.
596
597EXIT CODES: 0 when everything works, warnings included — a missing scheduler should \
598not fail a script. 1 only for genuine breakage: an unreadable registry, an \
599out-of-range setting, a dead registered path, a directory that is not a Git \
600repository. `--fix` exits 1 when any repair failed or was out of reach.";
601
602pub const DOCTOR_EXAMPLES: &str = "\
603EXAMPLES:
604 devp doctor Check the installation
605 devp doctor . Why would a prune touch (or skip) this repository?
606 devp doctor ~/Code/api
607 devp doctor --fix Repair what the installation check finds broken";
608
609pub const UNINSTALL_LONG: &str = "\
610Remove dev-prune from the machine: the OS scheduler, the global Git hooks (only if \
611`core.hooksPath` still points at dev-prune), the file-type icons, the installed \
612agent skill, the PATH entry (or `~/.local/bin` symlinks), and the binaries — the \
613managed pair, the copy you invoked, and, with your confirmation, every other copy \
614found on PATH or in the well-known install directories (`~/.cargo/bin`, \
615`~/.local/bin`, npm's global directory, pip's Scripts directories). A copy owned by \
616a package manager is listed with its manager, and after removal the manager's own \
617uninstall command is printed so its records can be cleared too.
618
619On Windows, where a running executable cannot delete itself, a detached helper \
620removes the last files a few seconds after the command exits — no reboot, no closed \
621terminal.
622
623Without `--deep` the configuration survives, so a reinstall picks up where you left \
624off. With `--deep` the global config folder and every registered repository's \
625`.devprune.json` go too; that asks for confirmation, and refuses outright with no \
626terminal to ask on unless `-y` is passed. Exits 1 if anything could not be removed, \
627naming each leftover.";
628
629pub const UNINSTALL_EXAMPLES: &str = "\
630EXAMPLES:
631 devp uninstall Remove the program; keep config for a reinstall
632 devp uninstall --deep Also wipe config and per-repo .devprune.json (asks)
633 devp uninstall --deep -y Non-interactive; also confirms the stray-copy sweep";