Look up
CLI reference
Every heddle command, grouped by what you're trying to
do, in the order the CLI's own help presents itself. Names, flags,
flag values and exit codes on these pages are diffed against the
command catalog of heddle 0.12.0 on every build — a page that
documents something the binary doesn't have fails CI.
Three pages carry contracts rather than commands, and they are the
ones to read first if you are driving Heddle unattended: exit codes (only 75 is safe to retry), machine output (error envelopes go to stderr), and auth and identity.
The everyday loop
- heddle status Shipped
Show what needs attention and the next safe Heddle action. Observe-only and safe in any directory.
- heddle diff Shipped
Show what changed in the worktree, a thread, or two states.
- heddle commit Shipped
Commit the current captured state to the authoritative Git checkout. Git Overlay only; runs no Git hooks.
- heddle capture Shipped
Capture a recoverable Heddle step for undo, provenance, and review. No staging area, no path filter.
- heddle start Shipped
Create or resume an isolated thread for focused work. The checkout it makes has no .git of its own.
- heddle ready Shipped
Prepare this thread for review or merge. Never lands, checkpoints, or pushes.
- heddle land Shipped
Integrate a ready thread into its local target. Fails closed on conflicts.
Synchronising
- heddle push Shipped
Push the source-authoritative history to a remote. Exit 75 is retryable; 76 is not.
- heddle pull Shipped
Pull source-authoritative history from a remote, including context and discussions.
- heddle clone Shipped
Clone from a Heddle remote.
Reading history
- heddle log Shipped
Show state history. Aliased as heddle history.
- heddle show Shipped
Show state details for one state, defaulting to HEAD.
Setting up
- heddle init Shipped
Initialize Heddle in a directory or existing Git checkout. Additive: it never modifies .git.
- heddle adopt Shipped
Adopt Git history into Heddle-native source authority. One-way.
Recovery
- heddle undo Shipped
Undo the last Heddle operation. Thread-local, and refuses to rewrite the worktree without --hard.
- heddle resolve Shipped
Resolve merge conflicts, then finish with heddle continue or heddle abort.
- heddle verify Shipped
Verify this workspace; exits nonzero until every check is clean.
Threads, reading and reviewing
- heddle thread Shipped
Manage threads: twenty subcommands covering creation, navigation, refresh, absorb, promote, drop, approval, markers, and cleanup.
thread createCreate a thread ref at the current statethread currentPrint the name of the current thread. Read-onlythread switchSwitch the current checkout to an existing thread refthread cdPrint the on-disk path for a thread. Read-onlythread listList threadsthread showShow one thread with actor and workflow contextthread capturesShow granular captures on a threadthread renameRename a thread refthread refreshRefresh a thread onto its target threadthread moveMove selected captured paths from one thread into anotherthread absorbAbsorb a child thread into its parent or another threadthread resolveGuide a blocked or stale thread toward its next clean statethread promoteMaterialize an existing thread ref at a chosen paththread dropDrop a thread and mark it abandonedthread approveRecord a merge approval for source → targetthread approvalsList approvals recorded for source → targetthread revoke-approvalRevoke a previously recorded approval by idthread check-mergeCheck whether source → target would merge under the repo's branch-protection policies. Read-onlythread cleanupSweep merged, stale auto-created, or abandoned threadsthread markerManage named state markers: list, create, delete, show. A marker is an immutable named reference to a state
- heddle review Shipped
Review a state — render the payload, sign it, walk to the next pending review, and see signal health.
review showRender the review payload for a statereview signSubmit a review signature on a state (kind: read / agent-preview / agent-co-review)review nextWalk to the next pending review when review selection is configuredreview healthPer-module signal health over a rolling window
- heddle context Shipped
Attach reasoning to files, symbols, and line ranges, with on-demand staleness detection. Not projected into Git.
context setAttach a context annotation to a file, symbol, line range, or statecontext getShow context annotations for a targetcontext listList all active context targetscontext historyShow full revision history for one logical annotationcontext editAdd a new revision to an existing logical annotationcontext supersedeCreate a replacement annotation and supersede an older onecontext rmRemove context annotationscontext checkCheck annotation staleness against current codecontext suggestSuggest low-noise targets that may benefit from contextcontext auditAudit stale, superseded, and duplicate contextcontext reason gitMine Git-agent transcripts and attach reasoning as context annotations
- heddle discuss Shipped
Symbol-anchored discussions. Six subcommands; resolution is by-edit or dismiss.
discuss openOpen a new discussion anchored to a (file, symbol)discuss appendAppend a turn to an existing discussiondiscuss resolveResolve a discussion via --mode (by-edit | dismiss)discuss reopenReopen a resolved discussiondiscuss listList discussions filtered by state, symbol, or statusdiscuss showShow a single discussion with its turns
Round-tripping with Git
- heddle export git Shipped reference in progress
Write a complete bare Git repository containing every reachable Heddle state as a Git commit, with branches and tags mirroring threads and markers.
- heddle import git Shipped reference in progress
Import Git commits to Heddle. Walks local branches and tags by default.
- heddle sync git Shipped reference in progress
Bidirectional sync with Git: export followed by import.
Agents and integrations
- heddle agent Shipped
Agent reservation and one-shot orchestration API — the writer-lease protocol for parallel writers. Entirely local.
agent reserveAtomically reserve a thread for one writer; returns a lease_id and a bearer tokenagent heartbeatUpdate reservation heartbeatagent captureCapture under a token-authenticated writer leaseagent readyMark a reservation's thread ready for integrationagent releaseRelease a reservation (status: complete | abandoned)agent listList agent reservations (optionally filtered to alive ones)agent taskManage local agent task assignments: create, list, show, updateagent fanoutPlan and start native fan-out lanes: plan, startagent presenceInspect attribution and work context: list, show, explain, completeagent provenanceRecord provider/model/policy provenance: begin, segment, end, list, show
- heddle daemon Foundation
FUSE mount-daemon control plane, distinct from agent. Needs a --features mount build on Linux (FUSE), macOS (FSKit), or Windows (ProjFS).
daemon serveRun a foreground mount daemon for this repositorydaemon statusReport daemon liveness, version, uptime, and active mount countdaemon stopAsk the running daemon to drain its mounts and exit
Repository care
- heddle doctor Shipped
Explain repository health, plus always-shipped drift-checkers for markdown docs and JSON schemas.
doctor docsDiff-check markdown documentation against the actual CLI surface; exits non-zero on driftdoctor schemasDrift-check docs/json-schemas.md against the registered schemas
- heddle fsck Shipped
Verify repository integrity, or explicitly repair one surface. --git covers the Git projection; repair is a subcommand.
fsck repair gitReconcile Git projection metadata or one projected ref
- heddle redact Shipped
Redact a sensitive blob so reads return a stub. The tombstone stays; the bytes stay until you purge them.
redact applyRedact a blob and write a tombstoneredact listList active redactions in this reporedact showShow the tombstone for a redactionredact trust addAdd an operator public key whose signed redactions this replica accepts over the wireredact trust listList the currently-trusted operator keysredact trust removeRemove an operator public key from the trust list
- heddle redact purge Shipped
Physically remove bytes for an existing redaction. Irreversible, and gated by its own independent trust list.
redact purge applyPhysically remove the blob bytes referenced by an existing redaction. Requires --force, and a signing key authorized by [purge].trusted_keysredact purge listList every Purge oplog entryredact purge trustManage the independent list of keys authorized to destroy bytes: add, list, remove. Redaction trust does not imply purge trust
- heddle shell completion Shipped
Generate a shell completion script on stdout. Lives under heddle shell, with shell init and shell prompt.