CLI reference
Three binaries: the server, and two optional media clients.
tbase-server
tbase-server mount [-allow-other] [-debug] [-data <dir>] [-group <name>] [-voice-port <n>] <mountpoint>
mount is the only subcommand. Any other first argument (including none)
prints usage and exits with status 2. There is no unmount subcommand and no
config file — unmounting is done with ordinary FUSE tooling
(fusermount -u/umount), or by sending the server SIGINT/SIGTERM, which it
handles by unmounting cleanly and exiting.
| Flag | Default | Meaning |
|---|---|---|
-allow-other |
false |
Expose the mount to users other than the one running the server (needs user_allow_other in /etc/fuse.conf) |
-debug |
false |
Enable FUSE protocol debug logging |
-data <dir> |
"" (→ $XDG_STATE_HOME/tbase) |
Directory for persisted channel history |
-group <name> |
tbase |
Unix group whose membership defines chat participation |
-voice-port <n> |
61000 |
UDP port for the voice/radio/tv/cam media plane; 0 selects an OS-assigned ephemeral port |
Exactly one positional argument (the mountpoint) is required.
tbase-voice
tbase-voice [-mount <dir>] [-v] <host> <channel>
The voice-call client — a pipe, not a file server. No subcommands.
| Flag | Default | Meaning |
|---|---|---|
-mount <dir> |
/var/tbase |
Server mountpoint holding the tbase tree (on the remote host, resolved over SSH) |
-v |
false |
Report measured clock drift and reorder-buffer health (underruns/resyncs/gaps/late) to stderr every 5 seconds |
Both <host> and <channel> are required positional arguments. <host> is
any SSH target (tbase.example.com, wren@host); <channel> is a channel
name — a name containing a comma resolves under private/.
It runs ssh <host> cat <mount>/<channel>/voice/dial (or the private/...
path for a comma-containing channel) once to fetch the session ticket, then
pumps stdin → encrypted UDP and decrypted UDP → stdout. The binary
itself reads no environment variables — TBASE_VOICE_BIN is a convention
used only by the wrapper scripts (voice.sh/voice.ps1) to locate the
binary, not something tbase-voice reads itself.
arecord -f S16_LE -r 16000 -c1 | tbase-voice host everyone | aplay -f S16_LE -r 16000 -c1
tbase-cast
tbase-cast [-mount <dir>] [-v] radio|tv|cam send <host> <channel>
tbase-cast [-mount <dir>] [-v] radio|tv|cam listen <host> <channel> <owner>
The radio/tv/cam broadcast client. kind (radio, tv, or cam)
and mode (send or listen) are both positional, not flags — so
every invocation reads as a full sentence and nothing is silently defaulted.
| Flag | Default | Meaning |
|---|---|---|
-mount <dir> |
/var/tbase |
Server mountpoint holding the tbase tree |
-v |
false |
Report the playout buffer's underrun/resync/gap/late counts to stderr every 5 seconds. Listen mode only — send mode has no downlink, hence no playout buffer to report on. No clock-drift line here: unlike tbase-voice, cast has no drift estimator (a deliberate v1 scope cut, not an oversight). |
Argument grammar:
broadcast <host> <channel>— exactly 2 more arguments. The owner is always implicitlyself— there's nothing meaningful to type there, since the server already knows who you are from the authenticated connection.listen <host> <channel> <owner>— exactly 3 more arguments.<owner>names whose broadcast to tune into. Passingselfhere is explicitly rejected with a clear error, rather than left to fail mysteriously later: a listen session against your ownselfslot would never receive any real media (it resolves to an owner-mode session with nothing to listen to) and would just silently get reaped a few seconds in.
TV and cam send mode print the exact required ffmpeg -muxrate
value at startup — see broadcast.md.
No environment variables are read by the binary itself.
ffmpeg -i song.mp3 -f s16le -ar 32000 -ac 1 - | tbase-cast radio send host everyone
tbase-cast radio listen host everyone wren | aplay -f S16_LE -r 32000 -c1
ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -preset veryfast -tune zerolatency \
-b:v 760k -maxrate 760k -bufsize 380k -g 15 -f mpegts -muxrate 1052800 - | \
tbase-cast cam send host everyone
tbase-cast cam listen host everyone wren | ffplay -fflags nobuffer -
Windows
tbase-server needs Linux and FUSE, but tbase-voice and tbase-cast are
plain Go with no Linux-only dependencies and build and run unmodified on
Windows:
go build -o tbase-voice.exe ./cmd/tbase-voice
go build -o tbase-cast.exe ./cmd/tbase-cast
You'll also need an SSH client on PATH (Windows 10 1809+ ships OpenSSH)
and ffmpeg/ffplay for audio, since Windows has no
ALSA/PipeWire/PulseAudio. See scripts.md for voice.ps1 and
cast.ps1, the Windows counterparts to voice.sh and cast.sh.
For chat there is nothing to build or install: ssh <host> and run
shclient.sh — or plain echo/cat — on the server itself. tbase-voice
and tbase-cast have to run locally only because your microphone and
speakers are here; SSH already carries a terminal, so chat needs no Windows
client. That is the rule generally, not just on Windows: media terminates at
your hardware, chat terminates at your terminal.