Show HN: TUI-use: Let AI agents control interactive terminal programs

tui-use is a bridge that allows AI agents to interact with terminal programs designed for humans, enabling them to handle REPLs, installers, and complex TUI applications.
Like BrowserUse, but for the terminal.
tui-use gives agents access to the parts of the terminal that bash can't reach — every REPL, installer, and TUI app built for humans.
AI agents can run shell commands, read files, and call APIs. But they stall the moment a program asks for input — because most CLI tools were built for humans, not agents.
tui-use fills that gap. Spawn any program in a PTY, observe its screen as plain text, send keystrokes — all from the command line. If a human can operate it in a terminal, an agent can too.
Use cases:
REPL sessions— Run code in Python, Node, psql, or redis-cli, inspect the output, and keep going. No more one-shot scripts when you need an interactive session.Interactive scaffolding tools— Step throughnpm create
,cargo new
,create-react-app
, and any other CLI wizard that asks questions before doing anything.Database CLIs— Connect to psql or mysql, run queries, check schemas, without needing a separate API or ORM layer.SSH + remote interactive programs— SSH into a server and keep operating interactive programs on the other end, not just run one-off commands.TUI applications— Navigate vim, lazygit, htop, fzf, and other full-screen programs that were never designed to be scripted.
Perfect for Claude Code, Cursor, Codex, Gemini CLI, OpenCode and other AI coding agents.
🖥️ Full VT Rendering— PTY output is processed by a headless xterm emulator. ANSI escape sequences, cursor movement, and screen clearing all work correctly. Thescreen
field is always clean plain text.📸 Snapshot Model— Interacting with a terminal program is just a loop: read what's on screen, decide what to type, repeat. tui-use makes that loop explicit — no async streams, no timing guesswork, no partial output to reassemble.🔍 Highlights— Every snapshot includes ahighlights
field listing the inverse-video spans on screen — the standard way TUI programs indicate selected items. Agents can read which menu option, tab, or button is currently active without parsing text or guessing from cursor position.⌨️ Rich Key Support— Send text, Enter, Ctrl+C, arrow keys, F-keys, and more. Runtui-use keys
to see the full list.
From npm (recommended):
npm install -g tui-use
From source:
git clone https://github.com/onesuper/tui-use.git
cd tui-use
npm install
npm run build
npm link
Note: You must install the CLI (see Installation section above) before using the plugin — the plugin only provides skill definitions, the CLI provides the actual PTY functionality.
Source: Hacker News















