sift

command module
v0.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 5 Imported by: 0

README

sift

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.

Screenshot

screenshot

Installation

go install github.com/timtatt/[email protected]

Try it out!

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/... -json | sift

Usage

sift 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} -json | sift

# eg.
go test ./... -json | sift

Demo (v0.9.0)

CLI Flags
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 ./... -json | sift -n

# Enable debug view
go test ./... -json | sift --debug

# Disable log prettification
go test ./... -json | sift --raw
Keymaps

The keymaps are based on vim motion standard keymaps for scrolling and managing folds. Press ? to toggle the help menu.

Navigation
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
Viewport Scrolling
Key Action
ctrl+y Scroll viewport up
ctrl+e Scroll viewport down
ctrl+u Scroll half page up
ctrl+d Scroll half page down
Toggle/Expand/Collapse Tests
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 enter to exit search mode while keeping the filter active
  • Press esc to clear the search filter and show all tests
Other
Key Action
? Toggle help menu
m Change mode
q / ctrl+c Quit

Credits

The UI design of sift is heavily inspired by the vitest cli

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL