git-sim shows how Git commands would change your repository before you run them. It runs from the terminal, browser, VS Code, Jupyter, and CI integrations.
Overview
git-sim adds a visual layer on top of local Git worktrees. By prefixing commands with git-sim instead of git, you get an interactive graph of what would happen without altering your working copy. Output can open in a browser, save as HTML, or export as PNG, SVG, or video in some modes.
Live mode records Git operations over time, including from AI coding agents, so you can replay and share a session. Pre-flight mode evaluates whether a command is safe, what might be lost, and how to undo it, again without writing changes to disk. Hooks and an MCP server can wire these checks into agents such as Claude Code, Cursor, Copilot, and Gemini CLI.
A VS Code extension exposes simulate, pre-flight, live graph, and agent wiring from the editor; the same extension is noted for Cursor, Windsurf, and VSCodium via Open VSX. Jupyter users can run git-sim in the notebook environment, and a GitHub Action can attach visual merge descriptions to pull requests.
Install via pip, pipx, or uv on Windows, macOS, or Linux with Python 3.10 or newer and Git. By default, graph data can stay in the URL fragment so it is not sent to remote servers; optional public share links store data on initialcommit.com if you choose that path.
Key features
- Simulate Git commands without side effects
- Live recording of repo Git activity
- Pre-flight risk checks for commands
- VS Code and Open VSX extension
- Jupyter notebook integration
- GitHub pull request Action
- MCP server and agent hooks
- Shareable HTML, image, and video output
Use cases
- Previewing merge or rebase outcomes
- Reviewing agent-run Git commands
- Teaching Git with interactive graphs
- Documenting PR merge effects in CI
- Embedding graphs in docs or blog posts