@dvroom-dev/ghostweb
v0.1.6
Published
A tiny launcher for serving interactive CLIs/TUIs through the browser with [ghostty-web](https://github.com/coder/ghostty-web).
Downloads
21
Readme
ghostweb
A tiny launcher for serving interactive CLIs/TUIs through the browser with ghostty-web.
Install
npm i -g @dvroom-dev/ghostwebUsage
Start any command inside a browser terminal (default port 8080):
ghostweb -- bashYou can also omit the separator if you're not passing flags:
ghostweb bash -lc "echo hi"Pick a different port and pass arguments:
ghostweb --port 8081 -- claude --dangerously-skip-permissionsFlags:
--port, -p <number>: port for the ghostty-web server (default:8080)--no-open: skip auto-opening the browser-- <command> [args...]: 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)
Requirements
- Node.js 18+ (or Bun)
- Python 3 (used for PTY support without native addons)
- POSIX-like environment (Linux, macOS, WSL)
Development
Building and testing requires Bun:
bun install
bun test
bun run buildBuild a standalone binary
You can produce a self-contained executable that embeds the ghostty-web client:
bun run build:standalone ghostweb
./ghostweb --port 8080 -- bashNote: The compiled binary still requires Python 3 on the target machine for PTY support.
