Page loadedSkip to main content

TNT

A terminal chat service over SSH. Pure C11 implementation reusing SSH for transport encryption, with a custom Vim-style modal TUI. Anonymous by default, with rate limiting, source bans, a control CLI and an external module protocol.

View source
  • Systems programming
  • Network
  • TUI
TNT terminal chat interface running in a terminal emulator

The problem

Most chat tools require a web browser, an Electron app, or a dedicated client. For people who live in the terminal, there should be a chat that works where they already are — over SSH, with no extra software to install.

Technical approach

  • Written in pure C11 with no external dependencies beyond libssh. Reuses SSH for transport encryption so there is no need to implement a separate TLS layer.
  • Custom Vim-style modal TUI with normal, insert, and command modes. Terminal rendering uses ANSI escape sequences directly — no ncurses.
  • One thread per session, with bounded connection counts and per-IP rate limits. Idle, the daemon stays in single-digit megabytes of resident memory.
  • Anonymous by default: any SSH client can join, with no account to create. Rate limits, audit logs and source bans, managed locally by operators, protect the room from abuse. An external module protocol keeps the core small, and 40+ test suites cover it.