![[Python] opendot - a terminal AI coding agent where every action is snapshotted first, so you can fully undo what it did](https://preview.redd.it/thm7whd0nakh1.png?auto=webp&s=98d30be0a30d3c92b84a96264bed123630a0ba59)
[Python] opendot - a terminal AI coding agent where every action is snapshotted first, so you can fully undo what it did
Letting an AI agent loose on my real files always made me nervous: it runs a dozen tool calls, edits files, runs shell commands, and if one is wrong there's no clean way back. Git only covers tracked files, not the untracked mess or the shell side effects. So I built opendot around fixing that.
The core idea is reversibility. Before every file write or shell command, opendot snapshots the working directory into a content-addressed store (each file stored once, so it's cheap) and logs it to an append-only ledger. Then opendot undo walks it back exactly, opendot redo re-applies if you went too far, and opendot diff <id> shows which files an undo would change before you commit. Files and shell commands, not just in-repo edits.
The part I care most about is being honest about what can't be undone. A classifier separates workspace-contained commands (auto-run, undoable) from escaping ones (network, sudo, git push, deleting outside the workspace), which get flagged and confirmed first with a plain note that they aren't reversible. When it's unsure, it asks.
One thing I learned: "just undo" isn't enough to actually trust an agent, you need to see the state. So opendot log shows a timeline with a "you are here" cursor, so you can tell at a glance what's applied and what you've undone but could still redo.
The rest: model-agnostic via LiteLLM (OpenAI, Anthropic, Google, DeepSeek, local Ollama), budget caps (--usd 0.50 stops the run at 50 cents), a permission policy (--yes plus --allow/--deny) for unattended/CI runs, MCP client + Composio for 1000+ app tools, and session resume.
MIT, and I actively review PRs (good-first-issues if anyone wants to jump in).
pip install opendot
Repo: https://github.com/vedaant00/opendot
Happy to answer anything about the reversibility approach.