Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
Show 16 variants Init { paths: Vec<String>, }, 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, }, Status { top: Option<u64>, drift: bool, json: bool, }, Stats { json: bool, }, Completions { shell: Shell, }, Caches { json: bool, }, Config { action: Option<ConfigAction>, }, Restore { path: Option<String>, last_run: bool, }, Update { offline: bool, }, Skill, Setup { status: bool, }, Doctor { path: Option<String>, fix: 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).

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.

§

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.

§

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.

§

Completions

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

Fields

§shell: Shell

Shell to generate for.

§

Caches

Report the size of every package manager cache on this machine (read-only, deletes nothing).

Fields

§json: bool

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

§

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.

§

Skill

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

§

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.

§

Uninstall

Uninstall background daemon, Git hooks, and optionally wipe configuration.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.