A terminal UI for watching and running Go tests. sniffy monitors your project for file changes and reruns tests automatically, with a sidebar for navigating test files and a live output panel.
- Watches
.gofiles for changes and reruns affected tests immediately - Sidebar lists all
_test.gofiles found in the project - Navigate files with arrow keys or
j/k— the output panel shows only that file's results - Toggle files on/off with
spaceto silence noisy or slow tests - Runs tests per file using
go test -v -runwith extracted test function names, not the whole package - Pass/fail state is reflected in color: green for passing, red for failing, blue for pending, gray for disabled
- Respects
maxDepthto avoid descending into deeply nested directories
go install github.com/jwc20/sniffy/cmd/sniffy@latestOr build from source:
git clone https://github.com/jwc20/sniffy
cd sniffy
task buildThe binary is placed in ./bin/sniffy.
| Key | Action |
|---|---|
↑ / k |
Move cursor up |
↓ / j |
Move cursor down |
space |
Toggle selected file on/off |
q / ctrl+c |
Quit |
On startup, sniffy:
- Walks the given directories (up to
maxDepth = 10) and finds all_test.gofiles - Parses each file to extract
TestXxxfunction names - Runs all enabled tests immediately in parallel
- Starts a filesystem watcher; when a
.gofile changes, only the tests in that package rerun
Tests are run as go test -v -run ^(TestFoo|TestBar)$ scoped to the functions in the changed file rather than the
entire package.
- charm.land/bubbletea/v2 — TUI framework
- charm.land/lipgloss/v2 — terminal styling
- fsnotify/fsnotify — filesystem watcher
- fatih/color — colored log output
- gotestyourself/gotestsum — the file watcher implementation is adapted from gotestsum
- lusingander/gotip
- sniffer
