terminal-use (tu)
Headless virtual terminal for AI agents. Spawn terminal apps, read the screen, send keystrokes. No GUI, no X server, no display needed.
tu is to terminal applications what agent-browser is to web pages.
Install
# Prebuilt binary (Linux, macOS)
|
# From source
Quick start
# Spawn a process in a virtual terminal
# Read the screen
# Send keystrokes
# Watch it live (read-only viewer)
# Clean up
How it works
tu wraps a headless PTY + vt100 terminal emulator behind a CLI. A background daemon manages sessions — each CLI invocation is stateless.
tu CLI ──→ Unix socket (JSON) ──→ daemon ──→ PTY + vt100 emulator
The daemon auto-starts on first use and auto-exits after 5 minutes of inactivity.
Commands
tu run <cmd> [args...] Spawn a process in a virtual terminal
tu kill [--name <s>] Kill session
tu list List active sessions
tu status [--name <s>] Session info
tu screenshot [--name <s>] Plain text screen dump
tu cursor [--name <s>] Cursor position (row,col)
tu scrollback [--name <s>] Scrollback buffer
tu type <text> [--name <s>] Type literal text
tu press <key>... [--name <s>] Send keystrokes
tu paste <text> [--name <s>] Bracketed paste
tu resize <CxR> [--name <s>] Resize terminal
tu wait [--name <s>] Wait for screen condition
tu monitor [--name <s>] Live read-only viewer
tu usage LLM-friendly command reference
Run tu usage for the full reference (designed to be <1000 tokens for LLM consumption).
Defaults
- Terminal size: 120x40
- TERM:
xterm-256color - Session name:
default(unless--namespecified) - Output: Human-readable if TTY, JSON if piped
Keys
Full list: Up Down Left Right Home End PageUp PageDown Backspace Delete Insert Tab Enter Space Escape F1-F12 plus Ctrl+, Alt+, Shift+ modifiers.
Named sessions
tu monitor
Live read-only viewer for humans to watch what an agent is doing:
- Full-color terminal rendering inside a framed window
- Left/Right arrows to switch between sessions
- Handles terminal resize
- Ctrl+C to detach
For AI agents
Add to your agent's tools/skills:
When you need to interact with a terminal application, use `tu`.
Run `tu usage` to see the full command reference.
The agent runs tu usage, gets a <1000 token cheatsheet, and is fully equipped.
License
MIT