finds.dev← search

// the find

yudai/gotty

★ 19,491 · Go · MIT · updated Aug 2024

Share your terminal as a web application

GoTTY wraps any CLI command and serves it as a web app over WebSocket, letting you share a terminal session in a browser without SSH. It's for developers who need a quick way to expose a terminal tool to people who don't have SSH access or for demo/pairing scenarios. The architecture is simple: xterm.js in the browser, gorilla/websocket on the server, PTY glue in the middle.

The PTY relay design is clean — the server is genuinely thin, just forwarding bytes between the process and the WebSocket. Docker integration works well: `gotty -w docker run -it --rm busybox` gives you a disposable jailed shell per client with almost no setup. The `-w` opt-in for write access is a sensible default-safe choice; read-only sharing covers a lot of the demo/monitoring use cases without opening yourself up. Config file support with hterm preference overrides is a nice touch that most similar tools skip.

The project is effectively abandoned — last meaningful activity was years ago and the repo uses Godep, which hasn't been the Go ecosystem norm since modules shipped in 2018. The security model is thin: basic auth transmits credentials in plaintext unless you've separately configured TLS, and the random URL option is just security-through-obscurity. No multi-user session isolation — every client connecting to a non-multiplexed instance gets their own subprocess, which means state isn't shared unless you bolt on tmux yourself. The frontend ships pre-built JS bundles in the repo rather than building from source in CI, so auditing what's actually running in the browser requires extra steps.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →