← Command reference · lean-pkg lease · CLI overview
lean-pkg lease list
held leases, soonest expiry first; read-only.
Also spelled: lean-pkg leases (all aliases).
Usage
lean-pkg lease list [--agent AGENT] [--expiring HOURS] [common flags]
[common flags]: --json, --commit, --push, --no-commit, also accepted before the command name; see the CLI overview.
Arguments and flags
| Argument or flag | Description |
|---|---|
--agent AGENT |
only leases held by this agent |
--expiring HOURS |
only leases that lapse within HOURS (or have already lapsed) |
Details
| Form | What it does | Key flags |
|---|---|---|
leases |
held leases, soonest expiry first, with live / EXPIRED state and a last CONTACT column (blank when the lease has none); --json rows carry contact (null when unset); read-only |
[--agent A] [--expiring HOURS] (HOURS >= 0; a negative window exits 2) |
JSON output
Top-level keys of --json, as recorded in the golden contract (tests/golden/json-keys.json):
leases(exit 0):leases,now,ok
Examples
Your own leases that lapse within two hours, the ones to renew.
lean-pkg lease list --agent alice --expiring 2