A beautiful, interactive TUI for go test
English | 中文
Stop squinting at raw
go testoutput. tgo gives you a real-time, interactive terminal UI with pass/fail highlighting, expandable packages, progress bars, and inline error messages.
Press r to rerun a single failing test — no restart, no re-typing commands. Fix, rerun, repeat. |
tgo --watch monitors your .go files and reruns tests automatically on save. Like Jest, but for Go. |
tgo tracks test speed across runs. If a test gets 1.5x slower, you'll see it flagged with ▲ +45ms. |
- Real-time streaming - watch tests pass and fail as they run
- Interactive navigation - browse packages and tests with keyboard controls
- Expandable packages - drill into any package to see individual test results
- Error summaries - failed tests show a one-line error preview, press Enter for full details
- Rerun failed tests - press
ron any failed test to rerun it instantly without restarting - Watch mode - auto-reruns tests when
.gofiles change - Duration trends - tracks test speed across runs, flags tests that got slower
- Progress bar - visual pass/fail ratio at a glance
- Beautiful UI - rounded borders, color-coded status icons, highlighted cursor
Homebrew
brew install zlrkw11/tap/tgoGo 1.22+
go install github.com/zlrkw11/tgo@latestFrom source
git clone https://github.com/zlrkw11/tgo.git
cd tgo
go build -o tgo .# Run all tests in the current project
tgo ./...
# Run tests in a specific package
tgo ./pkg/auth/...
# Run with default (./...) if no args given
tgo
# Watch mode — auto-rerun on file changes
tgo --watch ./...
tgo -w ./...| Key | Action |
|---|---|
↑ k |
Move up |
↓ j |
Move down |
g Home |
Jump to top |
G End |
Jump to bottom |
Enter Space |
Expand / collapse package or test errors |
r |
Rerun the selected test |
q Ctrl+C |
Quit |
tgo automatically records test durations to ~/.config/tgo/history.json. After a few runs, you'll see trend indicators next to tests that got significantly slower or faster:
▲ +45ms— test got slower (red)▼ -12ms— test got faster (green)
tgo runs go test -json under the hood and parses the structured JSON output in real time. Each test event is streamed into a Bubble Tea TUI that renders an interactive, navigable view of your test results.
go test -json ./... → parse events → Bubble Tea TUI
- Bubble Tea - TUI framework
- Lip Gloss - Style definitions
