Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
Show 20 variants Init { paths: Vec<String>, auto: bool, }, Link { path: String, quiet: bool, }, Unlink { path: String, missing: bool, }, Undo, Run { target_path: Option<String>, daemon: bool, only: Option<String>, skip: Option<String>, min_size: Option<u64>, except: Option<String>, json: bool, explain: bool, }, Status { top: Option<u64>, drift: bool, json: bool, }, History { pass: Option<usize>, limit: Option<usize>, all: bool, json: bool, export: Option<Option<PathBuf>>, scores: bool, }, Stats { json: bool, }, Trust { json: bool, fix_ownership: bool, yes: bool, }, Completions { shell: Shell, }, Man { command: Option<String>, dir: Option<String>, roff: bool, }, Caches { json: bool, volume: Option<String>, action: Option<CachesAction>, }, Config { action: Option<ConfigAction>, }, Restore { path: Option<String>, last_run: bool, }, Update { offline: bool, install: bool, channels: bool, }, Skill { agent: Option<AgentEditor>, rules_file: Option<PathBuf>, prompt: Option<PromptKind>, copy: bool, detected: bool, }, Setup { status: bool, }, Doctor { path: Option<String>, fix: bool, }, Install { channel: Option<TargetChannel>, dry_run: bool, }, Uninstall { deep: bool, },
}

Variants§

§

Init

Workspace onboarding & discovery: crawl paths for Git repositories and register them.

Fields

§paths: Vec<String>

Paths to scan for Git repositories (defaults to current directory).

§auto: bool

Work out where the repositories are instead of being told, and register everything found. Ignores PATHS.

Register a single Git repository for pruning (defaults to current directory .).

Fields

§path: String

Path to the Git repository to register.

§quiet: bool

Suppress output and skip repos that set disable_hooks. Used by the Git hook.

Remove a repository from the dev-prune registry (does not delete workspace files).

Fields

§path: String

Path to the Git repository to unregister.

§missing: bool

Unregister every path that no longer exists, instead of one named repository.

§

Undo

Revert the most recent init or link action.

§

Run

Run a prune pass across all registered repositories or a target directory (devp run .).

Fields

§target_path: Option<String>

Optional target workspace path. If omitted, runs across all registered repositories.

§daemon: bool

Mark this as the scheduled background pass. Repositories that set disable_daemon in .devprune.json are skipped. Set by the installed scheduler.

§only: Option<String>

Act only on these package managers (comma-separated), e.g. --only npm,pnpm. Unknown names are an error.

§skip: Option<String>

Leave these package managers alone (comma-separated), e.g. --skip cargo.

§min_size: Option<u64>

Ignore bloat directories smaller than this many MiB. Overrides min_size_mb.

§except: Option<String>

Prune everything except these repositories (comma-separated paths or names).

The safe way to express “clean up but keep the API project”: that project is never verified, never deleted and never reinstalled, instead of being pruned and then restored over the network.

§json: bool

Emit one JSON document instead of the human report. Implies non-interactive.

§explain: bool

Explain every decision instead of pruning: each repository and directory, with the reason it would or would not be touched — including the states a normal pass keeps quiet about (still active, opted out, under the size floor). Read-only; nothing is verified or deleted.

§

Status

View system dashboard: registered repos, background daemon, Git hooks & space metrics.

Fields

§top: Option<u64>

Show only the N repositories with the most reclaimable space.

The dashboard lists every registered repository, which on a machine with a hundred of them buries the handful actually worth pruning. Applies to the TUI, the plain table and --json alike.

Zero is rejected up front: “show the top 0” can only be a typo, and an empty dashboard that looks like an empty registry is worse than a usage error.

§drift: bool

Report lockfile drift instead of the dashboard: environments holding packages their lockfile never recorded — the installs a prune would refuse to delete because nothing could bring them back.

A pure read: no package manager runs, nothing is written. Checked where a file-level comparison exists — npm, uv and venv projects.

§json: bool

Emit the dashboard as one JSON document instead of the TUI or text table.

§

History

List every prune pass, and open one up to see what it deleted and what asked it to.

Fields

§pass: Option<usize>

Show one pass in full. 1 is the most recent, matching the numbers in the list.

§limit: Option<usize>

How many passes to list. Defaults to the 20 most recent.

§all: bool

List every recorded pass rather than the most recent few.

§json: bool

Emit the whole log as one JSON document instead of the text report.

§export: Option<Option<PathBuf>>

Write the JSON document to a file. Bare, it goes to your documents folder.

§scores: bool

Show high score records (Gold, Silver, Bronze for single repository cleanups and total passes).

§

Stats

Show lifetime space reclaimed, recent prune passes, and the biggest repositories.

Fields

§json: bool

Emit the figures as one JSON document instead of the text report.

§

Trust

Report what dev-prune is allowed to do on this machine, and what it has been given permission to do.

Fields

§json: bool

Emit the report as one JSON document instead of the table.

§fix_ownership: bool

Let Git read registered repositories it currently refuses on ownership.

§yes: bool

Answer yes to the confirmation --fix-ownership asks.

Declared here rather than inherited: this subcommand’s yes carries the requires guard the global one cannot, and having a local yes stops clap propagating the global -y in — so without a short spelling of its own, devp trust --fix-ownership -y was a usage error.

§

Completions

Print a shell completion script for bash, zsh, fish, PowerShell or elvish.

Fields

§shell: Shell

Shell to generate for.

§

Man

Print or write man pages, generated from the same definitions --help prints.

Fields

§command: Option<String>

The command whose page to read, e.g. devp man run. Omit for the contents page.

§dir: Option<String>

Write devp.1 plus one devp-<command>.1 per subcommand into this directory, instead of rendering the main page to stdout.

§roff: bool

Print the roff source even when stdout is a terminal, instead of the readable manual.

§

Caches

Report the size of every package manager cache on this machine (read-only unless you ask for clear).

Fields

§json: bool

Emit the report as one JSON document instead of the table.

Global within caches so it can be written after the subcommand too — devp caches clear npm --json is what everyone types.

§volume: Option<String>

Report only the caches that sit on one drive or filesystem: --volume V:, --volume /mnt/data, or any path on it. --drive is the same flag.

Not global: it narrows the report, and there is nothing for it to narrow in clear, docker or containers, so pairing it with one is a usage error rather than a flag that looks accepted and does nothing.

§

Config

Manage global settings, background daemon, Git hooks, custom icons, or per-project .devprune.json.

Fields

§

Restore

Restore dependencies in a project using its lockfile (npm ci, pnpm install, uv sync).

Fields

§path: Option<String>

Path to the project to restore (defaults to current directory).

§last_run: bool

Put back exactly what the most recent prune pass deleted, in every repository it touched. The undo for a run.

§

Update

Print the installed version, check for a newer release, and show how to upgrade.

Fields

§offline: bool

Skip the release check for this run. The check is the only thing in dev-prune that opens a network connection; devp config set update_check false turns it off for good.

§install: bool

Download and install the newer release without asking. Plain devp update offers the same install with a [y/N] prompt when a newer release exists and stdin is a terminal; -y answers that prompt. Needs the network, so it cannot be combined with --offline.

§channels: bool

Print the upgrade command for every channel dev-prune ships through, instead of only the one that installed this copy. Touches nothing and needs no network — useful when the machine in front of you is not the one that has the stale copy.

§

Skill

Export SKILL.md and display ready-to-copy AI Agent onboarding & skill import prompts.

Fields

§agent: Option<AgentEditor>

Write rules for one editor’s agent into the current repository instead. Each value below names the exact file it writes. Six of them — agents-md, aider, copilot, gemini, junie, zed — share a file with other tools, so dev-prune owns a marked block inside it and leaves every byte outside the markers as found. Claude Code needs no per-repo file: plain devp skill installs its skill globally. Nothing below fits? Use --rules-file instead of waiting on a new value to be added.

§rules_file: Option<PathBuf>

Write the condensed rules into an exact path in the current repository, as a marked block, for a coding agent --agent does not name — new, renamed, or reading a file of its own under a different name.

§prompt: Option<PromptKind>

Print one onboarding prompt on its own, with no header or fence, so it can be piped straight into a clipboard tool or a file.

§copy: bool

Send the prompt named by --prompt to the clipboard instead of only printing it. Falls back to a pipe hint on stderr if no clipboard tool is found on PATH; the prompt itself still reaches stdout either way.

§detected: bool

Write rules for every editor detected on this machine or in this repository — the ones plain devp skill lists — in one pass.

§

Setup

Install whatever dev-prune integration is missing: alias, SKILL.md, Git hooks, scheduler.

Fields

§status: bool

Report what is installed without changing anything.

§

Doctor

Diagnose the installation, or one repository if given a path (devp doctor .).

Fields

§path: Option<String>

Repository to diagnose. Omit to check the installation itself.

§fix: bool

Repair what the installation check finds broken: refresh a stale or missing devp twin, re-export SKILL.md, re-register a scheduler or Git hooks whose binary moved, and drop registry entries whose repository is gone.

Repairs only what was installed and has since broken — it never installs an integration that was never set up (that is devp setup), and it cannot fix a corrupt registry file, which needs a human decision.

§

Install

Move this install to another package manager: devp install --channel uv.

Fields

§channel: Option<TargetChannel>

The package manager to move this installation to. Omit to print which one owns the running copy, and the names this flag accepts.

§dry_run: bool

Print the commands that would run, and run none of them.

§

Uninstall

Remove dev-prune: scheduler, hooks, PATH entry, agent skill, and every copy of the binary.

Fields

§deep: bool

Perform a deep uninstall (wipe configuration folder and .devprune.json files).

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.