# cooldown

```console
$ cooldown outdated --tool cargo --countdown soonest
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 Package     Current   Adoptable   Latest    Cooldown               Status                                
══════════════════════════════════════════════════════════════════════════════════════════════════════════
 hex         0.4.2     0.4.3       0.4.3     1937d/7d               pinned                                
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 bytes       1.11.1    —           1.12.0    4d/7d                  in cooldown                           
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 log         0.4.29    —           0.4.33    28d/30d (0.4.30)       in cooldown                           
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 itertools   0.10.5    0.15.0      0.15.0    5d/0d                  exempt                                
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 once_cell   1.21.4    —           1.21.4    102d/7d                up-to-date                            
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 clap        4.1.0     4.6.1       4.6.1     67d/7d                 adoptable                             
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 lettre      0.11.21   0.11.22     0.11.22   39d/1d (security       adoptable ⚠ fixes GHSA-4pj9-g833-qx53 
                                             GHSA-4pj9-g833-qx53)   (critical)                            
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 regex       1.7.0     1.12.4      1.12.4    12d/7d                 adoptable                             
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 serde       1.0.150   1.0.228     1.0.228   267d/7d                adoptable                             
──────────────────────────────────────────────────────────────────────────────────────────────────────────
 tokio       1.25.0    1.52.3      1.52.3    44d/7d                 adoptable ⚠ fixes GHSA-rr8g-9fpq-6wmg 
                                                                    (low)                                 
──────────────────────────────────────────────────────────────────────────────────────────────────────────

5 adoptable · 0 blocked · 2 in cooldown · 1 up-to-date · 1 exempt · 1 held · 0 unknown-age
```


`cooldown outdated` in a Cargo project with a 7-day window: five updates are old enough to adopt,
two are still too young, and two of them fix a security advisory.

## How it works

1. `cooldown` finds the package managers in a directory and reads each lock, transitive
   dependencies included.
2. It looks up when every version was published on its registry and compares that age with the
   window: 7 days unless `cooldown.toml` sets another.
3. `upgrade` never moves to a version that has not cleared its window, and `check` fails when the
   lock already holds one.

## Get started

In a repository with a lock:

```sh
# Move every dependency to the newest version that has cleared its window.
cooldown upgrade
# Fail, in CI, when the lock holds a version that has not.
cooldown check
```

Continue with:

- **[Getting started](https://romnn.github.io/cooldown/docs/getting-started/):** from installing to a CI gate.
- **[The README's configuration](https://github.com/romnn/cooldown#configuration):** a
  `cooldown.toml` with every common key.
