Skip to content

flipbit03/terminal-use

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terminal-use (tu)

Headless virtual terminal for AI agents. Spawn interactive 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.

Demo

An AI agent playing NetHack — character creation, dungeon exploration, combat — driven entirely through tu:

tu1.mp4

Install

Prebuilt binary (Linux, macOS):

curl -fsSL https://raw.githubusercontent.com/flipbit03/terminal-use/main/install.sh | sh

From source:

cargo install terminal-use

To update:

tu self update

Add to your agent

# terminal-use (`tu`)

Some programs (htop, vim, mc, dialog-based installers, ncurses UIs) need a real
terminal to render their interface — you can't just pipe stdin/stdout. Use `tu`
to run them in a virtual terminal, screenshot the screen and send keystrokes.
Run `tu usage` before the first interaction for the full command reference.

That's it!

tu monitor

Open a separate terminal and watch what your agent is doing in real time:

tu monitor                        # Watch the default session
tu monitor --name nethack         # Watch a specific session
  • Full-color terminal rendering inside a framed window
  • Left/Right arrows to switch between sessions
  • Handles terminal resize
  • Ctrl+C to detach

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 8 hours of inactivity.

Defaults

  • Terminal size: 120x40
  • TERM: xterm-256color
  • Session name: default (unless --name specified)
  • Output: Human-readable if TTY, JSON for the agent (non-interactive terminal)

License

MIT

About

Headless virtual terminal for AI agents. Spawn apps, read the screen, send keystrokes.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors