gotty
Share terminal via web browser
TLDR
Share result of command
Share with write permission
Share with credential (Basic Auth)
SYNOPSIS
gotty [options] [--] [command [args...]]
PARAMETERS
-a, --address string
IP address to listen on (default: 0.0.0.0)
-p, --port int
Port to listen on (default: 8080)
-w, --ws.origin string
WebSocket origin restriction (default: *)
-c, --credential string
Password for login protection
--permit-write
Allow clients to send input to TTY (read-only by default)
--allow-emacs
Enable Emacs-style key bindings (C-x, C-c)
-t, --title-format string
Page title template (default: %s)
-d, --dir string
Working directory (default: .)
--reconnect
Enable client reconnection
-v, --version
Print version info
-h, --help
Show usage help
DESCRIPTION
Gotty is a lightweight, Go-based tool that transforms any CLI command into a fully interactive web-based terminal accessible via a browser. By running gotty [options] command, it launches an HTTP server with WebSocket support, allowing multiple users to connect and interact with the command's stdin/stdout in real-time.
Key features include customizable ports and addresses, optional write permissions for client input, reconnection support, and theming via custom HTML. It's ideal for live demos, remote debugging, pair programming, or exposing terminals securely without SSH setup. Security options like credentials and origin restrictions help mitigate risks.
Unlike traditional multiplexers like tmux, Gotty requires no client installation— just a modern browser. It proxies I/O efficiently, supporting terminal features like colors, resizing, and Emacs key bindings. However, it's single-session focused per instance.
CAVEATS
Not installed by default; requires Go for building. Exposing publicly without credentials or firewall risks unauthorized access. Limited to single command per instance; no native multi-session support like tmux.
INSTALLATION
Use go install github.com/yudai/gotty/cmd/gotty@latest or download binaries from GitHub releases.
EXAMPLE USAGE
gotty --permit-write bash shares an interactive shell at http://localhost:8080.
gotty top for read-only monitoring.
HISTORY
Developed by Yudai Yamamoto in 2015 as an open-source project on GitHub. Gained popularity for demoing CLI tools. Actively maintained with v2.x releases adding WebSocket security, reconnections, and performance tweaks. Widely used in DevOps and education.


