Branchless, high-speed shadow version control built for AI coding agents.
In my daily workflow, I rely heavily on coding agents like Claude Code, Cursor, Windsurf, and Aider for refactoring and building features. While these tools write good code, iterative agent development creates a specific set of problems:
- Broken Workspaces: When an agent takes a wrong turn midway through a multi-step task, there is no quick way to inspect prior turns or revert just the broken changes.
- Polluted Commit History: If you let an agent commit every small attempt, your Git log fills up with messy trial-and-error commits.
- Branch Overhead: Creating throwaway branches for every short agent session causes constant stash conflicts, resets language servers, and triggers slow file indexers.
I built edio to provide an invisible safety net during agent sessions without requiring temporary branches.
edio does not replace Git. It is a single Go binary that works inside your existing .git folder. It records turn-by-turn snapshots into an isolated shadow history using low-level Git plumbing.
- Zero Index Pollution: Your staging area (
.git/index), unstaged changes, and active branch stay untouched. - Instant Rollbacks: If an agent makes a mistake on Turn 8, you can open the terminal UI (
edio ui), inspect the diffs, and pressrto restore your working files to Turn 5 in milliseconds. - Single-Command Squash: When the agent finishes and tests pass,
edio accept "feat: add feature"squashes the entire session into one clean commit on your current branch.
I wanted edio to operate without interfering with normal Git workflows. Here is how it achieves isolation:
User Workspace ──► Staged via GIT_INDEX_FILE ──► git write-tree ──► Shadow Commit DAG
(Temporary Index) (refs/edio/active/*)
│
▼ (Deleted immediately)
Primary .git/index stays clean
- Isolated Index (
GIT_INDEX_FILE): Instead of runninggit add(which would overwrite your primary.git/index),ediopoints theGIT_INDEX_FILEenvironment variable to a temporary scratchpad. It stages files there, creates a tree object usinggit write-tree, and deletes the temporary index file immediately. - Shadow Commit DAG (
refs/edio/*): Each turn is committed withgit commit-treeand linked to the previous turn under a custom reference namespace (refs/edio/active/<session_id>/<turn>). Your active branch pointer andHEADnever move. - Atomic Promotion on Accept: When you run
edio accept,edioreads the tree SHA from the latest turn, creates a single commit pointing toHEADas its parent, and advances your active branch. - Automated Garbage Collection: Stale sessions older than 10 days have their reference pointers pruned automatically, allowing Git's native object pruner (
git prune) to reclaim disk space.
brew install devxdh/tap/ediocurl -fsSL https://raw.githubusercontent.com/devxdh/edio/main/install.sh | bashgo install github.com/devxdh/edio/cmd/edio@latestPre-compiled binaries for Linux, macOS, and Windows are available on the Releases page.
Here is how you can use edio in any Git repository:
cd /path/to/your/project
edio initThis sets up .git/edio/ and automatically configures MCP servers and lifecycle hooks for your installed AI tools.
As you or your agent modify files, record snapshots after each logical step:
# Edit code
echo "func ValidateToken() {}" >> auth.go
# Take a shadow snapshot
edio snapshot -m "added token validation"Your regular git status and commit history remain completely untouched.
edio logOutput:
Session sess_1787756569_0babd925 (3 turns)
* [Turn 1] (7c836f4) added HandleAuth function
* [Turn 2] (7e7dbee) added token validation
* [Turn 3] (868d16e) added auth unit tests
edio ui- Navigate turns with
j/k(or arrow keys). - Inspect syntax-highlighted diffs on the right panel.
- Press
ron any turn to instantly revert your workspace to that state. - Press
Tabto scroll the diff viewport. - Press
qto quit.
When you are satisfied with the final result:
edio accept "feat: implement user authentication"All turns from the session are squashed into a single clean commit on your active branch.
Running edio init automatically configures your repository for all major agent environments:
edio init generates MCP configuration files for your IDEs:
- Cursor:
.cursor/mcp.json - Gemini CLI / Antigravity:
.gemini/settings.json - VS Code / Cline / Roo Code:
.vscode/mcp.json
{
"mcpServers": {
"edio": {
"command": "edio",
"args": ["mcp"]
}
}
}Exposed MCP Tools:
edio_snapshot: Allows the model to take snapshots with descriptive summaries.edio_log: Allows the model to inspect past turns in the session.edio_restore: Allows the model or user to roll back the full workspace or a single file (-f).
edio init writes a Stop event hook to .claude/settings.json:
{
"hooks": {
"Stop": [
{ "type": "command", "command": "edio snapshot -m \"prompt turn completed\"" }
]
}
}Every time Claude completes a turn or tool call, a snapshot is recorded automatically in the background.
For CLI agents or custom scripts without hook support, prefix the execution command with edio run:
# Wraps Python agent scripts
edio run python agent.py "refactor database schema"
# Wraps Aider
edio run aider --message "add unit tests"edio run forwards terminal I/O interactively and captures a snapshot as soon as the child process exits.
edio initalso createsEDIO.mdin the project root to instruct scanning LLMs (ChatGPT, Grok, DeepSeek) to useedio snapshotinstead of running rawgit commitcommands.
edio manages disk storage safely at the session boundary:
- Automatic Background Cleanup: Whenever you run
edio accept,ediochecks for and prunes shadow sessions older than 10 days. - Manual Pruning: You can trigger cleanup manually at any time:
edio gc # Prune sessions older than 10 days (default) edio gc --days 3 # Prune sessions older than 3 days
- Active Session Safety:
edio gcstrictly protects your active session from deletion, only pruning completed or abandoned sessions.
| Command | Description |
|---|---|
edio init |
Configure shadow storage, agent hooks, and MCP servers in the repo |
edio snapshot -m "<msg>" |
Record an isolated turn snapshot of current workspace state |
edio run <command> [args...] |
Run an agent command and auto-snapshot on process exit |
edio log [-p] |
Display turn history for the active session (-p for patch diffs) |
edio diff [turn] [-f file] |
Show colorized diff for a specific turn |
edio restore <turn> [-f file] |
Roll back workspace (or single file) to a specific turn |
edio accept "<commit_msg>" |
Squash all session turns into a clean commit on current branch |
edio gc [-d <days>] |
Clean up shadow sessions older than retention limit (default: 10 days) |
edio ui (alias: tui) |
Launch the interactive split-pane terminal dashboard |
edio mcp |
Start the stdio Model Context Protocol (MCP) JSON-RPC server |
git clone https://github.com/devxdh/edio.git
cd edio
make build
make testThe compiled binary will be placed at ./bin/edio.
For an in-depth explanation of the codebase architecture and internal packages, see ARCHITECTURE.md.
MIT License. See LICENSE for details.