← All tools

iselur/unedit

Popularity 65 Updated AI & Agents

A safety net for letting an agent loose on your files.

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

unedit

A safety net for letting an agent loose on your files.

Snapshot your working tree before an agent edits it. Step back with one command if you do not like the result. No git required. No daemon running. No background watcher.

pip install stillworks   # one install, all five agent tools, including this one

Or run it straight from a checkout, no install needed — it is stdlib only:

git clone https://github.com/iselur/unedit
cd unedit && python3 -m unedit --help

---

30-second quickstart

$ cd my-project/

# before you hand off to an agent:
$ unedit save -m "before agent refactor"
saved  20260802-230236-724062-qaxj  (4 files, 166 B)
       before agent refactor

# agent runs, makes changes. check what changed:
$ unedit diff
diff vs 20260802-230236-724062-qaxj  2026-08-02 23:02:36  — before agent refactor

added (1)

modified (1) ~ src/app.py (46 B - 154 B)

not happy? step back:

$ unedit back --yes plan: 1 files to restore 1 new files to move aside (created since snapshot)

auto-saving current state before restore... safety snapshot: 20260802-230237-007494-4cx2 (run: unedit back 20260802-230237-007494-4cx2 to undo this restore)

new files moved aside to: /tmp/my-project/.unedit/aside/20260802-230237/

done. 1 restored, 1 moved aside, 0 deleted. to undo: unedit back 20260802-230237-007494-4cx2


Restoring is never a one-way door. `back` prints the plan, then (if you confirm) auto-saves the current state and executes the restore. The auto-save only happens when you confirm — aborting at the prompt creates nothing. The command to undo the undo is always printed.

---

## Why it exists

`git stash` requires a git repository, and every session-based tool (`claude code /rewind`, Gemini CLI checkpoints, OpenCode `/undo`) only protects edits made inside its own session using a shadow git repo internally.

unedit fills the gap where none of those apply: a directory that is not a git repository, or a session where you are handing off to a script, a shell command, or an agent running outside the tools listed above.

The model is deliberately imperative rather than reactive: one explicit `unedit save` before you hand off to any agent or script, one `unedit back` if you do not like the result. The protection never depends on a daemon that was or was not started before the session began.

Why not just ask my AI to do this?

Because the moment things go wrong is precisely the moment you cannot trust the AI to undo them cleanly. unedit runs before you hand off control. It is a snapshot of reality, not a promise by the system that is about to make changes.