A lightweight terminal UI for displaying Go tests.
sift is a lightweight terminal UI for displaying Go test results. It allows developers to traverse verbose Go test logs in their terminal. Each test is able to be expanded and collapsed to only show the logs that matter.
go install github.com/timtatt/[email protected]You can try a demo of sift with the sample tests provided in the samples folder.
# Clone the repo
git clone github.com/timtatt/sift.git
# Run sift
go test ./samples/... -v -json | siftsift works by consuming the verbose json output from the go test command. The easiest way to use it is to pipe | the output straight into sift
go test {your-go-package} -v -json | sift
# eg.
go test ./... -v -json | siftbasic-usage.mp4
| Flag | Shorthand | Description |
|---|---|---|
--debug |
-d |
Enable debug view |
--raw |
-r |
Disable prettified logs |
--non-interactive |
-n |
Skip alternate screen and show inline view only |
Example:
# Run in non-interactive mode (inline output)
go test ./... -v -json | sift -n
# Enable debug view
go test ./... -v -json | sift --debug
# Disable log prettification
go test ./... -v -json | sift --rawThe keymaps are based on vim motion standard keymaps for scrolling and managing folds. Press ? to toggle the help menu.
| Key | Action |
|---|---|
↑ / k |
Move up |
↓ / j |
Move down |
{ |
Jump to previous test |
} |
Jump to next test |
[ |
Jump to previous failed test |
] |
Jump to next failed test |
| Key | Action |
|---|---|
ctrl+y |
Scroll viewport up |
ctrl+e |
Scroll viewport down |
ctrl+u |
Scroll half page up |
ctrl+d |
Scroll half page down |
| Key | Action |
|---|---|
enter / space |
Toggle test output |
za |
Toggle test output (vim-style) |
zo |
Expand test output |
zc |
Collapse test output |
zA |
Toggle test recursively (includes subtests) |
zR |
Expand all tests |
zM |
Collapse all tests |
| Key | Action |
|---|---|
/ |
Enter search mode |
esc |
Clear search filter and show all tests |
Search Tips:
- Type to filter tests using fuzzy matching (case-insensitive)
- Press
enterto exit search mode while keeping the filter active - Press
escto clear the search filter and show all tests
| Key | Action |
|---|---|
? |
Toggle help menu |
m |
Change mode |
q / ctrl+c |
Quit |
The UI design of sift is heavily inspired by the vitest cli