Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 5, 2026·3 min de lecture

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.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
GoTTY Overview
Commande d'installation directe
npx -y tokrepo@latest install 0b6ee0ca-784d-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

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

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires