git dialog — a TUI dialog editor for Git commit messages.
Built with Zig 0.16 and libvaxis. Use it as $GIT_EDITOR / core.editor when you want a structured Subject + Body form instead of a plain text file.
- Subject + Body form in a centered dialog
- Tab / Shift+Tab to move focus (Subject → Body → Confirm → Cancel)
- Confirm and Cancel buttons with keyboard shortcuts
- Parses git
#comment lines inCOMMIT_EDITMSG - Cancel restores the original file (
:q!semantics; exit 0) - UI follows terminal default colors (bold / dim / reverse only)
- Locale-aware UI: English by default; Chinese when
LANG/LC_*starts withzh - macOS Terminal.app compatibility for CJK subject rendering
Requires Zig 0.16+.
cd /path/to/gitdlg
make build
make install
gitdlg --helpBy default, make install installs to ~/.local/bin/gitdlg. Override the location with PREFIX or BINDIR:
make install PREFIX=/usr/local
make install BINDIR=/custom/binEquivalent Zig command:
zig build -Doptimize=ReleaseFastNo Zig? If you prefer not to compile the Zig version, check out the
pybranch for a pure Python 3 implementation.
macOS: brew install zig
Linux (x86_64):
curl -fsSL -o /tmp/zig.tar.xz \
https://ziglang.org/download/0.16.0/zig-x86_64-linux-0.16.0.tar.xz
tar -xf /tmp/zig.tar.xz -C ~/.local/opt
export PATH="$HOME/.local/opt/zig-x86_64-linux-0.16.0:$PATH"
echo 'export PATH="$HOME/.local/opt/zig-x86_64-linux-0.16.0:$PATH"' >> ~/.bashrcMirrors: community mirror list
# persistent
git config --global core.editor gitdlg
# or with an absolute path:
git config --global core.editor /path/to/gitdlg
# one-off
GIT_EDITOR=gitdlg git commit| Key | Action |
|---|---|
| Tab / Shift+Tab | Cycle Subject → Body → Confirm → Cancel |
| ↑↓←→ on buttons | Move between Confirm / Cancel |
| Ctrl+S | Confirm (save message) |
| Enter on button | Activate Confirm or Cancel |
| Esc | Cancel (restore original COMMIT_EDITMSG) |
make testRun individual checks:
make test-unit
make test-integration
make test-smoke
make test-terminalMIT License. Copyright (c) 2026 Jiaji Yin. See LICENSE.
