A tiny launcher for serving interactive CLIs/TUIs through the browser with [ghostty-web](https://github.com/coder/ghostty-web).
npm install @dvroom-dev/ghostwebA tiny launcher for serving interactive CLIs/TUIs through the browser with ghostty-web.
``bash`
npm i -g @dvroom-dev/ghostweb
Start any command inside a browser terminal (default port 8080):
`bash`
ghostweb -- bash
You can also omit the separator if you're not passing flags:
`bash`
ghostweb bash -lc "echo hi"
Pick a different port and pass arguments:
`bash`
ghostweb --port 8081 -- claude --dangerously-skip-permissions
Flags:
- --port, -p : port for the ghostty-web server (default: 8080)--no-open
- : skip auto-opening the browser--
- : command to launch inside the PTY
What it does:
- Spawns the provided command inside a real PTY (via a tiny Python helper)
- Serves a minimal ghostty-web client (HTML + JS) with live resize support
- Auto-reconnects the browser if the connection drops and the server returns
- Opens your browser pointed at the server (unless --no-open)
- Node.js 18+ (or Bun)
- Python 3 (used for PTY support without native addons)
- POSIX-like environment (Linux, macOS, WSL)
Building and testing requires Bun:
`bash`
bun install
bun test
bun run build
You can produce a self-contained executable that embeds the ghostty-web client:
`bash``
bun run build:standalone ghostweb
./ghostweb --port 8080 -- bash
Note: The compiled binary still requires Python 3 on the target machine for PTY support.