Command Palette

Search for a command to run...

Назад к скиллам
скилл № 06328

agent-tty

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…

БесплатноБез исполняемых скриптов
coderот coder★ 33 звезды на GitHub

Установить agent-tty в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Terminal Automation with agent-tty

If agent-tty is not already available in the environment, fetch the current README.md from coder/agent-tty on GitHub and follow its installation instructions before continuing. Otherwise use agent-tty directly. Examples use jq for JSON parsing; any JSON-processing tool works. 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:

  1. Create an isolated home with --home.
  2. Check prerequisites with doctor --json before screenshot or recording work.
  3. Create a session with create --json.
  4. Run setup commands with run instead of simulating long shell typing.
  5. Wait on observable terminal state with wait instead of blind sleeps.
  6. Inspect the current screen with snapshot.
  7. Capture proof artifacts with screenshot or record export.
  8. Destroy the session when finished.
AGENT_HOME="$(mktemp -d)"
agent-tty --home "$AGENT_HOME" doctor --json
SESSION_ID=$(agent-tty --home "$AGENT_HOME" create --json -- /bin/bash | jq -r '.result.sessionId')
agent-tty --home "$AGENT_HOME" run "$SESSION_ID" 'printf "ready\n"'
agent-tty --home "$AGENT_HOME" wait "$SESSION_ID" --text 'ready' --json
agent-tty --home "$AGENT_HOME" snapshot "$SESSION_ID" --format text --json
agent-tty --home "$AGENT_HOME" screenshot "$SESSION_ID" --json
agent-tty --home "$AGENT_HOME" record export "$SESSION_ID" --format webm --json
agent-tty --home "$AGENT_HOME" destroy "$SESSION_ID" --json

wait gives up after 30 s by default and exits 11 (WAIT_TIMEOUT). Pass --timeout <ms> for a slower program, or --timeout 0 to wait without a limit. A batch wait step without "timeout" uses the same 30 s default.

Essential Commands

# Environment and lifecycle
agent-tty --home <path> doctor --json
agent-tty --home <path> create --json -- /bin/bash
agent-tty --home <path> inspect <session-id> --json
agent-tty --home <path> destroy <session-id> --json

# In-session control
agent-tty --home <path> run <session-id> 'command here' --json
agent-tty --home <path> type <session-id> 'literal text' --json
agent-tty --home <path> paste <session-id> 'multiline payload' --json
agent-tty --home <path> send-keys <session-id> Enter Ctrl+C --json
agent-tty --home <path> mouse <session-id> press --button left --row 8 --col 20 --json
agent-tty --home <path> batch <session-id> '[{"run":"htop","noWait":true},{"wait":{"screenStableMs":1000}}]' --json

# Observation and proof
agent-tty --home <path> wait <session-id> --text 'ready' --json
agent-tty --home <path> wait <session-id> --regex 'READY>$' --scope cursor-line --json
agent-tty --home <path> wait <session-id> --screen-stable-ms 1000 --json
agent-tty --home <path> snapshot <session-id> --format text --json
agent-tty --home <path> screenshot <session-id> --json
agent-tty --home <path> screenshot <session-id> --out ./proof.png --json
agent-tty --home <path> record export <session-id> --format webm --json

Common Patterns

Bootstrap a shell session

AGENT_HOME="$(mktemp -d)"
SESSION_ID=$(agent-tty --home "$AGENT_HOME" create --json -- /bin/bash | jq -r '.result.sessionId')
agent-tty --home "$AGENT_HOME" run "$SESSION_ID" 'pwd && ls -la' --json
agent-tty --home "$AGENT_HOME" snapshot "$SESSION_ID" --format text --json

snapshot and a matched wait carry an optional screenHash (a hash of the visible screen text). Compare it across calls to tell whether the visible screen actually changed instead of diffing full text; equal hashes mean identical visible content even when the event sequence advanced.

Drive an interactive CLI or TUI

Use batch to run an ordered sequence of input-and-wait steps in one call instead of separate run/wait/send-keys invocations. Each wait step is anchored to a Wait Baseline — it only observes screen state produced after the preceding input step, so the sequence cannot race ahead and match a stale screen. A batch stops at the first failed step by default (--keep-going attempts every step).

Use mouse for TUI hit-testing, scrolling, and drag behavior. Coordinates are zero-based cells. A drag is three actions: press --button left, one or more button-free move actions, then release --button left. The child must enable mouse tracking; a suppressed event returns reported: false. Mouse input requires the mouse-input capability that agent-tty doctor --json reports, and must never be replaced with a hard-coded SGR sequence.

AGENT_HOME="$(mktemp -d)"
SESSION_ID=$(agent-tty --home "$AGENT_HOME" create --json -- /bin/bash | jq -r '.result.sessionId')
agent-tty --home "$AGENT_HOME" batch "$SESSION_ID" '[
  { "run": "<interactive-command>", "noWait": true },
  { "wait": { "screenStableMs": 1000 } },
  { "sendKeys": ["Down", "Down", "Enter"] },
  { "wait": { "text": "<exp
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл agent-tty?

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.

Как установить скилл agent-tty?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл agent-tty запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить agent-tty с