CLI reference
heddle undo
Shippedheddle undo [OPTIONS] Undo the last Heddle operation
Output text (default) · json
Flags
--steps <STEPS>, -n <STEPS>- Undo N operations default:
1 --list <LIST>- List recent operations without undoing values:
true · false --depth <DEPTH>- Number of batches to list default:
20 --dry-run <DRY_RUN>- Perform no mutation values:
true · false --hard <HARD>- Permit undo to rewind worktree files to the selected operation's prior state. Without this explicit opt-in, an undo that would rewrite the worktree refuses before changing repository state or files values:
true · false --redo <REDO>- Re-apply operations that a prior `undo` rewound values:
true · false --recover <RECOVER>- Restore the checkout-local state preserved by the most recent undo as worktree changes. HEAD and the current thread remain unchanged values:
true · false --allow-redact-undo <ALLOW_REDACT_UNDO>- Explicit opt-in for undoing a `heddle redact apply`. The inverse removes the redaction record so subsequent materializes restore the original blob bytes — i.e. previously-hidden content becomes readable again. Without this flag, a `heddle undo` chain that crosses a Redact refuses loudly rather than silently re-exposing the content. Refused regardless of the flag when a Purge has destroyed the bytes: Purge is irreversible values:
true · false --op-id <OP_ID>hidden- Operation id (UUID v4) for idempotent retries. See `heddle help operation-ids` Accepted by the CLI, but absent from standard
--help.
Examples
inspect the most recent operation
bash$ heddle undo --dry-runpreview the worktree rewind --hard would apply
bash$ heddle undo --hard --dry-runroll it back and rewind the worktree
bash$ heddle undo --hardroll back the last three operations
bash$ heddle undo -n 3 --hardrestore the state preserved by the last undo
bash$ heddle undo --recoverlist undoable operations on this thread
bash$ heddle undo --list