Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 29 fields pub idle_days: u64, pub check_interval_days: u64, pub auto_daemon: bool, pub auto_hooks: bool, pub auto_setup: bool, pub auto_config: bool, pub require_confirmation: bool, pub command_timeout_secs: u64, pub min_size_mb: u64, pub update_check: bool, pub scan_depth: usize, pub allow_manifest_rewrite: bool, pub update_check_interval_days: i64, pub update_check_timeout_secs: u64, pub auto_hooks_chain: bool, pub enable_cargo: bool, pub enable_gradle: bool, pub enable_maven: bool, pub enable_swift: bool, pub enable_dart: bool, pub enable_mix_build: bool, pub enable_vcpkg: bool, pub enable_cmake_build: bool, pub build_idle_days: u64, pub auto_update: bool, pub version_lock: bool, pub disabled_adapters: Vec<String>, pub adapter_idle_days: BTreeMap<String, u64>, pub cache_max_gb: BTreeMap<String, u64>,
}
Expand description

Global settings that control prune behavior.

Fields§

§idle_days: u64

Number of inactive days before a repo is eligible for pruning.

§check_interval_days: u64

Interval in days between automated daemon checks.

§auto_daemon: bool

Whether the setup pass installs the OS scheduler. On by default.

§auto_hooks: bool

Whether the setup pass installs the global Git hooks. On by default.

§auto_setup: bool

Whether dev-prune installs its own missing integrations. On by default.

§auto_config: bool

Whether link and init write a default .devprune.json into repositories they register. Off by default; see constants::DEFAULT_AUTO_CONFIG.

§require_confirmation: bool

Whether interactive confirmation is required before pruning.

§command_timeout_secs: u64

Timeout in seconds for lockfile enforcement / CLI commands (default 600s = 10m).

§min_size_mb: u64

Smallest bloat directory worth deleting, in MiB. 0 disables the floor.

Below this size the reinstall costs more than the space is worth, so the directory is not offered as a candidate at all.

§update_check: bool

Whether dev-prune asks GitHub for the latest release from time to time.

On by default, and opt-out rather than opt-in: an out-of-date cleanup tool is a tool whose safety fixes you do not have. The request sends nothing but itself — no identifier, no configuration, no usage data. Turn it off with devp config set update_check false.

§scan_depth: usize

How many directory levels below a repository root discovery descends.

Six by default. A flat repository never notices; a monorepo that nests projects under packages/@scope/name/app does. Raise it when devp status does not list a project you know is there, and remember that the walk gets more expensive with every level. Clamped to constants::MAX_SCAN_DEPTH_LIMIT.

§allow_manifest_rewrite: bool

Whether cargo and go may run the sync command that rewrites tracked manifests.

Off. See constants::DEFAULT_ALLOW_MANIFEST_REWRITE — with this off, both are verified read-only and a project with no lockfile at all is simply not pruned.

§update_check_interval_days: i64

Days between automatic release checks.

Only the automatic check honours this; devp update always asks, because you are standing there waiting for the answer.

§update_check_timeout_secs: u64

How long the release check waits for GitHub before giving up, in seconds.

Five is right on a normal connection and too short behind some corporate proxies, which is the whole reason this is a setting rather than a constant.

§auto_hooks_chain: bool

Whether the setup pass may install the Git hooks in front of another tool’s.

Off. With it on, a core.hooksPath that belongs to husky is not a reason to skip: dev-prune takes the slot and forwards every hook back to the directory it displaced. Behaviour-preserving, but it is still someone else’s setup, so it is asked for rather than assumed. Same thing as devp hook install --chain.

§enable_cargo: bool

Whether the opt-in Cargo adapter is active. Off by default, and the reason is the same one that keeps enable_gradle off: Rust’s target/ is compiler output. cargo metadata --locked proves the crates come back from Cargo.lock, but nothing downloads a compiled artefact — the directory returns only by rebuilding, which on a large workspace is minutes rather than the seconds a dependency reinstall costs. See crate::adapters::cargo_adapter.

§enable_gradle: bool

Whether the opt-in Gradle build-tool adapter is active. Off by default: build/ comes back by recompiling the project, so nobody should find it deleted without having asked. See crate::adapters::gradle.

§enable_maven: bool

Whether the opt-in Maven build-tool adapter is active. Off by default, for the same reason as enable_gradle. See crate::adapters::maven.

§enable_swift: bool

Whether the opt-in Swift Package Manager adapter is active. Off by default, for the same reason as enable_gradle: .build/ holds compiled modules and comes back through swift build. See crate::adapters::swift.

§enable_dart: bool

