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

What it does
Tired of AI agents stalling whenever a program asks for input? Enter tui-use: like BrowserUse, but for the terminal. It spawns any program in a PTY, renders the full VT output with @xterm/headless into a clean plain‑text "snapshot", and sends keystrokes back — arrows, function keys, Ctrl+C, Enter, whatever the tool expects. It has been reported that the project is being promoted as "perfect" for Claude Code, Cursor, Codex, Gemini CLI, OpenCode and other AI coding agents, enabling them to navigate REPLs, CLI scaffolding wizards, psql/mysql shells, remote SSH sessions, and full‑screen TUIs such as vim, lazygit, htop, and fzf.
How it works
Under the hood a background daemon manages PTY sessions and an xterm emulator turns ANSI escape sequences, cursor moves, and alternate buffers into a stable screen state. Each interaction is a simple loop: get a snapshot (screen + metadata like inverse‑video highlights and title), decide what to type, send keys, repeat. The repo ships a CLI (npm install -g tui-use) and even provides a Claude Code plugin — note you must install the CLI first, because the plugin merely supplies skill definitions while the CLI does the heavy lifting.
Why it matters
This is small but meaningful infrastructure: it bridges the gap between text‑stream automation and genuinely interactive control. Want an agent to finish an npm create flow, poke around a remote psql session, or actually use vim over SSH? Now it can. Developers who've burned time on brittle expect/timing hacks may breathe easier — no more one‑shot scripts or frantically typing "yes" when an installer stops for input. Allegedly, this could change how we integrate agents into existing developer workflows; at the very least it makes the terminal a lot less mysterious to automation.
Sources: github.com/onesuper, Hacker News
Comments