← Command reference · lean-pkg registry · CLI overview
lean-pkg registry recommend
set the lean-pkg version this registry recommends; an older lean-pkg’s writing commands then print a notice (offline; never a refusal).
Usage
lean-pkg registry recommend [--reason REASON] [common flags] VERSION
[common flags]: --json, --commit, --push, --no-commit, also accepted before the command name; see the CLI overview.
Arguments and flags
| Argument or flag | Description |
|---|---|
VERSION |
X.Y.Z: the release every machine using this registry should run (stored as the top-level lean_pkg.recommended; event registry-recommended) |
--reason REASON |
free text recorded with the event |
Details
| Form | What it does | Key flags |
|---|---|---|
recommend VERSION |
set the release of lean-pkg every machine using this registry should run: the registry’s optional top-level lean_pkg: {recommended: X.Y.Z} (additive: the schema stays version 3, and an older lean-pkg ignores the key and keeps it on every save), and the log-only event registry-recommended {recommended, previous, reason}. The same version again writes nothing (exit 0); a VERSION that is not X.Y.Z (three non-negative integers) exits 2. A write like any other: committed mode (--commit, --push) and the registry lock apply. --json: {ok, recommended, previous, registry, event (null when nothing was written), running} |
VERSION [--reason TEXT] |
The notice. When the running lean-pkg is older than the recommendation, every writing command (every
registry write: gate, lease claim, renew and release, register, update, record, …; and the
receipt producers receipt slurm, systemd, ci and comparator, outside their read-only forms
--template, --check, --preflight-deps, --estimate, --verify-oleans and --attempts) does its work and
then prints one line on stderr:
lean-pkg: notice: this is lean-pkg 0.24.0; the registry recommends 0.25.0 (upgrade: pipx install --force 'lean-pkg==0.25.0')
The upgrade route is git -C <checkout> pull --ff-only for an editable install (a git checkout), else a
pipx install pinned to the recommended release: pipx install --force 'lean-pkg==X.Y.Z' from PyPI for 0.25.0
and later, and for an older recommendation (not on PyPI) its git tag,
pipx install --force 'git+https://github.com/lean-pkg/lean-pkg.git@vX.Y.Z'. It is never a refusal and never changes the
exit code, output or JSON otherwise; a registry write’s --json payload gains lean_pkg_skew {running,
recommended}, absent when the running lean-pkg is not older. The check reads only the registry: no network.
Read-only commands stay silent; doctor shows the same comparison as its recommended line.
Versions compare on X.Y.Z: the running version’s leading X.Y.Z is used, so an editable development build
(0.23.0.dev1, 0.23.0+dirty) counts as 0.23.0, and a running version with no leading X.Y.Z is never older.
Equal or newer is silent. To stop the notice everywhere, recommend the release the group runs.
Examples
Record that every machine using this registry should run lean-pkg 0.23.0 (the top-level lean_pkg.recommended key and a registry-recommended event), committed with the registry.
lean-pkg registry recommend 0.23.0 --reason "group on 0.23.0" --commit
Sample output:
the registry recommends lean-pkg 0.23.0 (was 0.22.0); writing commands of an older lean-pkg print a notice (this is 0.23.0)