bmux_cli
Command-line interface for bmux terminal multiplexer.
Overview
bmux_cli provides:
- Local server lifecycle commands (
start,status,stop) - Session lifecycle commands (new/list/attach/detach/kill)
- Client listing command (list-clients / session clients)
- Session role controls (permissions/grant/revoke)
- Window lifecycle commands (new/list/switch/kill)
- Client follow controls (follow/unfollow)
- Alias-compatible command forms (top-level and grouped)
- Runtime/terminal diagnostics (
keymap doctor,terminal doctor)
Server Commands
# foreground (default)
# background daemon mode
# status and graceful shutdown
Shutdown behavior:
bmux server stoptries graceful IPC shutdown first.- If graceful shutdown times out, CLI falls back to PID-based termination.
bmux server restore --yesreplaces the current in-memory server state with the persisted snapshot.
Session Commands
Top-level and grouped forms are exact aliases.
# top-level
# grouped aliases
Session target values for attach/kill support both:
- session name
- session UUID
Attach also supports follow mode:
bmux attach --follow <client-uuid>bmux attach --follow <client-uuid> --global
Attach UI defaults (user-overridable via keybindings):
Ctrl-D: detachCtrl-T: enter window mode- window mode:
h/lprevious/next window (wrap),1..9jump to index,nnew window,xclose active window,Esc/Enterexit window mode
Window Commands
Top-level and grouped forms are exact aliases.
# top-level
# grouped aliases
Window target values for switch/kill support:
- window name
- window UUID
active
When --session is omitted, window commands use the currently attached session context.
Follow Commands
Top-level and grouped forms are exact aliases.
# top-level
# grouped aliases
follow target must be a client UUID.
Permission Commands
Top-level and grouped forms are exact aliases.
# top-level
# grouped aliases
Role policy:
owner: can mutate session/window state and manage roleswriter: can send attach input onlyobserver: read-only attach
JSON Output
--json is supported on list commands:
bmux list-sessions --jsonbmux session list --jsonbmux list-clients --jsonbmux session clients --jsonbmux permissions --session <name|uuid> --jsonbmux session permissions --session <name|uuid> --jsonbmux list-windows --jsonbmux window list --json
Output format is a bare JSON array.
Troubleshooting
- If daemon state is stale after an interrupted start/stop, rerun
bmux server statusandbmux server stopfirst; CLI includes stale PID cleanup logic. - If a stale PID file still exists, remove
server.pidfrom bmux runtime dir and restart server.