a git manager built on openTUI and react

README.md

gitui #

A lightweight, keyboard-driven Git TUI manager built with OpenTUI and Bun.

Features #

  • File status view — see modified, staged, untracked, and deleted files at a glance
  • Selective staging — pick individual files with Space or stage all with A
  • Commit — write commit messages via a clean input overlay
  • Branch management — create branches (c) and switch between them (s) with a navigable branch selector
  • Push & fetch — push commits or fetch remote changes with a single key
  • Restore — discard working-tree changes for selected files
  • Commit log — browse the last 30 commits with scrollable overlay
  • Per-repo stats — staged/unstaged counts, last commit message, current branch in status bar
  • Live refresh — file list updates every 600ms
  • Output panel — shows git command results and errors inline

Screenshots #

Git_TUI screenshot 1 Git_TUI screenshot 2

Keybindings #

Key Action
↑ / k Move cursor up
↓ / j Move cursor down
Space Toggle file selection
a Stage selected files (or all if none selected)
A Stage all files (git add -A)
m Commit staged files
p Push
c Create a new branch
s Switch branch
f Fetch
r Restore selected files
l View commit log
q / Esc Quit

Installation #

From source (Bun) #

# Install dependencies
bun install

# Run directly (no compile)
bun dev

Standalone binary #

# Compile a standalone executable (~103 MB, includes Bun runtime)
bun build --compile ./src/index.tsx --outfile gitui

# Run it
./gitui

Nix #

# From the project root
nix-env -f default.nix -i gitui

# Or with flakes
nix profile install git+https://tangled.org/ijadux2.tngl.sh/Git_TUI

Usage #

Navigate to any Git repository and run gitui:

cd /path/to/your/repo
gitui

The interface shows:

  • An animated title bar with color-cycling "Git_TUI" logo
  • Current branch name and staged/unstaged file counts
  • Scrollable file list with status indicators (● staged, ○ unstaged-selected)
  • Action key hints at the bottom
  • Git command output log

Overlays #

  • Input overlay — appears for commit messages and branch names; type and press Enter to confirm, Esc to cancel
  • Branch selector — navigate with ↑/↓, press Enter to switch, Esc to cancel
  • Log viewer — scroll through recent commits with ↑/↓/j/k, press l or Esc to close

Development #

# Clone the repo
git clone https://tangled.org/ijadux2.tngl.sh/Git_TUI
cd Git_TUI

# Install dependencies
bun install

# Run in watch mode (live reload on file changes)
bun dev

Build #

Standalone binary #

bun build --compile ./src/index.tsx --outfile gitui

Nix package #

# Build with flakes
nix build .

# The binary will be at ./result/bin/gitui

The Nix derivation uses autoPatchelfHook to link system libraries. dontStrip = true is required because bun build --compile produces binaries with a non-standard internal structure that strip corrupts.

Project structure #

.
├── src/
│   └── index.tsx       # Single-file application (~400 lines)
├── default.nix         # Nix derivation (no flakes required)
├── flake.nix           # Flake wrapper
├── package.json        # Bun project config
├── tsconfig.json       # TypeScript configuration
└── README.md

Tech stack #

  • OpenTUI — React-based terminal UI framework
  • Bun — JavaScript runtime, bundler, and package manager
  • React — UI component model
  • Nix — reproducible builds and packaging

License #

MIT