← Command reference · lean-pkg repo · CLI overview
lean-pkg repo move
relocate: point the record at another checkout, keeping name, history and claims (the same as update NAME --path PATH).
Usage
lean-pkg repo move [--reason REASON] [--agent AGENT] [--force] [--dry-run]
[common flags] NAME HOME-RELATIVE
[common flags]: --json, --commit, --push, --no-commit, also accepted before the command name; see the CLI overview.
Arguments and flags
| Argument or flag | Description |
|---|---|
NAME |
|
HOME-RELATIVE |
the new checkout (event relocated; commit-bound evidence not bound to the new HEAD is cleared, unless the new checkout holds the gated commit in its history and each receipt there is byte-identical to the old checkout’s copy (kept by hash, JSON kept_by_hash)) |
--reason REASON |
required |
--agent AGENT |
lease holder, if one is live |
--force |
override a live lease held by another agent; needs –reason |
--dry-run |
print the would-be changes, write nothing |
Examples
Show what pointing the record at another $HOME-relative checkout would clear (gate receipts and cached claims not bound to the new HEAD) and the next commands; nothing is written.
lean-pkg repo move my-proof work/my-proof-2 --reason "checkout moved" --dry-run
Sample output:
my-proof: relocated work/my-proof -> work/my-proof-2
note: lean_toolchain/mathlib_pin left as recorded; run `lean-pkg update my-proof --redetect` to re-read toolchain/pin
DRY RUN — nothing written. Re-run without --dry-run to relocate.
binding at the new path (HEAD 52c57490bfd1):
no gate receipt recorded
formalization.yaml (pointer not recorded): not applicable
next: nothing to re-gate
Relocate it, keeping name and history (and the claims cache only when it was synced at the new HEAD) and recording a relocated event (a verified-private package whose receipt is cleared drops to gate-pending); without –reason it exits 1.
lean-pkg repo move my-proof work/my-proof-2 --reason "checkout moved"