| name | agent-terminal |
| description | Terminal and TUI automation CLI for AI agents. Use when the user needs to create a terminal session, run a command in a terminal, automate an interactive CLI or TUI, wait for terminal output, capture a TUI screenshot, export a terminal recording, or test a CLI workflow with reviewable artifacts. |
| advertise | true |
Terminal Automation with agent-terminal
Install the CLI with npm install -g agent-terminal, then use agent-terminal directly.
Prefer isolated homes, JSON envelopes, and renderer-backed artifacts so terminal workflows stay reviewable and reproducible.
Core Workflow
Every terminal or TUI automation task should follow this pattern:
- Create an isolated home with
--home.
- Check prerequisites with
doctor --json before screenshot or recording work.
- Create a session with
create --json.
- Run setup commands with
run instead of simulating long shell typing.
- Wait on observable terminal state with
wait instead of blind sleeps.
- Inspect the current screen with
snapshot.
- Capture proof artifacts with
screenshot or record export.
- Destroy the session when finished.
AGENT_HOME=""
agent-terminal --home doctor --json
SESSION_ID=$(agent-terminal --home create --json -- /bin/bash | jq -r )
agent-terminal --home run
agent-terminal --home --text --json
agent-terminal --home snapshot --format text --json
agent-terminal --home screenshot --json
agent-terminal --home record --format webm --json
agent-terminal --home destroy --json