Skip to content

jwc20/sniffy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sniffy

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.

screenshot

Features

  • Watches .go files for changes and reruns affected tests immediately
  • Sidebar lists all _test.go files 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 space to silence noisy or slow tests
  • Runs tests per file using go test -v -run with 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 maxDepth to avoid descending into deeply nested directories

Installation

go install github.com/jwc20/sniffy/cmd/sniffy@latest

Or build from source:

git clone https://github.com/jwc20/sniffy
cd sniffy
task build

The binary is placed in ./bin/sniffy.

Keybindings

Key Action
/ k Move cursor up
/ j Move cursor down
space Toggle selected file on/off
q / ctrl+c Quit

How it works

On startup, sniffy:

  1. Walks the given directories (up to maxDepth = 10) and finds all _test.go files
  2. Parses each file to extract TestXxx function names
  3. Runs all enabled tests immediately in parallel
  4. Starts a filesystem watcher; when a .go file 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.

Dependencies

See also

About

A terminal UI for watching and running Go tests.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages