⚡ TGO
A beautiful, interactive TUI for go test
English | 中文
Stop squinting at raw go test output. tgo gives you a real-time, interactive terminal UI with pass/fail highlighting, expandable packages, progress bars, and inline error messages.
Why tgo?
Rerun failed testsPress r to rerun a single failing test — no restart, no re-typing commands. Fix, rerun, repeat. |
Watch modetgo --watch monitors your .go files and reruns tests automatically on save. Like Jest, but for Go. |
Duration trendstgo tracks test speed across runs. If a test gets 1.5x slower, you'll see it flagged with ▲ +45ms. |
Features
- 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
r on any failed test to rerun it instantly without restarting
- Watch mode - auto-reruns tests when
.go files 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
Installation
Homebrew
brew install zlrkw11/tap/tgo
Go 1.22+
go install github.com/zlrkw11/tgo@latest
From source
git clone https://github.com/zlrkw11/tgo.git
cd tgo
go build -o tgo .
Usage
# 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 ./...
Keyboard Controls
| 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 |
Duration Trends
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)
How It Works
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
Built With
License
MIT