Whether the opt-in Dart and Flutter adapter is active. Off by default: the pub metadata in .dart_tool/ is a second’s work to restore, but the build_runner and flutter_build caches beside it are compiler output and come back only by recompiling. See crate::adapters::dart.

§enable_mix_build: bool

Whether the opt-in Mix build-tree adapter is active. Off by default, and separate from the always-on mix adapter: that one deletes deps/, which comes back by downloading, while _build/ comes back only by recompiling the project and every dependency in it. See crate::adapters::mix_build.

§enable_vcpkg: bool

Whether the opt-in vcpkg adapter is active. Off by default: vcpkg builds every port from source, so vcpkg_installed/ comes back by compiling Boost or Qt again rather than by downloading them. See crate::adapters::vcpkg.

§enable_cmake_build: bool

Whether the opt-in CMake build-tree adapter is active. Off by default: a build tree is object files and linked binaries, and it comes back by compiling the project again. See crate::adapters::cmake_build.

§build_idle_days: u64

Idle days required before build-tree directories — everything the opt-in adapters claim — are pruned.

Separate from idle_days because the cost of being wrong is different: a deleted node_modules is one npm ci away, a deleted Android build/ is a long recompile. Applied as max(build_idle_days, idle_days).

§auto_update: bool

Whether a newer release installs itself at the end of a prune pass, once the periodic check has found one.

On by default. A pruner that runs on a schedule is exactly the kind of tool nobody thinks to upgrade, and an old one keeps whatever bug it shipped with forever. What runs here is the download-and-replace half only: see crate::commands::update::maybe_auto_update, which never hands the machine to a package manager unattended and stands aside entirely on WinGet, Scoop and Homebrew, where the manager owns the upgrade.

§version_lock: bool

Whether this copy stays on the version it is, whatever else is configured.

Off by default, and turned on only by a person typing devp config set version_lock true. While it is on, auto_update does not run however it is set, devp update --install refuses, devp install --channel refuses because moving channels installs the latest release, and the install scripts leave the binary exactly where they find it. There is no flag that bypasses it: releasing the pin is the same kind of decision as setting it, and belongs to the same person.

It exists because auto_update = false was never the whole answer. That setting stops one path; a machine that has to keep shipping the same tool for a year – a CI image, a reproduction that stops reproducing the moment the tool changes underneath it, a locked-down build box – also has to survive someone re-running the install one-liner out of habit.

§disabled_adapters: Vec<String>

Adapters switched off by name, whatever their lockfiles say.

A deny-list rather than twenty enable_* booleans, because the answer for almost everyone is “none of them” and a list of exceptions says that in one place. It is a preference, and the opposite of enable_gradle and friends: those are off until asked for because deleting a build tree is expensive to undo, whereas node_modules is safe to prune and merely something a particular person may not want touched.

Names are the adapter names --only/--skip take. Applied in crate::adapters::detect_adapters, so a disabled adapter is invisible to every command at once rather than listed by status and skipped by run.

§adapter_idle_days: BTreeMap<String, u64>

Per-adapter idle windows, in days, keyed by adapter name.

The one dial that is neither global nor per-repository: “wait longer before touching Rust” is a statement about a toolchain, not about one checkout, and before this it could only be said by moving the global window for everything.

A floor, never a bypass. The value is applied as max(idle_days, adapter_idle_days[name]), so it can only make an adapter wait longer than the repository-level check already requires. A smaller number is accepted and simply has no effect — the repository gate runs first and is the same gate for every adapter, and letting one adapter lower it would be a bypass of the idle check rather than a preference.

BTreeMap rather than HashMap so the JSON round-trips in a stable order and a diff of the registry file shows what actually changed.

§cache_max_gb: BTreeMap<String, u64>

Per-manager cache size caps, in gibibytes, keyed by cache manager name.

A download cache is a bet that re-downloading costs more than the disk it occupies, and the bet stops paying somewhere: a uv cache past ten gigabytes is keeping wheels for Python versions the machine no longer has, and no repository’s lockfile will ever say so. This is where that ceiling is written down.

It never deletes anything on its own. devp caches marks a cache over its cap and devp caches clear --over-cap empties exactly those; nothing dev-prune runs on a schedule touches a cache, which is a promise devp caches prints in so many words and a size cap is not a reason to break.

Keyed by the names devp caches clear <MANAGER> takes, not by adapter name. They mostly agree — npm, uv, cargo, go — but pip, nuget, conan, conda, vcpkg and hex are caches with no adapter, and venv, terraform and dart are adapters with no cache. Empty by default: no cache is too big until someone says what too big is.

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Settings

Source§

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

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

impl Default for Settings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Settings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Settings

Source§

fn eq(&self, other: &Settings) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Settings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Settings

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.