A standalone terminal Git UI - a port of Neogit. Built with Bubble Tea and go-git.
Magit is the best Git interface ever made. When I left Emacs, Neogit filled the gap in Neovim - but I wanted something editor-agnostic that I could launch from any terminal, in any project. termagit is that.
Note
This project aims to be a port of Neogit - same look and feel, minus the editor integration. The code is written by Claude Code Opus 4.6. My role is specs, prompts, review, and testing.
- Full status buffer with all 12 Neogit sections (untracked, unstaged, staged, stashes, recent commits, upstream/push-remote tracking, sequencer, rebase, bisect)
- 22 popups matching Neogit's layout - commit, branch, push, pull, fetch, merge, rebase, stash, reset, revert, cherry-pick, tag, remote, diff, log, bisect, worktree, ignore, and more
- Inline diffs - expand files and hunks directly in the status buffer
- Hunk-level staging - stage, unstage, and discard individual hunks; use visual mode (
V) on diff lines to stage or unstage a custom line range within a hunk - Multiple views - log, reflog, commit detail, refs, stash list, diff, command history
- Commit editor with (a limited set of) vim keybindings and staged diff preview
- Interactive rebase editor
- File watcher - auto-refreshes when the working tree changes
- Themeable - ships with catppuccin-mocha, everforest-dark, and tokyo-night; supports custom themes via TOML. See the docs for details and tips on creating your own!
- All Neogit key bindings - if you know Neogit, you know termagit
Warning
This project is in its early stages - expect bugs and missing features. I'm using termagit as my daily driver, so I'll be fixing issues and adding features as they come up.
go install github.com/mhersson/termagit/cmd/termagit@latestgit clone https://github.com/mhersson/termagit.git
cd termagit
make build # binary at bin/termagit
make install # copies to $GOPATH/bin/Requires Go 1.26+.
termagit # open in current directory
termagit -path /path/to/repo # open a specific repository
termagit -theme everforest-dark # override the color theme
termagit -version # print versiontermagit can be launched from Helix via
:insert-output. Add the following to your Helix config.toml to bind
<Space>gg in normal mode:
[keys.normal.space.g]
g = [
":write-all",
":new",
":insert-output termagit",
":set mouse false",
":set mouse true",
":buffer-close!",
":redraw",
":reload-all"
]This works on macOS and Linux. On Linux, termagit disables the kitty keyboard protocol inherited from Helix so that ESC and Ctrl-C are sent as standard bytes rather than CSI u sequences.
termagit uses a TOML config file at ~/.config/termagit/config.toml (or
$XDG_CONFIG_HOME/termagit/config.toml). Missing fields fall back to sensible
defaults - you only need to specify what you want to change.
See docs/configuration.md for the full reference with all options and their defaults.
Quick example:
theme = "everforest-dark"
[ui]
recent_commit_count = 20
[sections.stashes]
folded = false12 built-in themes are available:
Different variants of the following themes are supported (e.g.
catppuccin-latte, catppuccin-frappe, etc.):
catppuccin(catppuccin-mocha is default)everforest-darkgruvboxsolarizedtokyo-night
Custom themes can be placed in ~/.config/termagit/themes/ as TOML files. The
easiest way is to define a palette of ~21 colors - termagit maps them to all UI
elements automatically. See docs/themes.md for the full guide.
termagit uses the same key bindings as Neogit. Here are the essentials:
| Key | Action |
|---|---|
j / k |
Move down / up |
tab |
Toggle fold |
s / S |
Stage item / Stage all unstaged |
u / U |
Unstage item / Unstage all |
x |
Discard changes |
Enter |
Go to file |
c |
Commit popup |
b |
Branch popup |
P |
Push popup |
p |
Pull popup |
f |
Fetch popup |
m |
Merge popup |
r |
Rebase popup |
Z |
Stash popup |
l |
Log popup |
d |
Diff popup |
X |
Reset popup |
v |
Revert popup |
A |
Cherry-pick popup |
B |
Bisect popup |
t |
Tag popup |
w |
Worktree popup |
i |
Ignore popup |
M |
Remote popup |
? |
Help popup |
$ |
Command history |
q |
Close |
When the cursor is on a diff line inside an expanded hunk, pressing V enters
visual selection mode. This lets you stage or unstage a custom subset of lines
within a hunk.
How to use it:
- Expand a file with
tab, then expand a hunk (or navigate into hunk lines). - Move the cursor onto a diff line (a
+or-line inside the hunk). - Press
Vto enter visual mode. The line under the cursor becomes the anchor. - Press
j/kto extend the selection up or down. - Press
sto stage only the selected lines, oruto unstage them. - Press
Escto exit visual mode without performing any action.
The selected line range is turned into a minimal unified diff patch and applied
with git apply, so the rest of the hunk is left untouched.
- Magit - the original and best Git porcelain
- Neogit - the Neovim plugin that termagit mirrors
- Bubble Tea and Lip Gloss - the TUI framework and styling library
- go-git - pure Go git implementation
- Claude Code - wrote all the code
