About agent-tui
agent-tui is a CLI skill for automating and verifying terminal UI sessions. It guides agents through a snapshot-and-action loop, with waits for stability or expected text and commands for cleanup.
Key features
- 01Launches and manages UI sessions
- 02Captures snapshots in JSON
- 03Sends key, text, and scroll input
- 04Waits for stability or assertions
- 05Cleans up sessions
Use cases
- 01Automate a terminal UI task
- 02Verify UI changes after an action
- 03Run repeatable session-based checks
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ pproenca/ agent-tui --skill agent-tuiAfter installing, type/agent-tuiin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
agents/openai.yamlreferences/assertions.mdclarifications.mdcommand-atlas.mddecision-tree.mddemo.mdflows.mdoutput-contract.mdprompt-templates.mdrecovery.mdsafety.mdsession-lifecycle.mdtest-plan.mduse-cases.mdDetails
From the project READMEagent-tui
Quick start
- Verify install:
agent-tui --version - Install with
npm i -g agent-tui(orpnpm add -g agent-tui,bun add -g agent-tui). - Alternate install:
curl -fsSL https://raw.githubusercontent.com/pproenca/agent-tui/master/install.sh -o /tmp/agent-tui-install.sh && sh /tmp/agent-tui-install.shorcargo install --git https://github.com/pproenca/agent-tui.git --path cli/crates/agent-tui. - If you used the install script, ensure
~/.local/binis on your PATH. - Start a session:
agent-tui run --format json <command> -- <args...> - Observe:
agent-tui screenshot --format json - Act:
agent-tui press Enter,agent-tui type "text", oragent-tui scroll down - Wait or verify:
agent-tui wait "Expected text" --assertoragent-tui wait --stable - Cleanup:
agent-tui kill --yes
Core workflow
Current automation loop: run -> screenshot -> press/type/scroll -> wait -> kill --yes.
- Run the app with
agent-tui runand capturesession_idfrom JSON output. - Take a fresh snapshot with
agent-tui screenshotoragent-tui screenshot --format json. - Decide the next action based on the latest snapshot.
- Act with
press,type, orscroll. - Synchronize with
wait --assertorwait --stable. - Repeat from step 2 until the task finishes.
- Clean up with
agent-tui kill --yes.
Reliability rules
- Re-snapshot after every action that could change the UI.
- Never act on a changing screen; wait for stability first.
- Verify outcomes with
wait --assertinstead of assuming success. - Always end automation runs with
kill --yesorsessions cleanup --yes.
Legacy migration
Use current commands for new scripts. Legacy compatibility forms still parse for old scripts, but each one writes its deprecation notice to stderr, keeps JSON stdout parseable, and is covered by the next-major removal window.
agent-tui input "text"->agent-tui type "text".agent-tui action <selector> click->agent-tui press Enter.agent-tui action <selector> fill <text>->agent-tui type "<text>".agent-tui screenshot -e->agent-tui screenshot.agent-tui screenshot -a->agent-tui screenshot.agent-tui wait -e <ref>->agent-tui wait "<text>".agent-tui scroll-into-view <selector>->agent-tui scroll <direction> [amount]oragent-tui press ...; the compatibility command does not send terminal input.
Session handling
- Use
--session <id>for every command if more than one session exists. - If you lose the session id, run
agent-tui sessionsandagent-tui sessions show <id>.
Live preview (optional)
- Ask whether a live preview is desired.
- Start preview:
agent-tui live start --open - Stop standalone preview state with
agent-tui live stop; daemon-backed preview remains available untilagent-tui daemon stop --yes.
Deep-dive references
- Full CLI coverage and options:
references/command-atlas.md - JSON output contract:
references/output-contract.md - End-to-end command sequences:
references/flows.md - Quick command selection:
references/decision-tree.md - Session lifecycle and concurrency:
references/session-lifecycle.md - Assertions and test oracles:
references/assertions.md - Failure recovery playbook:
references/recovery.md - Safety and confirmation prompts:
references/safety.md - Clarification checklist:
references/clarifications.md - Test plan template:
references/test-plan.md - Demo script:
references/demo.md - User prompt templates:
references/prompt-templates.md - Minimal command sets by use case:
references/use-cases.md - Explorer/replay automation skill:
../tui-explorer/SKILL.md
Comments
Markdown supported