Skip to the content.

← Command reference · lean-pkg repo · CLI overview

lean-pkg repo adopt

adopt the existing repository at DIR as the public history, then move the package there (release NAME --adopt-repo DIR is the same).

Also spelled: lean-pkg lease release NAME --adopt-repo DIR, lean-pkg release NAME --adopt-repo DIR (all aliases).

Usage

lean-pkg repo adopt [--remote URL] [--allow-history] [--agent AGENT] [--reason REASON]
                    [--dry-run] [common flags] NAME DIR

[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  
DIR the repository: exactly one commit unless –allow-history; tree and history public-safety scanned; no new commit
--remote URL git remote add origin URL, and set the record’s repo
--allow-history accept a repository with more than one commit
--agent AGENT lease holder, if one is live
--reason REASON free-text reason stored with the event
--dry-run scan, print the plan; nothing written

Details

Form What it does Key flags
repo adopt NAME DIR adopt an existing repository that already is the intended public history (built by hand, e.g. git init plus one commit of the cleaned tree): no export, no new commit. Refused: more than one commit on all refs unless --allow-history (“has N commits on its refs; an adopted public history must be exactly one commit”), DIR not a repository’s top directory, the package’s own source repository, modified tracked files, an origin other than --remote, any blocking public-safety hit in its tree or full history (“has N blocking public-safety hit(s) in its tree or history; nothing written”), a public, upstreamed or archived package, another agent’s live lease. Then the relocation of repo export (update --path DIR --reason "adopted-repository release"; evidence not bound to the adopted commit cleared, verified-private becomes gate-pending) and a dated note naming the adopted commit and the previous gate-bound commit; --remote adds origin when there is none and sets repo. --dry-run prints the plan. --json: adopted_path, adopted_commit, commits, allow_history, remote, provenance_commit, new_commit (always null), public_safety, relocation, note, status, next_commands[] DIR [--remote URL] [--allow-history] [--agent A] [--reason TEXT] [--dry-run]

Examples

Adopt an existing repository, already the intended public one, as the package’s repository.

lean-pkg repo adopt my-proof ../my-proof-public