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: u64Number of inactive days before a repo is eligible for pruning.
check_interval_days: u64Interval in days between automated daemon checks.
auto_daemon: boolWhether the setup pass installs the OS scheduler. On by default.
auto_hooks: boolWhether the setup pass installs the global Git hooks. On by default.
auto_setup: boolWhether dev-prune installs its own missing integrations. On by default.
auto_config: boolWhether link and init write a default .devprune.json into repositories
they register. Off by default; see constants::DEFAULT_AUTO_CONFIG.
require_confirmation: boolWhether interactive confirmation is required before pruning.
command_timeout_secs: u64Timeout in seconds for lockfile enforcement / CLI commands (default 600s = 10m).
min_size_mb: u64Smallest 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: boolWhether 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: usizeHow 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: boolWhether 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: i64Days 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: u64How 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: boolWhether 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: boolWhether 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: boolWhether 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: boolWhether 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: boolWhether 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: boolWhether 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: boolWhether 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: boolWhether 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: boolWhether 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: u64Idle 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: boolWhether 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: boolWhether 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<'de> Deserialize<'de> for Settings
impl<'de> Deserialize<'de> for Settings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Freeze for Settings
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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