slosh

A terminal multiplexer — panes, tabs, sessions you can detach from — written in C on top of libghostty-vt.

watch it

install

$ curl -fsSL https://slosh.foo/install.sh | sudo sh

Piping a URL into a root shell should make you flinch — read it first, it is short. Or skip it entirely: building from source needs zig 0.16 and nothing else. No cmake, no autotools, no libraries. The result is one static binary.

$ git clone https://slosh.foo/src slosh && cd slosh
$ make vendor    # the vendored terminal core, once
$ make           # about a second
$ sudo install build/slosh /usr/local/bin/

Then:

$ slosh              # attach to session "main", creating it if needed
$ slosh -s work      # a named session
$ slosh ls           # what is running

Sessions survive detaching, and your ssh connection dying. Then C-a \ to split, C-a ? for the keys, C-a p for every command by name.

what is different about it

The mouse works properly.
Click the middle of a border to split toward it, drag a gap to move a boundary, drag a pane by its title to swap it. Everything drawn registers what it is as it is drawn, so a click and a preview cannot disagree.
The layout is recomputed, never stored.
Small terminal? The tab becomes a list of headers, and comes back to exactly the arrangement you had. Nothing drifts, because there is nothing stored to drift.
Dead panes keep their output.
A pane told to run something keeps what it printed when that thing exits, with [re-run] and [close] in its frame.
Configuration is one KDL file.
It reloads on save, can be built from included pieces, and refuses a broken file instead of half-applying it.
Colour passes over cells.
Dim, tint, rulers, spotlights, and a border that can flash when a pane rings — with strengths written as expressions.
Scriptable to the same depth it is usable.
One JSON object per line over the session's socket, and a pane can draw its own status bar and buttons with an escape sequence.

The multiplexers we have are crusty, and the things that make them awkward follow from how the programs are built. So: start over, and stand on the shoulders of the person who already solved the genuinely hard part — the terminal core from ghostty does the VT parsing, scrollback, selection, images and key encoding. What sits on top is about 15k lines of C, and recomputes rather than remembers. The twenty-one decisions behind it: how it works.

try it without installing anything

The demo page boots a riscv64 Linux — Fabrice Bellard's TinyEMU compiled to WebAssembly — with slosh running as the thing you land in. Nothing is installed, nothing is uploaded, and reloading the page throws the machine away. It streams about 11 MiB once, then never touches the network again.

It is an emulator interpreting every instruction, so the machine is honest but not fast. The real thing redraws in microseconds.

docs