You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e05b233
Browse filesBrowse the repository at this point in the historyBrowse files
Drop the editor plugins and keep the docs in one README
The Vim, Neovim, and Emacs plugins only opened the graph in a browser
tab, the same as running git-sim from the editor's shell prompt, and the
Neovim one was never run. They're removed, along with every mention of
them.
The nested READMEs, docs/shell.md, and docs/integrations.md are folded
into the main README: Get started has a step each for Jupyter and pull
requests, and Installation has Terminal (git sim, aliases, completion,
lazygit and tig), Jupyter, and GitHub (gh sim and the Action) sections.
The test READMEs move into docs/testing.md. vscode/README.md stays, since
it is the extension's Marketplace page.
Signed-off-by: Jacob Stopak <jacob@initialcommit.io>
Copy file name to clipboardExpand all lines: README.md
+127-7Lines changed: 127 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
**The visual layer for Git in your own repos:** simulate, record, replay, audit, and share individual Git commands or entire Git workflows, wherever you or your agents run them.
7
7
8
-
-**Simulate any Git command before it runs**, as an interactive graph you can step through. In the terminal, on the web, and in VS Code, Jupyter, Vim / Neovim / Emacs, and GitHub pull requests.
8
+
-**Simulate any Git command before it runs**, as an interactive graph you can step through. In the terminal, on the web, and in VS Code, Jupyter, and GitHub pull requests.
9
9
-**Track your repo live** while recording every Git operation, human or agentic, as a visual command sequence you can replay. On the web and in VS Code.
10
10
-**Catch and review risky Git commands from AI agents** in real time, before they harm your work. Claude Code, GitHub Copilot, Cursor, Codex, Gemini CLI, and any MCP agent.
11
11
-**Share any git-sim output** as a link, an embed, an HTML page, a PNG or SVG image, an MP4 video, or a social post.
@@ -53,7 +53,7 @@ $ git-sim rebase main
53
53
54
54
By default, git-sim creates a web-first, shareable visualization that opens in your browser. It generates an interactive simulation of exactly how any Git command will impact your repo, without actually running the real Git command so nothing changes in your repo.
55
55
56
-
Run `git-sim -h` to list every command.
56
+
Run `git-sim -h` to list every command. Once git-sim is installed, `git sim <command>` works too, and `git-sim aliases` adds `git preflight` and `git live` (see [Terminal](https://github.com/initialcommit-com/git-sim#terminal)).
57
57
58
58
**3. Watch your repo live:** a graph that follows your repo as it changes, and records every command you (or your agents) run
Or search for **git-sim** in the Extensions view (the Marketplace in VS Code, Open VSX in Cursor, Windsurf, and VSCodium).
71
71
72
-
**5. Vim, Neovim, and Emacs integration**
72
+
**5. Jupyter integration:** with git-sim installed in the notebook's environment, the graph shows up right under the cell
73
73
74
-
For Vim, Neovim, and Emacs, see [integrations/](https://github.com/initialcommit-com/git-sim/tree/main/integrations/).
75
-
76
-
**6. Jupyter integration**
74
+
```
75
+
%load_ext git_sim.jupyter
76
+
%gitsim rebase main
77
+
%gitsim live
78
+
```
77
79
78
-
For Jupyter, `gh`, and GitHub Actions, see [docs/integrations.md](https://github.com/initialcommit-com/git-sim/blob/main/docs/integrations.md).
80
+
**6. Pull request integration:**`gh sim pr 42` simulates merging a pull request, and the git-sim GitHub Action comments the pre-flight report on each one. See [Installation](https://github.com/initialcommit-com/git-sim#github).
79
81
80
82
**7. Check a risky command before it runs:** how risky it is, and what you could lose
81
83
@@ -768,6 +770,124 @@ This will enable you to run git-sim subcommands as [described above](https://git
768
770
769
771
</details>
770
772
773
+
### Terminal
774
+
775
+
Git runs any program named `git-<name>` as `git <name>`, so `git sim rebase main` works as soon as git-sim is installed. To add `git preflight` and `git live` to your global Git config:
776
+
777
+
```console
778
+
$ git-sim aliases
779
+
```
780
+
781
+
`--local` adds them to the current repo only, and `--remove` takes them out. Aliases you already have with those names are left alone.
782
+
783
+
For tab completion in bash, zsh, fish, or PowerShell, run `git-sim --install-completion` and restart your terminal.
784
+
785
+
<details>
786
+
<summary>lazygit and tig key bindings</summary>
787
+
788
+
In lazygit's `config.yml` (`lazygit --print-config-dir` shows where it is):
789
+
790
+
```yaml
791
+
customCommands:
792
+
- key: "S"
793
+
context: "localBranches"
794
+
description: "git-sim: simulate rebasing onto this branch"
795
+
command: "git-sim rebase {{ .SelectedLocalBranch.Name }}"
796
+
- key: "S"
797
+
context: "commits"
798
+
description: "git-sim: simulate resetting to this commit"
Commands run in the notebook's working directory, or the `-C` path. The graph's frame grows to fit it unless you set `--height`. `%gitsim live` runs live mode in the background until you stop it or restart the kernel, and needs Jupyter running on your own machine (not Colab, JupyterHub, or Binder).
837
+
838
+
### GitHub
839
+
840
+
<details>
841
+
<summary>GitHub CLI: gh sim</summary>
842
+
843
+
With the [GitHub CLI](https://github.com/cli/cli#installation) installed and logged in (`gh auth login`), install the extension from a clone of this repo:
$ gh sim pr 42 # what merging pull request #42 into its base would do
855
+
$ gh sim pr 42 rebase # what rebasing it onto its base would do
856
+
```
857
+
858
+
`gh sim pr` simulates in a temporary worktree, so your checkout and branches are never touched. Any other `gh sim` command is the same as running git-sim. On Windows, `gh` runs the extension with the bash from Git for Windows.
859
+
860
+
</details>
861
+
862
+
<details>
863
+
<summary>GitHub Actions: a pre-flight comment on each pull request</summary>
864
+
865
+
Add this to your repo as `.github/workflows/git-sim.yml`:
Each pull request gets one comment with the risk level, the commits that come in, what you could lose and how to undo it, and a text commit graph. The interactive graph is attached to the run as the artifact `git-sim-pr-<number>`.
886
+
887
+
Inputs, set under `with:`: `mode`(`merge` or `rebase`, default `merge`), `comment` and `artifact` (`"true"` or `"false"`), `python-version` (default `3.12`), and `token`. Pull requests from forks get a read-only token, so set `comment: "false"` if you take them.
888
+
889
+
</details>
890
+
771
891
## Support git-sim
772
892
773
893
Git-Sim is Free and Open-Source Software (FOSS). Your support will help me work on it (and other Git projects) full time!
Copy file name to clipboardExpand all lines: docs/mcp.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Running it again updates git-sim's entries in place. `git-sim unwire-agents` rem
61
61
62
62
git-sim writes the hook and MCP server as full paths, so they work even when an agent's `PATH` doesn't include git-sim.
63
63
64
-
Where you type `git` yourself, `git sim <command>` already works, and `git-sim aliases` adds `git preflight` and `git live`. See [shell.md](shell.md).
64
+
Where you type `git` yourself, `git sim <command>` already works, and `git-sim aliases` adds `git preflight` and `git live`. See [Terminal](../README.md#terminal).
0 commit comments