GitFlow TUI
GitFlow-aware terminal UI built with Bubble Tea for day-to-day branch, status, diff, stash, and release workflows, with optional AI-assisted commit messages and conflict prediction.
- Go
- Bubbletea
- GitFlow
- WebSockets
The problem
GitFlow means a lot of context switching: one terminal for git flow feature start, another for status, another for a diff viewer, another for drafting the PR description. Each tool has its own mental model.
Approach
GitFlow TUI puts branch management, status, log, diff, and stash in one keyboard-driven terminal interface, with GitFlow’s start/finish workflow built in.
go install github.com/Polqt/gitflowtui/cmd/gitflow-tui@latestgitflow-tui path/to/repoDiffs render in two modes, line-level and word-level, switchable without leaving the view. Finishing a feature branch can generate a pull request template directly.
Why Go for This One
Clifolio taught me Bubble Tea, reaching for Go again wasn’t really a decision. But it turned out right for a different reason than “I already know it.”
A git TUI shells out to git constantly, and every one of those calls can be slow on a repo with real history. Go’s goroutines make “run this in the background” cheap enough that I made every git call async without a second thought.
Git itself is written in C, fast, unopinionated, does one thing directly. Go has that same energy, no framework standing between you and the syscall.
Why Async by Default
Most terminal git tools block on every operation. Run git log on a big repo and the whole UI freezes until it returns, miserable on a repo with a few thousand commits.
Every git call runs on a background goroutine and reports back over a channel, so the UI stays responsive. Cost: more state to track, in-flight operations can complete out of order.
AI Layer
An optional AI integration, local Ollama or the Anthropic API, handles conflict prediction, plain-language diff explanations, and commit message suggestions. It’s opt-in, the tool works fully without it.
The conflict prediction piece looks at the diff before a merge and flags files where both sides touched overlapping lines. Not trying to replace reading the diff, just saving the five seconds of dread before you find out.
Stack
Written in Go using Bubble Tea. State changes stream out over a WebSocket (GITFLOW_TUI_WS_ADDR) so an external tool can observe what the TUI is doing. Branch naming conventions are configurable via environment variables, no two teams name their GitFlow branches the same way.
What I’d Do Differently
I’d design the WebSocket state streaming in from day one instead of bolting it on after. Retrofitting an observable layer meant touching almost every state transition to add a broadcast call, nearly free if planned upfront.