Multiplexer
teru is a terminal emulator and multiplexer in one binary. There is no separate tmux process, no config translation layer, no IPC overhead. The multiplexer is part of the same event loop as the renderer.
Tiling Layouts
Four layouts are available. Cycle through them with Ctrl+Space, Space.
master-stack
The default layout. One large “master” pane occupies the left side; remaining panes stack vertically on the right. The master ratio is adjustable:
Ctrl+Space, L— grow master pane (up to 85% width)Ctrl+Space, H— shrink master pane (down to 15% width)
Best for: focused work with reference panes alongside.
grid
All panes share equal space in a grid. Columns and rows adjust automatically as panes are added or removed.
Best for: monitoring multiple agents or processes simultaneously.
monocle
One pane fills the entire terminal window. Other panes are hidden but active — their processes continue running. Navigate with Ctrl+Space, n/p.
Best for: reading long output, full-screen editors.
floating
Panes retain their last position and size. No automatic arrangement.
Best for: custom arrangements, picture-in-picture style overlays.
Workspaces
teru provides 9 independent workspaces. Each workspace has its own set of panes and its own active layout.
Switch workspaces: Ctrl+Space, 1–9
- Panes in one workspace are invisible in others
- Each workspace remembers its layout independently
- The status bar shows the current workspace number
- AI agent teams auto-organize into dedicated workspaces (when using Claude Code integration)
Pane Management
Opening and Closing
| Action | Keybinding |
|---|---|
| New pane | Ctrl+Space, c |
| Close active pane | Ctrl+Space, x |
| Focus next pane | Ctrl+Space, n |
| Focus previous pane | Ctrl+Space, p |
Zoom
Ctrl+Space, z — expand the active pane to fill the screen (monocle mode), without changing the layout. Press again to restore.
Resize (master-stack only)
Ctrl+Space, H / Ctrl+Space, L adjusts the master-to-stack ratio in 5% increments (range: 15%–85%).
Session Persistence
teru can save and restore your complete session layout.
Saving
# Via keybinding:
Ctrl+Space, d # detach — saves session and exits
# Or send SIGUSR1:
kill -USR1 $(pidof teru) Restoring
teru --attach # restore last saved session The restored session recreates all panes in their workspaces with their layouts. Running processes are not restored (shells restart fresh), but the visual arrangement is preserved.
Binary Format
Sessions are serialized using a custom binary format — not JSON, not TOML. This makes session files compact and fast to read/write, at the cost of forward-compatibility (session files from different teru versions may not be compatible).
Scrollback Compression
teru uses command-stream compression instead of a ring buffer of expanded character cells. This gives 20-50x better compression ratios than traditional scrollback.
How It Works
Traditional terminals store scrollback as a grid of character cells: each cell holds a Unicode codepoint + 16 bytes of attributes. A 50,000-line scrollback (80 columns) costs ~640MB.
teru stores the raw VT byte stream with keyframe/delta compression:
- Keyframes: full grid snapshots at regular intervals
- Deltas: the raw VT bytes between keyframes (typically much smaller than the rendered output)
A 50,000-line scrollback that costs ~150MB in a traditional terminal costs ~3–7MB in teru.
Scrollback Navigation
| Key | Action |
|---|---|
Shift+PageUp | Scroll up one page |
Shift+PageDown | Scroll down one page |
| Any key | Exit scroll mode, return to live view |
The configured limit (scrollback_lines in teru.conf, default 10,000) controls how many lines are retained before the oldest keyframes are evicted.
Comparison with tmux
| Feature | teru | tmux |
|---|---|---|
| Separate process | No | Yes (server daemon) |
| Config format | 14 key-value pairs | tmux.conf DSL |
| Layouts | 4 built-in | Custom, complex |
| Workspaces | 9 | Named sessions |
| AI protocol | Native | None |
| Scrollback | 20-50x compressed | Ring buffer |
| GPU required | No | N/A (text) |
teru is not a tmux replacement for every workflow — it lacks detach/attach daemon mode (planned for v0.2.0) and copy-mode vi navigation (planned for v0.1.4). For current use cases (AI agent teams, local development), it works well as a daily driver.