Headless terminal - Allow agents to run any interactive TUI or CLI
FreeAbout Headless terminal - Allow agents to run any interactive TUI or CLI
Headless terminal is a CLI tool and daemon that acts as a 'puppeteer for terminal UIs'. It allows users to spawn interactive terminal applications like vim, emacs, htop, or nethack in a background pseudo-terminal session, send keystrokes with vim-style notation, snapshot the screen as text or PNG, and optionally stream the session live to another shell. Under the hood, it uses a Unix-socket daemon that owns a pseudo-terminal per session and pipes output through the libghostty-vt parser for accurate VT emulation. Designed for AI agents, CI tests, demo recording, and follow-along debugging, the tool provides synchronization primitives so the driver knows when the TUI has finished redrawing. It includes commands: ht run, ht send, ht view, ht remove, ht record, ht watch, and ht stop.
Key Features
Pros & Cons
- Enables agentic control of TUIs that normally require a human at a keyboard
- Uses a real pseudo-terminal, so programs behave as if attached to a tty
- VT parser from Ghostty provides accurate terminal emulation (cursor, scrollback, styles)
- Can snapshot screen as both text and PNG for easy verification
- Live streaming feature aids debugging and pair programming
- Open source and free to use
- Requires a Unix-like system due to Unix-socket daemon
- Keystroke notation may have a learning curve for non-vim users
- No prebuilt binaries provided; must build from source with Go toolchain
- Not a standalone GUI application; purely command-line based