What problem does it solve?
Headless terminal implementations eliminate the need for a visible terminal UI by providing a programmatic interface to spawn shells, send keystrokes, and capture output for automation, testing, and remote agents. They solve the challenge of driving interactive commands and verifying shell state in CI, test harnesses, and automation tooling where human interaction is not possible or desirable.
Core Features & Use Cases
- Process lifecycle management: spawn shells, check liveness, and terminate cleanly.
- Input and output handling: send keystrokes (including special keys), configure echo behavior, and capture buffered output with explicit encoding.
- Configuration and edge-case handling: select backend libraries (pexpect, pty, subprocess), set terminal dimensions and interactive flags, manage timeouts, and handle signals like Ctrl+C.
- Use cases: CI runners driving interactive installers, automation agents responding to prompts, test harnesses verifying startup files, and logging proxies for replay and debugging.
Quick Start
Start an interactive headless shell, send a command, and return the captured output for verification.