Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
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) - First-class SSH targets (
connect,remote, and global--target)
Default launch behavior:
- Running
bmuxwith no subcommand now uses the server path only. - If the server is not running, bmux starts it in daemon mode.
- If no session exists, bmux creates
tab-1(or the next availabletab-N) and attaches.
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.--force-localkill bypass is allowed only when your profile principal matches the server owner principal (bmux server whoami-principal).
Remote Target Commands
# connect directly to a target/session
# when session is omitted:
# - 0 sessions: error with next-step command
# - 1 session: auto-select
# - many sessions: interactive picker
# remote target utilities
# streamlined aliases
# optional runtime instance selection (parallel local runtimes)
# sandboxed runs (isolated config/runtime/data/state/logs)
# opt-in control-plane mode (hard-fails if control-plane operations fail)
# run an internet-accessible TLS gateway
# or force reverse-SSH hosting helper instead of iroh
# iroh hosted mode is default when --host is enabled
# prints iroh://<endpoint_id>?relay=<url>
# target any normal command remotely
Shell completion snippets:
# Bash: target completion for `bmux connect <TAB>`
# Bash: session completion helper
# Zsh helper examples
# Fish helper examples
Target precedence for command routing:
--targetBMUX_TARGET[connections].default_target- local target
Example target config:
[]
= "local"
[]
= "ssh"
= "prod.example.com"
= "bmux"
= 22
= "~/.ssh/id_ed25519"
= "~/.ssh/known_hosts"
= true
= "ops@bastion.example.com"
= "bmux"
= 8000
= "main"
[]
= "tls"
= "gateway.example.com"
= 7443
= "gateway.example.com"
= "~/.config/bmux/gateway-ca.pem"
TLS targets support standard command routing via --target (for commands that use normal client connections), plus bmux connect and remote utility commands.
Hosted URLs are accepted directly by connect (for example: bmux connect https://abc123.example.net app).
For long-lived unstable links, bmux connect supports --reconnect-forever.
Logging Commands
# show effective log file path
# show effective runtime level
# show recent lines and keep following
# show a fixed slice and exit
# show entries newer than relative time
# interactive watch with seed filters
# use named profile state
# manage saved profiles
Logging behavior:
- bmux writes logs to file by default.
- default level is
info. --verboseraises level todebug.--log-level error|warn|info|debug|traceoverrides both defaults and--verbose.logs path --jsonandlogs level --jsonreturn object output.logs tail --since <duration>filters by RFC3339 timestamps in log lines (s,m,h,dunits).logs watchprovides a live interactive viewer with non-destructive include/exclude filters.logs watchfilter seed flags:--include,--include-i,--exclude,--exclude-i.logs watchsaves filter/session state across runs (default global profiledefault).logs watch --profile <name>scopes saved state to a named profile for a specific workflow.logs profiles list|show|delete|renamemanages saved watch profiles.logs watchuses a ratatui interface for scalable log tooling.logs watchkeys:aadd include,xadd exclude,ttoggle rule,itoggle per-filter case mode,ddelete rule,cclear rules,/quick substring filter,ppause,qquit.- Vim-style navigation:
j/kmove,g/Gtop/bottom,Ctrl-u/Ctrl-dhalf-page,PageUp/PageDownfull-page.
Log/state directory conventions:
- Linux
- state:
$XDG_STATE_HOME/bmux(fallback:~/.local/state/bmux) - logs:
<state>/logs(override withBMUX_LOG_DIR)
- state:
- macOS
- state:
~/Library/Application Support/bmux/State - logs:
~/Library/Logs/bmux
- state:
- Windows
- state:
%LOCALAPPDATA%\\bmux\\State - logs:
%LOCALAPPDATA%\\bmux\\Logs
- state:
Environment overrides:
BMUX_STATE_DIR: override state rootBMUX_LOG_DIR: override log directoryBMUX_LOG_LEVEL: set runtime log level (error|warn|info|debug|trace)
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-A d: detachCtrl-A [: enter scrollback mode for the focused pane- scrollback mode: arrows or
h/j/k/lmove the cursor,vstarts selection,ycopies selection,Entercopies selection and exits (or just exits if nothing is selected),PageUp/PageDownpage,Ctrl-Y/Ctrl-Eline-scroll the viewport,g/Gtop/bottom,Ctrl-A ]orEsccancel selection / exit
Prefix timeout behavior is configurable under [keybindings]:
- omit both
timeout_profileandtimeout_msto keep prefix mode active indefinitely - set
timeout_profile = "fast" | "traditional" | "slow"for named timed behavior - override built-in profile values with
[keybindings.timeout_profiles] - set
timeout_msfor an exact override; it takes precedence overtimeout_profile
[]
= "ctrl+a"
= "traditional"
[]
= 450
Sample timeout sections:
# Default modal-style prefix: stays active until the next key
[]
= "ctrl+a"
# Named timed behavior with user-overridden built-in profile values
[]
= "ctrl+a"
= "traditional"
[]
= 180
= 450
= 900
# Exact millisecond override wins over timeout_profile
[]
= "ctrl+a"
= "traditional"
= 275
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.
Bundled Plugins
Plugins bundled next to the bmux executable are enabled by default.
Use config opt-out when you want to disable specific bundled plugins:
[]
= ["bmux.windows", "bmux.permissions", "bmux.clipboard"]
You can still explicitly enable additional non-bundled plugins:
[]
= ["example.native"]
Optional routing policy can enforce required plugin command ownership at startup without hardcoding plugin IDs in core runtime:
[]
= "fail_startup"
[[]]
= "plugin"
[[]]
= ["playbook", "run"]
required_namespaces and required_paths support optional owner = "plugin.id"
when you want a specific plugin to own the claim.
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.