Setup

Install Undo, start watching your project, and restore files when something goes wrong. 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. Start watching

Run Undo from your project root. From then on, it records file changes automatically.

cd my-project/
undo start &   # run in the background
1. Uses file events: Undo uses the built-in file watcher on macOS and Linux.
2. Catches missed changes: When Undo starts, it checks for changes made while it was off.
3. Works per project: Run one watcher per project. undo stop --all stops them all.
4. Avoids risky places: Undo refuses root, system folders, and huge directories unless you pass --force.
5. Check it anytime: undo status shows whether Undo is running, plus disk usage and retention settings.

3. Use your history

Use these when you want to see or recover a change.

undo what-changed 5m             # what changed in the last 5 minutes?
undo diff src/server.rs          # show me the diff
undo restore src/server.rs 10m   # bring back the version from 10 minutes ago
undo timeline                    # full activity log

Before a restore overwrites anything, Undo backs up the current file to ~/.undo/backups/.

4. 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.

5. 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

event
Event

One recorded file change, with the time, path, and content hash.

saved copy
Saved copy

A compressed copy of file content. Identical content is stored once.

retention
Retention

How long history is kept. Defaults are 7 days and 1 GB.

reconcile
Startup check

The check that finds changes made while Undo was off.