Use when asked to visually review CLI output, screenshot terminal commands, capture TUI recordings, or QA a CLI tool's appearance. Captures static output as PNG via termshot and interactive TUI sessions as GIF via vhs. Supports PR-based review in anvil worktrees and ad-hoc single-command capture.
Visual QA for CLI tools. Captures terminal output as PNG screenshots (termshot) and TUI interactions as GIF recordings (vhs). Two modes: PR review in anvil worktrees, and ad-hoc single-command capture.
Before capturing, verify tools are installed:
which termshot # Static command output -> PNG
which vhs # TUI/interactive -> GIF + PNG
If missing, ask user once then install:
brew install termshot
brew install charmbracelet/tap/vhs
Only install vhs if TUI files are detected in the diff.
Trigger: /visual-review-cli 42 or "visually review CLI changes in PR #42"
Fetch PR details:
gh pr view <number> --json title,headRefName,baseRefName,body,url
Create anvil worktree via the anvil agent: anvil work <branch-name>
Detect build system and build:
go.mod -> go build ./...Cargo.toml -> cargo buildpackage.json with bin -> npm run buildMakefile -> makeGet changed files: git diff <base>...HEAD --name-only
Categorize:
cmd/**/*.go -> Cobra commands, extract name from Use: fieldtea.Model -> TUI components, flag for VHSinternal/**/*.go (non-UI) -> check if referenced by commands--help text changes -> flag those commandsBuild command list with capture method:
scribe sync [TUI - vhs]
scribe list [static - termshot]
scribe --help [static - termshot]
Confirm list with user before proceeding.
See "Capture Commands" section below.
Summary table, open all screenshots in Preview, ask: "Approve, request changes, or more screenshots?"
Remove anvil worktree via the anvil agent. Screenshots persist in /tmp/cli-visual-review/<id>/ (cleaned on reboot).
Trigger: /visual-review-cli "scribe list" or "screenshot scribe list"
Storage: /tmp/cli-visual-review/<id>/ where <id> is PR number or adhoc-<timestamp>.
termshot --show-cmd -f /tmp/cli-visual-review/<id>/<name>.png -- <binary> <args>
Immediately after:
open -a Preview /tmp/cli-visual-review/<id>/<name>.png
Then use Read tool on the PNG to show inline.
Generate a .tape file:
Output /tmp/cli-visual-review/<id>/<name>.gif
Set Shell bash
Set FontSize 14
Set Width 1200
Set Height 600
Type "<binary> <args>"
Enter
Sleep 2s
Screenshot /tmp/cli-visual-review/<id>/<name>.png
Run: vhs /tmp/cli-visual-review/<id>/<name>.tape
Produces GIF (full recording) + PNG (final frame). Open and show inline same as static.
Auto-detect by checking for Bubble Tea imports (tea.Model, tea.Program) in changed files. Use VHS for TUI commands, termshot for everything else.
| Output type | Tool | Format | Flag |
|---|---|---|---|
| Static CLI | termshot | PNG | --show-cmd renders command above output |
| Interactive TUI | vhs | GIF + PNG | .tape script controls timing |
| Command | Type | Status | Screenshot |
|---|---|---|---|
scribe list | static | OK | list.png |
scribe sync | TUI | OK | sync.png + sync.gif |
Open all at once: open -a Preview /tmp/cli-visual-review/<id>/*.png
Ask: "Approve, request changes, or need more screenshots?"
After presenting results, add a review nudge:
Visual QA covers how it looks, not how it works. If you haven't already, consider running a code review (
/review,/code-review, or manual diff review) before approving this PR.