vim, git add -p, psql, btop, and gh auth login — programs that ordinarily require a real keyboard and screen. It spawns programs inside a real PTY, maintains a persistent background server across invocations, and exposes a simple CLI for reading the screen and sending input.
Installation
Install hty with a one-line script, Homebrew, or build from source.
Quick Start
Walk through a complete agent workflow in under five minutes.
Commands
Full reference for every hty subcommand and its flags.
Guides
Step-by-step guides for AI agents, CI automation, and remote sessions.
How hty works
hty runs a lightweight background server the first time you invoke it. That server owns all PTY sessions and keeps them alive across individualhty calls — so your agent can send one command, do other work, then come back and read the screen later.
Wait for output
Block until specific text appears on the screen, the screen goes idle, or the process exits.
Key capabilities
Persistent sessions
Sessions live in the background server and survive across
hty invocations. No need to keep a process open.Screen snapshots
Read the fully rendered terminal screen as plain text or with ANSI color codes at any point.
Smart wait primitives
Block until text appears, the screen goes idle, or the process exits — with configurable timeouts.
Live observation
Watch any session’s screen in real time from another terminal with
hty watch, without interfering.Session replay
Every session is logged to an append-only JSONL file. Replay it later with
hty replay.Remote access
Point
$HTY_SOCKET at an SSH tunnel to observe or drive sessions running on another machine.