TNT's Not Tunnel
  • C 61.1%
  • Shell 25.9%
  • Python 6.6%
  • Roff 4%
  • Makefile 2.2%
  • Other 0.2%
Find a file
小明 594e2cc741
Some checks are pending
CI / PR gate (macos-latest) (push) Waiting to run
CI / PR gate (ubuntu-24.04) (push) Waiting to run
CI / main smoke (push) Waiting to run
CI / musl build (alpine) (push) Waiting to run
chore: cut comments that narrate the code (#99)
2026-09-18 16:49:12 +08:00
.github chore: apply the repository conventions (#84) 2026-09-08 19:55:59 +08:00
demos Deepen TUI lifecycle and runtime readiness 2026-05-26 11:15:55 +08:00
include chore: cut comments that narrate the code (#99) 2026-09-18 16:49:12 +08:00
packaging packaging: finalize v1.3.3 publication (#96) 2026-09-18 15:56:36 +08:00
scripts chore: apply the repository conventions (#84) 2026-09-08 19:55:59 +08:00
src chore: cut comments that narrate the code (#99) 2026-09-18 16:49:12 +08:00
tests test: drop the accept-churn check that detects nothing (#98) 2026-09-18 16:41:30 +08:00
.gitignore escape message log content and migrate existing logs (#76) 2026-09-08 10:27:24 +08:00
install.sh harden and streamline runtime (#67) 2026-08-18 19:30:09 +08:00
LICENSE Initial commit 2025-07-01 09:00:00 +08:00
MAINTAINERS chore: apply the repository conventions (#84) 2026-09-08 19:55:59 +08:00
Makefile test: run four integration suites at once (#94) 2026-09-18 15:36:48 +08:00
README.md restore repository entry points (#69) 2026-09-07 12:10:26 +08:00
SECURITY.md restore repository entry points (#69) 2026-09-07 12:10:26 +08:00
tnt-chat.7 release: prepare v1.3.3 (#95) 2026-09-18 15:45:50 +08:00
tnt-exec.7 release: prepare v1.3.3 (#95) 2026-09-18 15:45:50 +08:00
tnt-message-log.5 release: prepare v1.3.3 (#95) 2026-09-18 15:45:50 +08:00
tnt-module-protocol.7 release: prepare v1.3.3 (#95) 2026-09-18 15:45:50 +08:00
tnt.8 release: prepare v1.3.3 (#95) 2026-09-18 15:45:50 +08:00
tnt.service harden and streamline runtime (#67) 2026-08-18 19:30:09 +08:00
tntctl.1 release: prepare v1.3.3 (#95) 2026-09-18 15:45:50 +08:00

TNT

SSH-native terminal chat. One shared room, a Vim-style modal interface, and anonymous access by default. The server is a single C daemon that speaks SSH directly, so any ssh client is a full client.

Reference documentation ships as manual pages and is installed with the binaries:

Page Covers
tnt(8) server, options, environment, state directory
tntctl(1) control client
tnt-chat(7) interactive terminal interface and keybindings
tnt-exec(7) non-interactive exec commands
tnt-message-log(5) message log format and recovery
tnt-module-protocol(7) tnt.module.v1 module protocol

Install

Release installer, pinned to a tag (verifies checksums.txt before installing):

curl -sSL https://raw.githubusercontent.com/m1ngsama/TNT/vX.Y.Z/install.sh | VERSION=vX.Y.Z sh

Replace vX.Y.Z with a tag from Releases. Omit VERSION to track the latest release.

From source (needs a C compiler and the libssh development package):

git clone https://github.com/m1ngsama/TNT.git
cd TNT
make
sudo make install

Homebrew, Arch, and Debian packaging live under packaging/.

Run

tnt                          # listens on 2222
tnt -p 3333 -d /var/lib/tnt

tnt stays in the foreground and does not fork; tnt.service is the systemd unit (sudo make install-systemd).

Connect

ssh -p 2222 chat.example.com

Any username and any password are accepted, including an empty one. The room is anonymous and unrestricted by design.

Operate

tntctl -p 2222 localhost health
tntctl -p 2222 localhost stats
tntctl -p 2222 localhost tail 20

tntctl accepts only the commands defined by tnt-exec(7) and launches ssh without a shell. Every exec command also works over a plain ssh -p 2222 host <command>.

Modules

Modules are external processes that exchange JSON Lines with the server over stdio. They stay disabled unless TNT_MODULE_PATHS names their directories, and the core must keep working with all of them off. See tnt-module-protocol(7), validate a module with scripts/module_check.sh, and find community modules in m1ngsama/tnt-modules.

Develop

make            # build tnt and tntctl
make test       # unit, script, and integration suites
make check      # cppcheck and clang-tidy
make asan       # AddressSanitizer build

scripts/release_check.sh runs the release preflight. MAINTAINERS maps every path to an area; scripts/get_maintainer.sh <path> resolves one.

License

MIT. See LICENSE.