CLI reference
Every Lifeline command, generated from the CLI itself: init, context, resume, checkpoint, log, recall, policy, audit, guard, lines, verify, push/pull/clone.
Generated from the parser by python scripts/gen_cli_doc.py — don't edit by hand (a test fails when this file drifts).
Globals, before the command: --db <path> (default .lifeline/ledger.db, or LIFELINE_DB) · --line <name> (a named line: .lifeline/<name>.db + LIFELINE.<name>.md) · --store sqlite|supabase. Identity on a write: --author / --agent / --provider / --model.
Start
| Command |
What it does |
lifeline init [--out OUT] [--hooks] [--agent AGENT] [--no-mcp] [--no-policy] |
one-command setup: the line, .mcp.json, the write policy (and --hooks); then the three lines that bootstrap it |
lifeline install-hooks [--local] [--no-guard] [--root ROOT] {claude-code,git} |
install the auto-connect hook in a client (SessionStart: startup, resume and after each compaction) |
lifeline install-rules [--clients CLIENTS] [--root ROOT] |
write the Lifeline section into each client's rule file (CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules, copilot-instructions) |
lifeline migrate --from SRC [--strict] |
ingest an existing markdown into the store |
Every day
| Command |
What it does |
lifeline context [--budget BUDGET] [--budget-tokens BUDGET_TOKENS] [--tokenizer TOKENIZER] [--format {generic,anthropic,openai,gemini}] [--query QUERY] [--thread THREAD] [--mark-session] |
print the assembled context |
lifeline resume [--thread THREAD] [--json] |
where work stopped: the live checkpoint of each thread |
lifeline checkpoint [--thread THREAD] [--goal ITEM] [--done ITEM] [--next ITEM] [--blocked ITEM] [--tried ITEM] [--summary SUMMARY] [--author AUTHOR] [--agent AGENT] [--provider PROVIDER] [--model MODEL] [--parents PARENTS] [--out OUT] |
record where work stopped on a thread (goal/done/next/blocked/tried) — the next AI resumes from it |
lifeline log --kind KIND --summary SUMMARY [--body BODY] [--author AUTHOR] [--agent AGENT] [--provider PROVIDER] [--model MODEL] [--parents PARENTS] [--thread THREAD] [--out OUT] |
human: append directly to the line (you're the approver) |
lifeline recall [-k K] query |
the entries most relevant to a query (anchored; reverted marked) |
Curate
| Command |
What it does |
lifeline propose --kind KIND --summary SUMMARY [--body BODY] [--author AUTHOR] [--agent AGENT] [--provider PROVIDER] [--model MODEL] [--parents PARENTS] [--thread THREAD] |
propose an entry (HITL) — stays pending until approved |
lifeline review |
list pending proposals (HITL curation) |
lifeline approve pids [pids ...] |
seal pending proposal(s) into the line |
lifeline reject pids [pids ...] |
discard pending proposal(s) |
lifeline policy [--init] [--agent AGENT] |
show the project's write policy (.lifeline/policy.json) |
lifeline audit [--since SINCE] [--status {auto,approved,rejected,pending,duplicate,all}] |
the write trail: policy-direct writes (auto), approved, rejected, pending |
lifeline guard (--session \| --git \| --since SINCE) [--require {any,checkpoint}] |
discipline check: did this line get a checkpoint/entry? --session (Stop hook, blocks once) · --git (pre-push) · --since X |
lifeline pin [--body BODY] [--author AUTHOR] [--out OUT] id |
pin a decision as FOUNDATION of the context (always shown; an anchored note, never a mutation) |
lifeline unpin [--body BODY] [--author AUTHOR] [--out OUT] id |
unpin a decision (a correction superseding the pin note) |
lifeline exam [--json] [--budget BUDGET] |
Context Health: score 0-100 of how ready this line leaves a fresh AI (what/why/decided/next) + concrete gaps |
lifeline capture [--last LAST] [--author AUTHOR] |
draft proposals from recent git commit messages (zero-LLM; the commit body is the why — no body, no draft) |
Lines & mesh
| Command |
What it does |
lifeline lines [--mesh] |
list the project's lines (.lifeline/*.db) |
lifeline promote --from SRC_LINE --to DST_LINE [--id IDS] [--kind PKIND] |
copy entries from one line into another as roots (idempotent — re-promoting dedups by content) |
lifeline where id |
which lines of the project hold an id (mesh lookup) |
lifeline relate --from FROM_ID --to TO_ID [--rel {depends_on,implements,tests_covers,supersedes}] [--author AUTHOR] [--out OUT] |
record a typed relation between two entities (depends_on / implements / tests_covers / supersedes) |
lifeline graph (--depends-on ID \| --dependents ID \| --of ID) |
query the typed entity graph (structured answer) |
Maintain
| Command |
What it does |
lifeline verify [--mesh] [--no-mesh] |
check the ledger's integrity (parents in sibling lines count as external anchors, not omissions) |
lifeline rebuild [--out OUT] |
regenerate the view from the store |
lifeline reindex |
rebuild the recall index (FTS5) from the ledger |
lifeline rehash [--out OUT] |
recompute every id under the current canonical scheme (one-shot migration after a hash-scheme upgrade) |
lifeline schema |
print the cloud SQL schema (Supabase) — paste it into the SQL Editor |
Sync & cloud
| Command |
What it does |
lifeline push [--out OUT] |
git sync: rebuild + commit + push the view |
lifeline pull [--out OUT] |
git sync: pull + rebuild the .db from the merged view |
lifeline clone url dest |
git clone and rebuild the .db |