ScriptsJul 5, 2026·3 min read

GoTTY — Share Your Terminal as a Web Application

GoTTY is a Go-based tool that turns your CLI into a shareable web application, letting users interact with your terminal through a browser.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
GoTTY Overview
Direct install command
npx -y tokrepo@latest install 0b6ee0ca-784d-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

Introduction

GoTTY converts any command-line tool into a web application that runs in a browser. It is useful for sharing terminal sessions, building web-based dashboards around CLI tools, and providing remote access to interactive terminal programs without requiring SSH.

What GoTTY Does

  • Runs any CLI command and exposes it as a web page via WebSocket
  • Supports read-only and read-write modes for interactive sessions
  • Provides TLS/SSL support for encrypted connections
  • Works with any terminal application including vim, top, and tmux
  • Includes client authentication via basic auth or custom credentials

Architecture Overview

GoTTY starts an HTTP server that serves a JavaScript-based terminal emulator (hterm) to the browser. When a client connects, GoTTY spawns the specified command and bridges the command's stdin/stdout/stderr to the browser over a WebSocket connection. Each browser tab gets its own process instance, and the server handles multiplexing across all connected clients.

Self-Hosting & Configuration

  • Install via go install or download prebuilt binaries from GitHub releases
  • Configure with command-line flags or a ~/.gotty config file
  • Set -w flag to enable write (interactive) mode for the browser user
  • Use --tls with certificate and key files for HTTPS connections
  • Restrict access with --credential user:pass for basic authentication

Key Features

  • Zero-dependency single binary written in Go
  • Real terminal emulation in the browser via hterm
  • Customizable window title and terminal preferences
  • Support for reconnecting after network interruptions
  • Profile-based configuration for repeated use

Comparison with Similar Tools

  • ttyd — C-based alternative with broader platform support and active maintenance
  • Wetty — Node.js SSH-over-HTTP terminal, heavier runtime dependency
  • Shell In A Box — Older C daemon, no WebSocket, less modern UX
  • tmate — Focuses on terminal sharing via unique URLs with tmux integration

FAQ

Q: Is GoTTY secure for production use? A: Use TLS and authentication flags when exposing GoTTY beyond localhost. Without them, anyone with network access can interact with your terminal.

Q: Can multiple users connect at the same time? A: Yes. Each browser tab spawns its own process instance. They do not share state unless the underlying command supports it.

Q: Does GoTTY work with tmux or screen? A: Yes. Pass tmux or screen as the command argument and users get a full multiplexed terminal session.

Q: What browsers are supported? A: Any modern browser with JavaScript and WebSocket support, including Chrome, Firefox, Safari, and Edge.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets