slay-pty
Interact with PTY terminal sessions via the slay CLI
- License 许可
- GPL-3.0
- 最近更新
- 2026-04-17
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- slay-pty
- trigger
- auto
- description
- Interact with PTY terminal sessions via the slay CLI
03 SKILL.md 正文
PTY commands interact with terminal sessions managed by the SlayZone app — the actual terminal tabs you see in each task. Use these to read output, send input, and orchestrate AI coding agents programmatically.
All commands support ID prefix matching.
Commands
-
slay pty list [--json]List active PTY sessions. Shows session ID, task ID, terminal mode, current state, and age. -
slay pty buffer <id>Dump the full terminal buffer content to stdout. Useful for reading what an AI agent has output without streaming. -
slay pty follow <id> [--full]Stream PTY output in real time.--fullreplays the existing buffer first before streaming new output. Streams until the session exits. -
slay pty write <id> <data>Send raw data directly to PTY stdin. No newline handling or encoding — sends exactly what you provide. Use for low-level control. -
slay pty submit <id> [text] [--wait] [--no-wait] [--timeout <ms>]High-level text submission with AI-mode awareness. If no text argument is given, reads from stdin (pipe-friendly). For AI modes likeclaude-code, internal newlines are encoded as Kitty shift-enter sequences (\x1b[13;2u) so multi-line text is submitted as a single input rather than being split into separate commands.Wait behavior: By default,
submitwaits for the session to reach theattentionstate (= the AI CLI is ready for input) before sending. This is automatic for AI modes. Use--no-waitto send immediately (default for plain terminal modes). Timeout defaults to 60 seconds. -
slay pty wait <id> [--state <state>] [--timeout <ms>] [--json]Block until a session reaches a specific state. Default state isattention(AI ready for input), timeout is 60 seconds. Exit codes: 0 = reached state, 2 = timeout, 1 = session died. -
slay pty kill <id>— terminate a PTY session.
Orchestration patterns
Submit a prompt to a Claude Code session and wait for completion:
slay pty submit <id> "Fix the failing tests in src/auth.ts"
slay pty wait <id> --state attention --timeout 300000
slay pty buffer <id> # read the result
Pipe multi-line input:
cat prompt.md | slay pty submit <id>
04 同仓库更多 Skills
sync-slay-skill
Read CLI command source files and regenerate the slay SKILL.md + init.ts command reference to match
sustainable-solution-question
Asks if the implementation is a sustainable solution
slay
Full CLI reference for slay — orchestrates all slay domain skills
slay-tasks
Manage tasks, subtasks, tags, and templates via the slay CLI
slay-pty
Interact with PTY terminal sessions via the slay CLI
slay-projects
Manage projects via the slay CLI