Docs
Command reference
`agent-undo` is intentionally small: one project-local watcher, one SQLite timeline, and a handful of commands for rollback, attribution, and inspection.
Who it is for
The tool is meant for local coding-agent workflows in terminals and editors: Codex, Claude
Code, Cursor, Cline, Aider, and anything else you can either hook directly or wrap with
au exec --agent ... . The happy path is broader than one vendor.
Install
curl -fsSL https://agent-undo.com/install.sh | shcargo install agent-undo Quick start
cd my-project
au init
au serve --daemon
# optional: add built-in Claude Code hooks
au init --install-hooks
# optional: wrap any CLI agent immediately
au exec --agent codex -- codex run "..."
au log
au sessions
au oops Commands
au init [--install-hooks|--uninstall-hooks] [--no-scan] Initialize `.agent-undo/`, write default config, and optionally manage the built-in Claude hook.
au serve --daemon Start the filesystem watcher in the background for the current project.
au stop Stop the project daemon by pidfile.
au status Show root, data directory, database path, and event count.
au log [--agent X] [--file Y] [--since 1h] [--json] Inspect the event timeline in human or machine-readable form.
au sessions List recent recorded agent sessions.
au session start --agent X [--metadata '{...}'] Open an explicit agent session and mark subsequent writes.
au session end <id> Close an explicit session and clear the active marker.
au diff <event-id> | au diff --session <id> Show a unified diff for an event or full session.
au show <event-id> [--before|--after] Print stored file contents for one side of an event.
au restore <event-id> | --file <path> | --session <id> Restore a single event, a file’s last change, or an explicit session.
au oops Undo the latest explicit session when present, otherwise the latest recent burst.
au pin <label> | au pin --list Create and inspect named restore points.
au unpin <label> Restore the whole project to a named pin’s state.
au blame <file> Show per-line attribution from the timeline, similar to `git blame`.
au tui Browse the timeline interactively with a two-pane event/diff view.
au exec --agent X -- <command...> Wrap a command in an explicit session without an editor integration.
au gc Garbage-collect old events and orphaned blobs using `.agent-undo/config.toml`.
au doctor [--fix] Diagnose local setup and optionally repair common issues.