Drawingrbterm
Sheet1 / 11
Rev0.3.66
Date08-2026
Scale1:1
MaterialC99

Built like instrumentation, not like an app

A terminal emulator written in pure C99 and rendered with raylib, shipped as one self-contained binary — no Electron, no runtime, no config file to write first. Keystroke to glyph in 0.018 ms, measured with a DSR round-trip over 1000 samples and reproducible from the repo.

macOS · Windows · Linux ≈19 MB single binary ~0.1% idle CPU MIT
Annotated drawing view of an rbterm window One rbterm window split into three panes. Four numbered callouts mark: 1 the tab bar, where each agent tab carries a status badge — spinner, red dot, green dot, exclamation; 2 the recursive split tree, three panes divided by draggable rules; 3 the OSC 133 prompt marks in the left gutter; 4 the output of the remote-control command rbterm @ ls, listing each pane's agent state. A dimension line beneath the view is labelled 0.018 millisecond round-trip. 1 2 3 4 0.018 ms round-trip ANSI DSR CSI-6n · MEDIAN OF 1000 SAMPLES
  1. Tab bar. One status badge per tab — a spinner while the agent works, a green dot when it finished clean, red when it failed, an amber ! when it is waiting on you.
  2. Recursive split tree. Three panes in one tab. Drag any divider, keep subdividing; every leaf owns its own PTY, scrollback, selection and palette.
  3. Prompt marks. OSC 133 shell integration draws an exit-status rule in the gutter beside every prompt — green when the command exited clean, red when it did not.
  4. rbterm @ ls. The remote-control engine reports each pane's agent state as data — running, failed, done, attention — and match-count is the wait-loop probe.
VIEW A · three panes, four agent tabs and a local shell, one window  ·  DIM 01 · 0.018 ms echo round-trip, median of 1000 samples, tools/bench-here.sh
SEC 01

Exploded view

The complete path a keystroke takes. Eight parts, one loop, no intermediaries.

01 KEY EVENT raylib / GLFW 02 input_poll() input.c 03 pty_write() pty_dispatch.c 04 SHELL forkpty / ConPTY 05 pty_read() pty_unix.c 06 screen_feed() screen.c — VT parser 07 renderer_draw() render.c — atlas 08 GLYPHS GPU IN ▸ 01–04 OUT ▸ 05–08 kernel PTY
  1. key event
  2. input_poll() · input.c
  3. pty_write() · pty_dispatch.c
  4. shell
  5. pty_read() · pty_unix.c
  6. screen_feed() · screen.c
  7. renderer_draw() · render.c
  8. glyphs

That is the entire loop. No compositor in the middle, no JavaScript bridge, no IPC hop to a helper process. Each tab owns a recursive split tree — leaves carry a Pane (PTY, screen buffer, selection, title and cwd), internal nodes carry a split mode and a ratio — and the main loop drains every leaf's PTY each frame. The 0.018 ms is what is left when there is nothing else to remove. The full API is on the scripting sheet.

SEC 02

Specifications

Bill of materials. Every figure below is measured on shipping builds, not estimated.

Parts list — rev 0.3.66
PartSpecNotes
Latency0.018 msDSR CSI 6n round-trip, median of 1000 samples
Tail0.045 msp99, same run. Reproduce with tools/bench-here.sh
Throughput185 MB/sReal-application ingest — fastest of the terminals tested
Idle CPU~0.1 %macOS, focused or backgrounded, with multiple SSH panes open
Binary≈19 MBOne self-contained file. No runtime, no framework, no installer payload
Scrollback1,000,000Lines per pane, run-length encoded, with intelligent reflow on resize
Tabs16Concurrent shells; each tab keeps its own PTY, scrollback and selection
Themes252Baked into the binary. Per-pane palette via OSC 4 / 10 / 11
Fonts37Bundled monospace faces. Font face and size are per tab
Effects19Cinema pane shaders — CRT scanlines, phosphor, VHS and others
Self-test~240VT conformance checks, driven headless through remote control
ColourTRUECOLOR16 / 256 / 24-bit SGR, with SGR 58 coloured underlines
Platforms3macOS · Linux · Windows 10 1809+ (ConPTY) — one codebase
LanguageC99raylib for rendering, libssh for SSH, HarfBuzz for shaping
LicenceMITA binRick project
SEC 03

Subassemblies

Four modules that do work the terminal underneath you usually leaves to a wrapper script.

RB-01 · Agents

A terminal that reports on the agents running inside it

Every tab carries a status badge derived from what the pane is actually doing: a spinner while a command runs, a green dot when it finished clean, a red dot when it failed, an amber ! when the agent is waiting on you. Claude Code rings the bell; rbterm turns that into a badge you can read across fifteen tabs without focusing one.

  • rbterm @ — kitty-style remote control: ls, send-text, send-key, get-text, screenshot, split, focus-tab, set-colors, record-start / record-stop.
  • Boolean match enginestate:done or state:failed, plus id, title, cwd, pid and user vars.
  • display-image — an agent pops the chart or screenshot it just made as a click-to-dismiss overlay in its own pane. $RBTERM_PANE_ID survives a restart.
  • Zero config with Claude CodepreferredNotifChannel: terminal_bell, with hooks preset for explicit statuses. Wiring it up →
# show what an agent just produced, in its own pane
rbterm @ display-image --path shot.png

# one wait-loop babysits N agents
rbterm @ match-count -m '(state:done or state:failed)'

# unblock a specific pane by id
rbterm @ send-text -m id:3 'git rebase --continue\n'

# every pane's status, as data
rbterm @ ls | jq -r '.data.windows[].tabs[].panes[].status'
Close-up of the rbterm tab bar: five tabs, four of them agents, each carrying a status badge — a spinner, a red failed dot, a green done dot and an amber exclamation
DETAIL A · tab bar, status badges, enlarged
RB-02 · SSH

