01

CPU SIMD Rendering

No GPU required

teru renders entirely on the CPU using Zig's @Vector built-ins for SIMD alpha blending. Frame times are under 50μs. No OpenGL, no EGL, no Vulkan — the GPU is idle.

For terminal rendering — text on a character grid — the GPU is idle 99.9% of the time in GPU-accelerated terminals. The rasterization work is tiny. teru skips the GPU entirely and uses SIMD blitting directly onto a pixel buffer shared with the display server.

Zig — SIMD alpha blending
// @Vector blending for 4-pixel chunks
const fg_vec: @Vector(4, f32) = .{ fr, fg, fb, fa };
const bg_vec: @Vector(4, f32) = .{ br, bg, bb, 1.0 };
const blended = fg_vec * @as(@Vector(4, f32), @splat(alpha))
              + bg_vec * @as(@Vector(4, f32), @splat(1.0 - alpha));
  • Works in VMs, SSH sessions, containers, and cheap VPS instances
  • No GPU driver issues, no Mesa version conflicts
  • Same binary runs on headless servers in TTY mode (teru --raw)
  • Two-tier rendering: software (windowed) and raw TTY (SSH/serial)
02

Built-in Multiplexer

No tmux required

teru includes a full multiplexer — multiple panes, tiling layouts, and 9 independent workspaces — all in the same process as the terminal emulator. No separate tmux server, no IPC overhead, no config translation.

master-stack
One large pane left, stack right. Adjustable ratio.
grid
Equal-size grid. Auto-adjusts as panes are added.
monocle
Full-screen single pane. Cycle through with n/p.
floating
Free placement. Panes keep last position.
  • 9 independent workspaces, each with its own layout
  • Prefix key system: Ctrl+Space then command key
  • Pane zoom: Ctrl+Space, z — expand to full screen, restore on second press
  • Session save/restore: Ctrl+Space, d and teru --attach
03

AI Agent Protocol

Claude Code native

teru implements three layers of AI integration that work together: the CustomPaneBackend protocol for Claude Code agent teams, the OSC 9999 agent self-declaration protocol, and a hook listener for 16 Claude Code lifecycle events.

Claude Code → teru (JSON-RPC)
// Claude Code sends to teru's Unix socket:
{
  "method": "spawn",
  "params": {
    "argv": ["claude", "--agent", "backend-dev"],
    "metadata": { "group": "team-temporal" }
  }
}
OSC 9999 — agent self-declaration
printf '\e]9999;agent:start;name=backend-dev;group=team-temporal\a'
printf '\e]9999;agent:status;progress=0.6;task=Building API\a'
printf '\e]9999;agent:stop;exit=success\a'
  • Agent teams auto-assign to dedicated workspaces by group name
  • Pane borders color-code by agent status: cyan (running), green (done), red (failed)
  • Hook listener handles 16 event types: PreToolUse, PostToolUse, SessionStart/End, and more
  • Status bar shows live agent counts
04

MCP Server

6 tools

teru exposes itself as a Model Context Protocol server over a Unix socket. Multiple Claude Code instances can connect and query each other's terminal state — reading output, sending input, broadcasting to workspaces.

teru_list_panes List all panes with id, workspace, status, agent metadata
teru_read_output Get recent N lines of output from any pane by id
teru_get_graph Full process graph as JSON — all processes and relationships
teru_send_input Type text into any pane's PTY programmatically
teru_create_pane Spawn a new pane (optionally in a specific workspace)
teru_broadcast Send text to all panes in a workspace simultaneously
MCP config
{
  "mcpServers": {
    "teru": {
      "command": "socat",
      "args": ["UNIX-CONNECT:/run/user/1000/teru-PID.sock", "STDIO"]
    }
  }
}
05

Process Graph

DAG tracking

Every process spawned inside teru is tracked in a directed acyclic graph with parent-child relationships and agent metadata. You can query the graph programmatically, watch agent status in real time, and correlate tool activity to pane output.

  • Each node: PID, parent PID, start time, exit code, agent name/group/status
  • Edges encode parent-child relationships (agent teams form subtrees)
  • Updated by OSC 9999 (agent events) and Claude Code hooks (tool activity)
  • Queryable via teru_get_graph MCP tool
  • Visual DAG view planned for v0.5.0 (Ctrl+Space, g)
bash — query process graph via MCP
# List running agents and their status
echo '{ "method": "tools/call", "params": { "name": "teru_get_graph" } }' \
  | socat - UNIX-CONNECT:/run/user/1000/teru-PID.sock
06

Command-Stream Scrollback

20–50x compression

teru stores VT byte streams with keyframe/delta compression instead of expanded character cells. A 50,000-line scrollback that costs ~150MB in a traditional terminal costs ~3–7MB in teru.

~150MB
Traditional (ring buffer)
~5MB
teru (compressed stream)
20–50×
Compression ratio
  • Keyframes — full grid snapshots at regular intervals
  • Deltas — raw VT bytes between keyframes (typically tiny vs rendered output)
  • Navigate with Shift+PageUp / Shift+PageDown
  • Default: 10,000 lines. Configure with scrollback_lines in teru.conf