Refuse dependency versions younger than a minimum age.
Install · Example · Commands · Configuration · Documentation
cooldown outdated with a 7-day window: what is old enough to adopt, and what is still too young.
Malicious package versions are usually found and pulled within hours to a few days of their
release. cooldown keeps them out of your builds until then: it refuses any version younger than
a window, 7 days by default, across every package manager in a repository, from one
cooldown.toml.
- Good for: repositories that want one age gate for all their lockfiles, direct and transitive dependencies included, in CI and when updating.
- Not for finding known vulnerabilities:
cargo audit,govulncheckand OSV-Scanner do that, andcooldownworks beside them. - Not for opening update pull requests: Renovate and Dependabot do that, and
cooldown checkgates what they propose.
Pick one:
# With Homebrew
brew install --cask romnn/tap/cooldown
# With mise, from the GitHub release
mise use github:romnn/cooldown
# From source, which compiles it and takes a few minutes
cargo install --locked cooldowncooldown runs each ecosystem's own package manager, such as cargo, uv or pnpm, to resolve
and change locks, so those must be on PATH. It supports:
- Rust: Cargo
- Go: Go modules
- Python: uv, pip (
requirements.txt), Poetry, conda and pixi - JavaScript and TypeScript: npm, pnpm, Yarn, Bun and Deno
- Ruby, Elixir, Java and Swift: Bundler, Hex, Maven, Gradle and SwiftPM
Run it from the root of a repository; it finds the package managers there.
-
See what could update.
adoptablerows have cleared their window,in cooldownrows are still too young:cooldown outdated
-
Move every dependency to the newest version that has cleared its window, and re-lock. Add
--dry-runto see the plan first:cooldown upgrade
-
Gate CI.
checkexits with1when anything in the lock, transitive dependencies included, is younger than its window:cooldown check
When check fails, pick one:
- Wait until the version is old enough.
cooldown baselineaccepts it, socheckpasses on that version.cooldown fixrolls it back to the newest version that has cleared its window.
Getting started walks through a real run.
| Command | What it does |
|---|---|
outdated |
Lists what could update, split into adoptable now and still in cooldown |
upgrade |
Moves to the newest version that has cleared its window, then re-locks |
fix |
Rolls dependencies that are too young back to a version that has cleared it |
check |
Fails when anything in the lock is younger than its window: the CI gate |
baseline |
Records the current young versions as accepted, so check passes on them |
explain <pkg> |
Shows why a package has its window, layer by layer (alias why) |
config |
Prints the resolved configuration, with where each value comes from |
init |
Writes a commented starter cooldown.toml, and never overwrites one |
schema |
Prints the JSON schema of --json output |
sync |
Writes the policy into the package managers' own cooldown settings |
prune |
Removes run traces and cache entries older than 30 days (--older-than) |
recover |
Restores Cargo project files an interrupted run left changed |
check exits with:
0: nothing in the lock is too young.1: a dependency is younger than its window.2: a usage or configuration error.3: no package manager was found.4: a stale lock, an unreachable registry or a failed package manager.
The CLI reference lists every flag and exit code.
cooldown reads cooldown.toml files from the repository's root down to each project, after a
global ~/.config/cooldown/config.toml; a nearer file wins. Without one, the window is 7 days.
# cooldown.toml
# The window for every dependency: "14d", "2 weeks", "36h" or ISO 8601 "P14D".
min-age = "14d"
# Packages that skip the window, such as your own. `cooldown explain` lists every exemption.
allow = ["acme-*"]
# A minimum window that no other setting can lower, except an `allow` in this same file.
floor = "3d"
# A window for one package manager: cargo, go, uv, pip, poetry, conda, pixi, npm, pnpm, yarn,
# bun, deno, bundler, hex, maven, gradle or swift.
[tool.uv]
min-age = "21d"
# Rules for one package, by name or glob; `tool.npm` limits this one to npm projects.
[tool.npm.package.typescript]
# Stays on TypeScript 5, even under `upgrade --major`.
max-major = 5
# A window for one registry: crates.io, npm, jsr, pypi, rubygems, hexpm, maven-central, conda,
# github, or the host of Go's first GOPROXY entry.
[registry."goproxy.acme.io"]
min-age = "0d"Two more keys replace the rolling window:
latest = true: turns the window off.freeze = "2026-06-01": refuses anything published after a fixed date.
Command-line flags and COOLDOWN_* variables override every file. The documentation covers the
rest:
- Precedence: how layers and
selectors decide a value, and how
allowandfloorinteract. - Selectors: per-tool keys
such as Cargo's
generated-membersand pnpm'ssingle-copy. - Exclusions:
exclude-folders,exclude-packagesandinclude-hidden. - Advisories: the OSV feed, which marks updates that fix a known advisory and can give them a shorter window.
MIT