| name | tui-apps |
| description | Drive common TUI apps — htop, less, lazygit, tig, fzf, nano — for engine-correctness coverage |
| allowed-tools | Bash(agent-tui:*) |
Common TUI apps
Recipes + tested fixtures for the most common terminal apps an agent
might want to drive. Each section maps to a real integration test in
crates/agent-tui-integration/tests/.
Read core first
This skill assumes the core loop and adds per-app recipes.
htop — process viewer
agent-tui spawn -- htop --no-color
agent-tui wait --text "F10"
agent-tui snapshot --mode outline
agent-tui press "q"
htop — setup screen modal
agent-tui spawn -- htop --no-color
agent-tui wait --text "F10"
agent-tui press "<f2>"
agent-tui wait --text "Setup"
agent-tui press "<esc>"
agent-tui wait --text "F10"
agent-tui press "q"
Modal transitions exercise the engine's alt-screen + escape-sequence
handling. Confirms refs reset cleanly after a modal close.
htop — tree mode toggle
agent-tui spawn -- htop --no-color
agent-tui wait --text "F10"
agent-tui press "<f5>"
agent-tui wait --text "├─|\|--"
agent-tui snapshot
agent-tui press "q"
less — file viewer
agent-tui spawn -- less /work/big-file.txt
agent-tui wait --text "big-file"
agent-tui wait --idle 150
agent-tui snapshot
agent-tui press "q"
less has no : prompt to wait on. On open, less renders the
first screenful and shows the filename in the status line (or
(END) if the whole file fits) — it does not print a bare : until
you issue a command. Wait on the filename (or any line you know is on
screen) and/or --idle to settle; wait --text ":" will time out.
less — slash search
agent-tui spawn -- less /work/big-file.txt
agent-tui wait --text "big-file"
agent-tui send-ansi 2f6e6565646c650d
agent-tui wait --text "needle"
agent-tui snapshot
agent-tui press "q"
less — jump to end (G)
agent-tui spawn -- less /work/big-file.txt
agent-tui wait --text "big-file"
agent-tui press "G"
agent-tui wait --text "(END)"
agent-tui snapshot
agent-tui press "q"
fzf — fuzzy finder, candidate list
agent-tui spawn -- bash -c "echo -e 'apple\nbanana\ncherry' | fzf"
agent-tui wait --text "3/3"
agent-tui snapshot
agent-tui press "<c-c>"
fzf — typed filter narrows
agent-tui spawn -- bash -c "echo -e 'apple\nbanana\ncherry' | fzf"
agent-tui wait --text "3/3"
agent-tui type "ban"
agent-tui wait --text "1/3"
agent-tui snapshot
agent-tui press "<c-c>"
fzf — selection goes to stdout
agent-tui spawn -- bash -c "echo -e 'a\nb\nc' | fzf > /work/picked.txt"
agent-tui wait --text "3/3"
agent-tui press "<cr>"
agent-tui wait --idle 200
lazygit — git TUI
agent-tui spawn -- lazygit -p /work/repo
agent-tui wait --text "Files"
agent-tui snapshot
agent-tui press "q"
lazygit — switching panels
agent-tui spawn -- lazygit -p /work/repo
agent-tui wait --text "Files"
agent-tui press "<tab>"
agent-tui press "<tab>"
agent-tui wait --text "Local branches"
agent-tui snapshot
agent-tui press "q"
lazygit — commits panel
agent-tui spawn -- lazygit -p /work/repo
agent-tui wait --text "Files"
agent-tui press "<tab><tab><tab>"
agent-tui wait --text "Commits"
agent-tui snapshot
agent-tui press "q"
tig — git log viewer
agent-tui spawn -- bash -c "cd /work/repo && tig"
agent-tui wait --text "\[main\]"
agent-tui snapshot
agent-tui press "q"
tig — enter a diff view
agent-tui spawn -- bash -c "cd /work/repo && tig"
agent-tui wait --text "\[main\]"
agent-tui press "<cr>"
agent-tui wait --text "\[diff\]"
agent-tui snapshot
agent-tui press "q"
agent-tui press "q"
tig — alt-screen release on quit
After q, tig releases the alt-screen and the adapter re-detects
the parent shell. Useful smoke check for adapter-promotion logic
after a TUI app exits.
nano — opens with default chrome
agent-tui spawn -- nano /work/notes.md
agent-tui wait --text "\\^X Exit"
agent-tui snapshot
agent-tui press "<c-x>"
nano — typing marks the buffer modified
agent-tui spawn -- nano /work/notes.md
agent-tui wait --text "\\^X Exit"
agent-tui type "hello"
agent-tui wait --text "Modified"
agent-tui snapshot
agent-tui press "<c-x>n"
nano — save clears modified
agent-tui spawn -- nano /work/notes.md
agent-tui wait --text "\\^X Exit"
agent-tui type "hello"
agent-tui wait --text "Modified"
agent-tui press "<c-o><cr>"
agent-tui wait --idle 200
agent-tui snapshot
agent-tui press "<c-x>"