readme.mp4
A browser-based terminal with WebSocket PTY bridge — a full terminal emulator that runs in your browser, ideal for AI-controlled workflows and vibe coding.
- Full terminal emulation via xterm.js
- Real-time WebSocket PTY bridge using
node-ptyandws - Auto-resize — terminal dimensions sync automatically
- Windows & Unix support — auto-detects PowerShell, pwsh, or bash
- Dark theme — custom xterm color scheme
- Reconnection — auto-retries on disconnect
npm install
npm startOpen http://localhost:3000 in your browser.
- The server (
server.js) serves a static frontend (public/) via Express. - A WebSocket server accepts connections from the browser.
- On connection, the server spawns a PTY (PowerShell on Windows, bash on Unix).
- Keystrokes from the browser are forwarded to the PTY; PTY output is streamed back to the terminal.
- Resize events from the browser are sent as JSON and applied to the PTY via
pty.resize().
| Variable | Default | Description |
|---|---|---|
PORT |
3000 |
HTTP server port |
PWSH / POWERSHELL |
— | Path to PowerShell (Windows only) |
- Backend: Node.js, Express, ws, node-pty
- Frontend: xterm.js, xterm-addon-fit