Help us shape the future of Go! Take the 2026 Go Developer Survey

OpenChat

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT

README ΒΆ

OpenChat (ChatSSH)

Go Version Build Status Platform support

OpenChat (originally ChatSSH) is a secure, terminal-based, decentralized chat application. It combines cryptographic SSH channels, Bubble Tea text user interface (TUI) aesthetics, and go-libp2p peer-to-peer transport with NAT hole punching.


Precompiled Downloads

Get the precompiled executable directly for your operating system:


Useful Reference Guides

Learn more about using and configuring OpenChat:

  • πŸš€ Quick Start Guide β€” Step-by-step instructions on starting your first server and connecting clients.
  • βš™οΈ CLI Flags Reference β€” Complete configuration index for running custom settings via command-line arguments.
  • πŸ“ System Design Document β€” Architectural layout, wire frames, connection models, and cryptographic details.
  • πŸ”§ Security & Debugging Audit β€” Historical overview of issues resolved during security hardening (UTF-8, goroutine leaks, handshake retry logic).

Core Features

  • Interactive TUI Setup Wizard: Starts automatically if you launch the application without CLI arguments (e.g. when double-clicking the binary). Walk through step-by-step options (Username, Hosting vs. Connecting, Storage type) completely in the terminal.
  • Premium Bubble Tea UI: Fully responsive terminal layout using Bubble Tea, rendering message feeds, colored timestamps, dynamic hashed username coloring, and a powerline-style status bar.
  • SSH Encrypted Transport: Uses standard SSH protocols to execute encrypted end-to-end handshakes. Incorporates visual fingerprint checks (Randomart and Emojiart) for MitM verification.
  • Decentralized NAT Traversal: Leverages P2P networking powered by libp2p. Autodetects networks, performs NAT hole-punching (DCUtR), and falls back to Circuit Relays to connect nodes behind firewalls automatically.
  • Flexible Storage Profiles:
    • Local Encrypted Storage (Default): Saves chat history inside a local SQLite database encrypted with AES-256 (passphrase-derived key).
    • Ghost Mode: Volatile RAM-only message caching. Wipes and scrubs all chats from memory upon application termination, writing zero bytes to the disk.

Build from Source

Prerequisites
  • Go 1.22+ installed.
  • GCC (Optional, for running tests).
Compile Binary
go build -o OpenChat ./cmd/chatssh

Quick Start

1. Launch Setup Wizard

Double-click the downloaded binary file or run the compiled executable without parameters to load the interactive setup wizard:

./OpenChat
2. Connect from Terminal (CLI Option)

If you prefer to bypass the setup wizard and launch directly using the command line:

  • Host a room:
    go run ./cmd/chatssh --mode server --addr :2222 --user alice
    
  • Connect as a client:
    go run ./cmd/chatssh --connect "172.29.160.1:2222" --user bob
    

Project Directory Layout

cmd/chatssh/          Application main entrypoint
internal/
  app/                Application setup, CLI parsing, and interactive setup wizard
  chat/               Event hub and subscriber mechanisms
  crypto/             Key exchange and fingerprint utilities
  keys/               Ed25519 secure key management
  p2p/                libp2p network stacks and NAT routing
  room/               Multiplexed room broadcasters
  sshclient/          SSH client wrapper
  sshserver/          SSH server implementation
  storage/            AES-GCM SQLite database and Ghost storage handlers
  tui/                Bubble Tea view and components
DesignSystem/         Original architecture design definitions
WebView/              Stunning 3D P2P landing page website assets

Contributing

We welcome contributions to OpenChat! To contribute:

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/NewFeature).
  3. Commit your changes (git commit -m "Add some NewFeature").
  4. Push to the branch (git push origin feature/NewFeature).
  5. Open a Pull Request.

Directories ΒΆ

Path Synopsis
cmd
chatssh command
internal
app
p2p
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL