Overview
The Terminal API provides persistent PTY-based terminals backed byallternit-mux. Each terminal session is a real shell process owned by the mux daemon, survives API restarts, and supports scrollback replay plus live streaming. This replaces older tmux-backed implementations by removing the tmux dependency and providing persistent session ownership.
Base URL
Authorization header. See Authentication for details.
The API connects to allternit-mux over a Unix domain socket. By default the socket is at ~/.allternit/mux/mux.sock; override with ALLTERNIT_MUX_SOCKET.
Endpoints
Create terminal
Response:
Send input
Resize terminal
Close terminal
Stream output
text/event-stream. The server first replays the full persistent scrollback, then subscribes to live pane.output events from the mux daemon. Ping events are emitted every 15 seconds when no output is available.
Example event: