cyber-mux

September 8, 2026 · View on GitHub

npm version npm downloads release docs license

Cross-multiplexer pane control for AI-agent tooling. One contract over terminal multiplexers — open, send, read, focus, and close panes without caring which multiplexer you are inside.

cyber-mux is the mux seam used by cyberlegion, kept deliberately narrow: it drives panes and nothing else.

Install

npx cyber-mux mode

What it does

  • Detects the multiplexer you are running under — env fast-path (CYBER_MUX / CYBER_MUX_PANE), otherwise a process-ancestry walk falling back to the multiplexer's own env hints.
  • Drives panes through one MuxAdapter contract: open, send, submit, read, wait, focus, close, list, exists.
  • Nudges a peer pane and verifies the turn was actually taken (recovers a submit swallowed by a booting harness).
  • Worktrees: create a git worktree and open it in a new workspace/session in one step.

Backends

Drivable: tmux, rmux, herdr, wezterm, zellij, cmux, otty.

GNU screen is recognized and reported truthfully, then rejected with a named error rather than driven — it addresses panes positionally, so a driver-created pane has no stable identity to send to, read from, or self-identify by.

Commands

CommandDescription
cyber-mux doctorProbe the multiplexer, self pane, and backend; print fast-path pins
cyber-mux modeReport the detected session backend
cyber-mux openOpen a new pane/tab/workspace, optionally launching a command in it
cyber-mux sendDrive a pane without taking its turn (text or keys)
cyber-mux submitTake a pane's turn: type the text if given, then press Enter
cyber-mux readCapture a pane's output
cyber-mux waitBlock until a pane's output matches (exit 0), or the timeout elapses (exit 1)
cyber-mux focusBeam the attached client to a pane
cyber-mux closeClose a pane
cyber-mux list / existsEnumerate live panes / probe whether one is still live
cyber-mux worktreeGit worktree helpers for spawning and tearing down a session
cyber-mux templateManage named templates (apply one with open/worktree --template)
cyber-mux agentInspect and wait on a pane's agent-lifecycle state

Full reference: https://cyberuni.github.io/cyber-mux/

Development

Node and pnpm are pinned in mise.toml and managed by mise:

mise install  # node + pnpm at the pinned versions
pnpm install
pnpm verify   # build + typecheck + lint + test

The CLI lives in packages/cyber-mux; the docs site in apps/website (Astro + Starlight).

License

MIT