Pin Crates
Contract
Prereqs:
- •Run inside this repository work tree.
- •
bash,git,perl, andpython3available onPATH. - •Managed target files must exist in the project layout.
Inputs:
- •Required:
- •
--version <x.y.z|pre-release>
- •
- •Optional:
- •
--targets <target[,target...]> - •
--all(pin all managed targets; default when--targetsomitted) - •
--dry-run(validate and print planned updates without writing files) - •
--update-lock(runcargo update -p <crate> --precise <version>for cargo targets) - •
--list-targets
- •
Managed targets:
- •
codex-cli- •aliases:
codex-cli,codex,nils-codex-cli - •published crate:
nils-codex-cli - •updates: codex workflow runtime pin + related docs text
- •aliases:
- •
memo-cli- •aliases:
memo-cli,memo,nils-memo-cli - •published crate:
nils-memo-cli - •updates: cargo dependency pin + related docs text
- •aliases:
Outputs:
- •Prints deterministic change summary:
- •selected targets
- •resolved published crate names
- •touched files
- •lockfile update status
- •On non-dry-run mode, writes version pins to mapped files.
Exit codes:
- •
0: success - •
1: runtime failure - •
2: usage error
Failure modes:
- •
--versionmissing (except--list-targets). - •Unknown target alias in
--targets. - •Invalid semver-like version format.
- •Required file missing.
- •Pattern replacement expected by mapping not found.
- •
cargo updatefailed when--update-lockis enabled.
Scripts (only entrypoints)
- •
<PROJECT_ROOT>/.codex/skills/pin-crates/scripts/pin-crates.sh
Workflow
- •Resolve repo root and parse flags.
- •Resolve user-provided target aliases to managed targets.
- •Apply file updates for each target:
- •
codex-cli: runtime script and docs pin strings. - •
memo-cli: cargo dependency and docs pin strings.
- •
- •Optionally run lock sync (
--update-lock) for cargo targets. - •Print summary with touched files and crates.