Setup

Record an agent's work, review what changed, and safely undo what you do not want. No account or server needed.

1. Install

Run one command. It downloads the right binary for macOS or Linux and adds it to your PATH.

curl -fsSL https://useundo.co/install.sh | bash

You can also download a binary from the Releases page. Update later with undo update.

2. Record an agent Run

Run your agent through Undo. Recording starts automatically and the work is grouped into one Run.

cd my-project/
undo run claude
1. Starts recording: Undo makes sure the project is ready before launching the agent.
2. Groups the work: Changes made while the agent runs are easy to find and inspect together.
3. Closes the Run: When the agent exits, Undo synchronizes the final changes and completes the Run.
4. Works with other tools: Use undo run codex, undo run opencode, or wrap any command with undo run exec.

3. Review and undo a Run

Inspect the Run, ask Undo to remove unwanted work, then apply the exact plan you reviewed.

undo runs
undo run show r_421
undo ask r_421 "remove the auth migration work"
undo apply rec_812

undo ask changes nothing. Recoveries expire after 24 hours, and apply refuses the whole plan if an affected path changed after the preview.

4. Recover other changes

Runs are optional. Undo can also recover changes made by you, scripts, or tools.

undo timeline --since 10m
undo preview src/server.rs 10m
undo restore src/server.rs 10m
undo restore-deleted src/old-api.rs
undo panic

Use preview before a time-based restore. panic is a read-only dashboard for recent bursts, deletions, and recovery options.

5. Tune retention (optional)

By default, Undo keeps 7 days of history and uses up to 1 GB. Change the defaults globally or per project.

# ~/.undo/config.toml (global) or .undorc (per project)
retention_days = 7
max_size_mb = 1024

Cleanup runs when Undo starts and every hour after that. Use undo prune to run it now, or add --dry-run to preview.

6. Ignore rules (optional)

Undo skips dependencies, build output, Git data, and common secret files by default. Add custom rules in .undoignore:

# .undoignore uses the same syntax as .gitignore
*.log
tmp/
*.sqlite

# negations override the builtin defaults
!dist/   # track dist/ if it's actually source in your project

Files larger than 100 MB are listed in history but not saved. Undo also respects the root .gitignore.

Key concepts

run
Run

A recorded work window for one agent, tool, or task.

recovery
Recovery

A saved, expiring plan of file writes and deletions. Previewing changes nothing.

checkpoint
Checkpoint

A named point in history you can preview or restore later.

history
Continuous history

Local file history that works even when a change was not made inside a Run.