Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsMay 13, 2026·3 min de lectura

Wish — Build SSH Apps in Go with Charm

A Go library from Charm that lets you build SSH-accessible applications with Bubble Tea TUIs, middleware, and access control out of the box.

Introduction

Wish is a Go library from Charm for building SSH servers that host interactive applications. Instead of serving web pages, you serve terminal user interfaces over SSH. Users connect with any standard SSH client and get a full Bubble Tea TUI, Git server, or custom interactive experience without installing anything on their machine.

What Wish Does

  • Creates SSH servers in Go with minimal boilerplate and sensible defaults
  • Serves Bubble Tea TUI applications directly to any SSH client
  • Provides a middleware stack for authentication, logging, and access control
  • Supports SCP and SFTP subsystems for file transfers alongside interactive sessions
  • Handles host key management, client key authentication, and password auth

Architecture Overview

Wish wraps the Go crypto/ssh library in a higher-level API inspired by HTTP middleware patterns. An SSH server is configured with a chain of middleware functions that process each incoming session. The Bubble Tea middleware adapts any Bubble Tea program into an SSH-served application by connecting the SSH channel to the TUI input and output. The library manages PTY allocation, window resize events, and session lifecycle.

Self-Hosting & Configuration

  • Add Wish to your Go module and create a server with host key and address options
  • Write a Bubble Tea program and wrap it with the bubbletea.Middleware adapter
  • Add authentication middleware to restrict access by SSH key or password
  • Deploy as a single binary on any server with an open SSH port
  • Use the ActiveTerminal middleware to detect terminal capabilities and adapt the UI

Key Features

  • Ship interactive CLI apps that users access via ssh without installing anything locally
  • Middleware pattern lets you compose auth, logging, rate limiting, and custom logic
  • Built-in Git server middleware for hosting repositories over SSH
  • Automatic PTY handling and terminal resize propagation to Bubble Tea programs
  • Works with standard SSH clients on every platform (OpenSSH, PuTTY, Windows Terminal)

Comparison with Similar Tools

  • OpenSSH — the standard SSH server for remote shell access, not designed for custom TUI applications
  • Teleport — enterprise SSH access management platform, not a library for building SSH apps
  • Soft Serve — a Git server built with Wish, demonstrating the library in action
  • Gliderlabs SSH — lower-level Go SSH server library without the middleware and Bubble Tea integration

FAQ

Q: Do users need to install anything to use a Wish app? A: No. Users connect with any SSH client they already have. The application runs entirely on the server.

Q: Can I serve multiple applications on one SSH server? A: Yes. Use middleware routing to direct users to different Bubble Tea programs based on the SSH command or username.

Q: How does authentication work? A: Wish supports public key authentication, password authentication, and keyboard-interactive auth. You can implement custom logic in middleware.

Q: Is Wish production-ready? A: Yes. Charm uses it in production for services like Soft Serve (Git hosting) and charm.sh cloud. The library handles concurrent sessions and connection management.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados