# Terminal Test Pilot

> Automate terminal-based product validation using tmux sessions. Use when testing CLI tools, validating multi-process interactions, capturing terminal output for assertions, or integrating terminal automation with end-to-end test suites.

- Skill: `lurui1997/terminal-test-pilot` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add lurui1997/terminal-test-pilot`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lurui1997/terminal-test-pilot/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: lurui1997 (https://skillmd.com/u/lurui1997)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/lurui1997/terminal-test-pilot

---


# Tmux CLI Driver

Drive terminal validation through programmable tmux sessions.

## Session Setup

- Create a detached session with a descriptive name: `tmux new-session -d -s <test-name>`.
- Use separate windows or panes for isolated processes (server, client, worker).

## Command Execution

- Send commands with `tmux send-keys -t <target> '<command>' Enter`.
- Wait for output readiness with `sleep` or by polling `tmux capture-pane` until a target string appears.

## Output Capture

- Capture pane contents: `tmux capture-pane -t <target> -p`.
- Write captures to temporary files for diffing or grep assertions.

## Cleanup

- Kill the session after each test: `tmux kill-session -t <test-name>`.
- Wrap setup and teardown in a script to ensure isolation even on failure.

## Integration

- Combine with Playwright or Cypress by running the tmux-driven CLI as a subprocess and asserting on exported logs or HTTP endpoints.
- Return structured pass/fail results with captured stdout/stderr for CI consumption.

