# Configuration

The policy surface is a single file, `cooldown.toml`, at the root of your repository. One schema is used everywhere — the same keys mean the same thing for every ecosystem.

The happy path is **zero config**: the built-in default window is 7 days. Most repositories that configure anything set exactly one line:

```toml
min-age = "14d"
```

`cooldown` reads its configuration from these places, each overriding the ones before it:

1. the global file, `${XDG_CONFIG_HOME:-~/.config}/cooldown/config.toml`
2. every `cooldown.toml` from the repository root down to the project, the nearer one winning
3. the file `--config` names
4. `COOLDOWN_*` environment variables
5. command-line flags

[Precedence](https://romnn.github.io/cooldown/docs/configuration/precedence/) has the full order, with the built-in default and each tool's native config.

From there you can shape policy along two axes — **which layer** a value comes from and **which selector** it targets — resolved by an authority-first model.

- **[Basics](https://romnn.github.io/cooldown/docs/configuration/basics/)** — the `cooldown.toml` keys: `min-age`, `latest`, `freeze`, `allow`, `floor`, and durations.
- **[Precedence](https://romnn.github.io/cooldown/docs/configuration/precedence/)** — how layers and selectors combine, field by field.
- **[Selectors](https://romnn.github.io/cooldown/docs/configuration/selectors/)** — per-tool, per-registry, and per-package policy.
- **[Exclusions](https://romnn.github.io/cooldown/docs/configuration/excludes/)** — trim folders and packages out of a run.
- **[Advisories](https://romnn.github.io/cooldown/docs/configuration/advisories/)** — the OSV feed: flag security fixes, or give them a shorter window.

> [!NOTE]
> When behavior surprises you, two commands are the answer:
>
> - **[`cooldown config`](https://romnn.github.io/cooldown/docs/commands/other/):** prints the fully-resolved policy with the origin of each value.
> - **[`cooldown explain <pkg>`](https://romnn.github.io/cooldown/docs/commands/other/):** shows the derivation for one package.