libssh, not a wrapper

SSH is a first-class backend inside the terminal, so the UI never blocks on a handshake and every pane keeps its own session.

  • Async connect — startup tabs, splits and saved layouts dial on worker threads, in parallel
  • Key, agent, password and keyboard-interactive auth · trust-on-first-use host keys · ProxyJump
  • Local -L, remote -R and dynamic -D SOCKS5 forwards, up to 16 per host
  • Per-host fonts, themes, cursor colour, HUD and split layouts, stored as comments in ~/.ssh/config
  • SFTP upload and download on every SSH tab, recursive, over the same session
  • Key manager — generate Ed25519 or RSA, install to authorized_keys, all from the GUI
RB-03 · Panes & recording

Splits that record themselves

A recursive split tree per tab, and a recorder that writes finished files without asking you to install anything.

  • Split, subdivide, cycle and maximize any pane · broadcast input to every pane at once
  • Search across a million lines of scrollback with Cmd+F
  • Record straight to gif, webp, mp4, webm, apng or asciinema cast
  • Native gif, webp and apng encoders on every platform — no ffmpeg on the path required
  • Recording a split captures every leaf — one file per pane
  • Quake hotkey (Cmd+CapsLock) · multi-window · per-tab fonts · raw session logging
RB-04 · Graphics

Pixels, where pixels belong

Both inline image protocols, with real pixel geometry reported to the child process so apps stop falling back to ASCII.

  • Sixel and kitty graphics protocols, decoded in-process
  • Colour emoji via Core Text · HarfBuzz ligature shaping
  • OSC 8 hyperlinks · OSC 133 prompt marks with an exit-status gutter
  • Hand-rasterized box-drawing glyphs — no gaps in tmux, htop or btop borders
An rbterm pane with an image overlay: a picture displayed inside the terminal by the rbterm @ display-image command, with a caption bar naming the file
DETAIL B · display-image overlay, in-pane

Every other module — the VT parser, intelligent reflow, the settings panel, desktop notifications, the logs browser — is drawn out part by part on the features sheet. Full feature catalogue

SEC 04

Tolerances

Echo round-trip in milliseconds, median of 1000 samples, same machine, August 2026. Logarithmic scale — the field spans three decades. Lower is better.

rbterm
0.018
ghostty
0.034
alacritty
0.057
Apple Terminal
0.075
kitty
3.470
iTerm2
21.288

Method. tools/echo_bench.c writes an ANSI DSR query (CSI 6n), waits for the terminal's CSI r;c R reply and records the round-trip — parser plus PTY I/O, nothing else. 1000 samples per terminal, same machine, same session. Reproduce it in any terminal with ./tools/bench-here.sh from the repo. Tail figures: rbterm p99 0.045 ms. On bulk output the same build ingests a real full-screen animation stream at 185 MB/s, ahead of every terminal tested. The full comparison is on the comparison sheet.

SEC 05

Finishes

Nineteen hand-tuned film- and hardware-inspired looks — CRT scanlines, phosphor decay, VHS tracking, halftone, bloom and glitch — applied live per pane and captured straight from the effect shader. Six of them below.

The Nostromo effect: an rbterm pane rendered as a green scanlined ship's console
Alien — Nostromo
The HAL 9000 effect: an rbterm pane in deep red with a glowing bloom around the glyphs
2001 — HAL 9000
The DEC VT100 effect: an rbterm pane as a green phosphor terminal with visible scanlines
DEC VT100
The Amber CRT effect: an rbterm pane in amber phosphor with curved-screen falloff
Amber CRT
The Matrix effect: an rbterm pane in cascading bright green with heavy glow
The Matrix
The Game Boy DMG effect: an rbterm pane in four shades of olive green with a dot-matrix grid
Game Boy DMG

Pick one per tab in Settings → Effects, or pin one to an SSH host so you always know which machine you are on. All 19 effects

SEC 06

Controls

The ten chords worth learning first. Everything else is in the manual.

  • Cmd+TNew tab — local shell
  • Cmd+Shift+TNew tab over SSH, with saved hosts from ~/.ssh/config
  • Cmd+D / Cmd+Shift+DSplit the pane vertically / horizontally — recursive
  • Cmd+KCycle focus through the split panes
  • Cmd+ZMaximize the active pane, and back again
  • Cmd+FSearch the scrollback
  • Cmd+Shift+IBroadcast every keystroke to all panes in the tab
  • Cmd+Shift+SScreenshot the active pane to PNG
  • Cmd+,Settings — font, theme, cursor, logging, HUD, launch tabs
  • Cmd+CapsLockSummon or dismiss the window system-wide (macOS)

Cmd on macOS; Ctrl on Linux and Windows. Read the manual

SEC 07

Order

Three artifacts, one revision. Checksums and the Gatekeeper verification walkthrough are on the download sheet.

macOS Signed

Apple silicon (arm64). DMG, signed and notarized, hardened runtime — it runs on any arm64 Mac without installing anything else first.

Get the DMG

Windows x86_64

ZIP. Needs Windows 10 1809 or newer for ConPTY. Recording encoders are built in, so gif, webp and apng need nothing on PATH.

Get the ZIP

Linux x86_64

ZIP. glibc and X11. The same C99 source, the same keybindings, the same 252 themes and 37 fonts baked into the binary.

Get the ZIP

orbrew install binrick/tap/rbterm
RB-00 · Issue

One binary. Every platform. Nothing to install around it.

Copy it to a bare server and run it: the themes, the fonts, the SSH client, the image decoders and the recorder are all inside the file. It is MIT licensed, and the benchmark that produced every number on this sheet ships in the repo.