shell output tester
Go to file
2026-03-09 21:59:10 -07:00
src Refactor test output to count commands not files 2026-03-09 21:59:10 -07:00
test Add test runner core with CLI and spec updates 2026-03-09 21:32:14 -07:00
.gitignore shout it out 2026-03-09 21:13:41 -07:00
.npmrc shout it out 2026-03-09 21:13:41 -07:00
bun.lock shout it out 2026-03-09 21:13:41 -07:00
CLAUDE.md shell output tester 2026-03-09 21:45:07 -07:00
index.ts shout it out 2026-03-09 21:13:41 -07:00
package.json shout it out 2026-03-09 21:13:41 -07:00
README.md shell output tester 2026-03-09 21:45:07 -07:00
SPEC.md Add test runner core with CLI and spec updates 2026-03-09 21:32:14 -07:00
tsconfig.json shout it out 2026-03-09 21:13:41 -07:00

shout

shout is kinda like really basic integration testing for your cli.

Write .shout files that look like shell sessions and run shout to test 'em.

Install

bun install -g @because/shout

Features

Here are all the features you could ever ask for:

$ echo hello
hello

$ brew --version
Homebrew 5...

$ ls missing
ls: missing: No such file or directory
[1]

... matches anything — a whole line inline, or any number of lines on its own.

[1] after the expected output matches the exit code.

Usage

shout runs code in a temp directory. -k/--keep keeps it around.

--update will modify .shout files to match reality, without running any tests.

Each line in a .shout file is run sequentially, unless --parallel is passed.

Usage: shout [options] [files...]

shell output tester.

Arguments:
  files            Files or directories to test

Options:
  -u, --update     Rewrite expected output in-place with actual output
  -k, --keep       Keep temp directories after run
  --clean-env      Start with empty environment
  --bin <path>     Prepend <path> to PATH
  --timeout <dur>  Per-command timeout (default: "10s")
  -v, --verbose    Print each command as it runs
  --parallel       Run files in parallel
  -h, --help       display help for command