undo-core 0.2.0

Ctrl-Z for AI agents — a universal, reversible side-effect time machine with a CLI (`undo`).
Documentation

undo-core

Ctrl-Z for AI agents. The reversible side-effect engine behind undo, plus the undo command-line tool.

When you let an AI agent (Cursor, Claude, Copilot, Aider, or your own) loose on your machine, undo records every change it makes and reverses all of it with one command — files, directories, permissions, and symlinks restored exactly, crash-safely, under a lock, with redo.

Install the CLI

cargo install undo-core      # installs the `undo` binary

Use it

undo watch                   # snapshot + watch the project — reversible for ANY agent
undo run -- <agent-command>  # snapshot, then run any command reversibly
undo rollback                # rewind everything since the snapshot
undo redo                    # ...changed your mind

Use it as a library

use undo_core::Undo;

let u = Undo::init(std::path::Path::new("."))?;
u.checkpoint("before agent")?;
u.track(std::path::Path::new("src"))?;   // capture before the agent acts
// ... agent runs ...
u.rollback(None)?;                        // exact restore

Filesystem effects are fully reversible today; the same Effect journal is built to carry network, email, and database effects without changing the rollback path.

See the main project for the MCP server, the auto-capture hooks, and the full story.

License

MIT