A lazygit-style terminal UI git client built with Bun, SolidJS, and OpenTUI.
- Bun - Fast JavaScript runtime
- SolidJS - Reactive UI framework
- OpenTUI - Terminal UI library
- simple-git - Git command wrapper
brew tap crob19/tap
brew install opentui-gitUpgrade:
brew update
brew upgrade opentui-gitCheck the releases page for the latest version number, then download:
Intel Mac:
# Replace VERSION with the latest version (e.g., 0.1.1)
curl -L https://github.com/crob19/opentui-git/releases/latest/download/opentui-git-vVERSION-darwin-x64.tar.gz | tar xz
sudo mv opentui-git-darwin-x64 /usr/local/bin/opentui-gitApple Silicon (M1/M2/M3/M4):
# Replace VERSION with the latest version (e.g., 0.1.1)
curl -L https://github.com/crob19/opentui-git/releases/latest/download/opentui-git-vVERSION-darwin-arm64.tar.gz | tar xz
sudo mv opentui-git-darwin-arm64 /usr/local/bin/opentui-git- Bun v1.3.5 or later
- Git installed on your system
bun installRun in any git repository:
opentui-gitNavigate to a git repository and run:
bun run devOr run from any directory:
cd /path/to/your/git/repo
bun run /path/to/opentui-git/src/index.tsxbun run buildOpenTUI includes a built-in console overlay for viewing logs:
- Toggle Console: Press
Ctrl+\to open/close the console overlay - Scroll Logs: Use arrow keys when console is focused
- Resize Console: Press
+or-to adjust console size - All
console.log(),console.error(), andconsole.warn()calls appear in the overlay
The console is useful for debugging git operations and viewing error messages without disrupting the TUI.
| Key | Action |
|---|---|
β or k |
Move selection up |
β or j |
Move selection down |
Space |
Stage/unstage selected file |
a |
Stage all files |
u |
Unstage all files |
r |
Refresh status |
q |
Quit |
Ctrl+C |
Force quit |
- π’ Green - Added/staged files
- π‘ Yellow - Modified files
- π΄ Red - Deleted files
- βͺ Gray - Untracked files
- π΅ Blue - Renamed/copied files
- π£ Magenta - Conflicted files
opentui-git/
βββ src/
β βββ index.tsx # Entry point
β βββ app.tsx # Main application component
β βββ git-service.ts # Git operations wrapper
β βββ types.ts # TypeScript types
β βββ components/
β βββ header.tsx # Branch/status header
β βββ file-list.tsx # File list with colors
β βββ footer.tsx # Keyboard shortcuts help
βββ package.json
βββ bunfig.toml # Bun configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md
β
Display git status with colored file list
β
Keyboard navigation (j/k or arrow keys)
β
Stage/unstage individual files (space)
β
Stage all files (a)
β
Unstage all files (u)
β
Current branch display
β
File count and sync status
β
Quit functionality (q)
β
Error handling for non-git directories
See TODO.md for upcoming features including:
- Commit dialog
- Branch switching
- Diff viewer
- Pull/push operations
- Visual git graph (like VS Code Git Graph)
- And more!
The project uses a Makefile for standardized releases:
# Patch release (0.1.0 β 0.1.1) - Bug fixes
make release-patch
# Minor release (0.1.0 β 0.2.0) - New features
make release-minor
# Major release (0.1.0 β 1.0.0) - Breaking changes
make release-majorThe release script will:
- β Verify working directory is clean
- β Confirm you're on the main branch
- β Check remote is up to date
- β
Bump version in
package.json - β
Create a conventional commit (
chore: release vX.Y.Z) - β Create and push a git tag
- β Trigger GitHub Actions to build and publish
After release:
- GitHub Actions builds binaries for both architectures
- Creates a GitHub Release with downloadable tarballs
- Update the Homebrew formula with new SHA256 checksums (see script output)
The project uses SolidJS with OpenTUI, requiring specific TypeScript settings:
{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "@opentui/solid"
}
}The bunfig.toml includes the SolidJS preload script:
preload = ["@opentui/solid/preload"]Contributions are welcome! Please feel free to submit issues and pull requests.
MIT License - see LICENSE file for details.
Inspired by lazygit - A simple terminal UI for git commands.
Built with:
- OpenTUI by SST
- SolidJS
- simple-git