Reference
CLI reference
Every subcommand, panel type, and flag of the muxbay, purplemux, and pmux binaries.
muxbay ships with three equivalent binary names — muxbay, purplemux, and pmux (all routing through bin/purplemux.js) — used both to launch the server and to script tabs/browsers over the local HTTP API.
Two roles, one binary
| Form | What it does |
|---|---|
muxbay / muxbay start |
Start the server on :8022 |
muxbay <subcommand> |
Talk to a running server's CLI HTTP API |
purplemux ... / pmux ... |
Backward-compatible aliases for muxbay ... |
Starting the server
muxbay # default on 127.0.0.1:8022
muxbay start # explicit start
PORT=9000 muxbay # custom port
HOST=all muxbay # bind all interfaces (0.0.0.0)
See Ports & env vars for all environment variables.
Subcommands
Subcommands automatically read ~/.purplemux/port and ~/.purplemux/cli-token:
| Command | Purpose |
|---|---|
muxbay workspaces |
List workspaces |
muxbay tab list [-w WS] |
List tabs (optionally scoped to a workspace) |
muxbay tab create -w WS [-n NAME] [-t TYPE] |
Create a new tab |
muxbay tab send -w WS TAB_ID CONTENT... |
Send input to a tab |
muxbay tab status -w WS TAB_ID |
Inspect a tab's status |
muxbay tab result -w WS TAB_ID |
Capture the tab pane's current content |
muxbay tab close -w WS TAB_ID |
Close a tab |
muxbay tab browser ... |
Drive a web-browser tab (macOS Electron only) |
muxbay api-guide |
Print the full /api/cli/* HTTP API reference |
muxbay help |
Show usage |
tab create panel types (-t / --type)
| Value | Panel |
|---|---|
terminal |
Plain shell (default when -t is omitted) |
claude-code |
Claude Code session |
codex-cli |
OpenAI Codex CLI session |
agy-cli |
Gemini (agy) CLI session |
agent-sessions |
Unified recent sessions picker |
web-browser |
Embedded browser (macOS Electron only) |
diff |
Git diff & sync panel |
tab browser subcommands
Available when a tab's type is web-browser inside the macOS Electron app:
| Subcommand | What it returns |
|---|---|
muxbay tab browser url -w WS TAB_ID |
Current URL + page title |
muxbay tab browser screenshot -w WS TAB_ID [-o FILE] [--full] |
PNG screenshot (--full captures full page) |
muxbay tab browser console -w WS TAB_ID [--since MS] [--level LEVEL] |
Recent console entries |
muxbay tab browser network -w WS TAB_ID [--since MS] [--method M] [--url SUBSTR] [--status CODE] [--request ID] |
Recent network requests / bodies |
muxbay tab browser eval -w WS TAB_ID EXPR |
Evaluate a JS expression in the page |
Examples
muxbay workspaces
muxbay tab create -w ws-MMKl07 -t claude-code -n "refactor auth"
muxbay tab create -w ws-MMKl07 -t codex-cli -n "fix tests"
muxbay tab create -w ws-MMKl07 -t agy-cli -n "gemini review"
muxbay tab send -w ws-MMKl07 tb-abc "Run the unit test suite"
Authentication (x-pmux-token)
Every CLI request sends x-pmux-token: $(cat ~/.purplemux/cli-token) verified via timingSafeEqual. Override with PMUX_PORT and PMUX_TOKEN if calling from a script without access to ~.
The CLI token grants full control over your running server. Never commit or share it. Rotate by deleting `~/.purplemux/cli-token` and restarting.
What's next
- Ports & env vars —
PMUX_PORT,PMUX_TOKEN,LOG_LEVEL, andHOST. - Tmux & orphan sessions — inspect
tmux -L purpledirectly. - Architecture — how CLI calls reach
tmuxandnode-pty.