cmux
Original:🇺🇸 English
Translated
Control the cmux terminal multiplexer. Use this skill when the user asks to manage terminal panes, workspaces, windows, browser splits, or interact with cmux in any way. Also use when you need to read other terminal screens, send commands to other panes, create splits, or manage the terminal layout.
5installs
Sourcexalior/agent-skills
Added on
NPX Install
npx skill4agent add xalior/agent-skills cmuxTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →This skill provides complete knowledge of the CLI so you can control the cmux terminal multiplexer without needing to rediscover its interface.
cmuxBinary Location
/Applications/cmux.app/Contents/Resources/bin/cmuxUsually on PATH as .
cmuxGlobal Options
cmux [--socket PATH] [--window WINDOW] [--password PASSWORD] [--json] [--id-format refs|uuids|both] [--version] <command> [options]- : Output JSON (use this when you need to parse results programmatically)
--json - : Control ID format in output (defaults to refs)
--id-format refs|uuids|both - : Override Unix socket path
--socket PATH - : Socket auth password
--password PASSWORD
Environment Variables
- - Auto-set in cmux terminals. Default
CMUX_WORKSPACE_IDfor all commands.--workspace - - Optional alias for
CMUX_TAB_ID/tab-actiondefaultrename-tab.--tab - - Auto-set in cmux terminals. Default
CMUX_SURFACE_ID.--surface - - Override the default Unix socket path (
CMUX_SOCKET_PATH)./tmp/cmux.sock
Important: Because and are auto-set, most commands work without explicit / flags when run from within a cmux terminal. They default to the caller's context.
CMUX_WORKSPACE_IDCMUX_SURFACE_ID--workspace--surfaceID/Ref System
Most commands accept IDs in these formats:
- UUIDs: Full unique identifiers
- Short refs: ,
window:1,workspace:2,pane:3surface:4 - Indexes: Numeric indexes
tab-actiontab:<n>surface:<n>Commands Reference
Discovery & Status
| Command | Description |
|---|---|
| Show cmux version |
| Check if cmux is running |
| List supported capabilities |
| Identify current context |
Windows
| Command | Description |
|---|---|
| List all windows |
| Get the current window |
| Create a new window |
| Focus a window |
| Close a window |
| Rename a window |
| Navigate windows |
Workspaces (tabs in the UI)
| Command | Description |
|---|---|
| List all workspaces |
| Get current workspace |
| Create workspace, optionally run a command |
| Switch to workspace |
| Close workspace |
| Rename workspace |
| Trigger workspace action |
| Move workspace to another window |
| Reorder workspace |
Panes & Surfaces
| Command | Description |
|---|---|
| List panes in workspace |
| List surfaces in a pane |
| Focus a pane |
| Create a new pane |
| Split current pane |
| Add surface (tab) to pane |
| Close a surface |
| Move surface between panes |
| Reorder surface within pane |
| Drag surface into a new split |
| Resize pane |
| Swap two panes |
| Break pane into new workspace |
| Join pane into another |
| Focus previous pane |
| Refresh all surfaces |
| Check surface health |
| Respawn a pane |
Tabs (Surface-level)
| Command | Description |
|---|---|
| Trigger tab action |
| Rename a tab |
| Flash a surface |
Panels
| Command | Description |
|---|---|
| List panels |
| Focus a panel |
| Send text to panel |
| Send keypress to panel |
Reading & Sending to Terminals
| Command | Description |
|---|---|
| Read terminal screen content |
| Alias for read-screen |
| Send text to a terminal |
| Send a keypress to a terminal |
| Pipe pane output to a command |
| Clear scrollback history |
| Find window by content or title |
Clipboard / Buffers
| Command | Description |
|---|---|
| Store text in a named buffer |
| List all buffers |
| Paste buffer into surface |
Notifications
| Command | Description |
|---|---|
| Send a notification |
| List notifications |
| Clear notifications |
Sidebar Metadata
| Command | Description |
|---|---|
| Set sidebar status |
| Clear a status key |
| List all status entries |
| Set progress bar |
| Clear progress bar |
| Write to sidebar log |
| Clear sidebar log |
| List log entries |
| Get sidebar state |
Browser Control
Create and control browser panes within cmux.
Opening browsers:
cmux browser open [url] # Open browser in caller's workspace
cmux browser open-split [url] # Open as a split
cmux new-pane --type browser [--url <url>] [--direction left|right|up|down]Navigation:
cmux browser goto|navigate <url> [--snapshot-after]
cmux browser back|forward|reload [--snapshot-after]
cmux browser url|get-urlReading page content:
cmux browser snapshot [--interactive|-i] [--cursor] [--compact] [--max-depth <n>] [--selector <css>]
cmux browser get <url|title|text|html|value|attr|count|box|styles> [...]
cmux browser console <list|clear>
cmux browser errors <list|clear>Interacting with elements:
cmux browser click|dblclick|hover|focus|check|uncheck|scroll-into-view <selector> [--snapshot-after]
cmux browser type <selector> <text> [--snapshot-after]
cmux browser fill <selector> [text] [--snapshot-after] # empty text clears input
cmux browser press|keydown|keyup <key> [--snapshot-after]
cmux browser select <selector> <value> [--snapshot-after]
cmux browser scroll [--selector <css>] [--dx <n>] [--dy <n>] [--snapshot-after]Querying elements:
cmux browser is <visible|enabled|checked> <selector>
cmux browser find <role|text|label|placeholder|alt|title|testid|first|last|nth> ...
cmux browser highlight <selector>Waiting:
cmux browser wait [--selector <css>] [--text <text>] [--url-contains <text>] [--load-state <interactive|complete>] [--function <js>] [--timeout-ms <ms>]JavaScript execution:
cmux browser eval <script>Page manipulation:
cmux browser frame <selector|main>
cmux browser dialog <accept|dismiss> [text]
cmux browser viewport <width> <height>
cmux browser geolocation|geo <lat> <lon>
cmux browser offline <true|false>
cmux browser addscript <script>
cmux browser addstyle <css>
cmux browser addinitscript <script>State & network:
cmux browser state <save|load> <path>
cmux browser cookies <get|set|clear> [...]
cmux browser storage <local|session> <get|set|clear> [...]
cmux browser download [wait] [--path <path>] [--timeout-ms <ms>]
cmux browser network <route|unroute|requests> [...]
cmux browser trace <start|stop> [path]
cmux browser screencast <start|stop>
cmux browser input <mouse|keyboard|touch>Browser tabs:
cmux browser tab <new|list|switch|close|<index>> [...]Browser identity:
cmux browser identify [--surface <id|ref|index>]Hooks & Signals
| Command | Description |
|---|---|
| Set/list/unset hooks |
| Wait for or send a signal |
Other
| Command | Description |
|---|---|
| Set app focus state |
| Simulate app becoming active |
| Claude session hooks |
| Display a message |
| Key binding controls |
| Show popup |
Common Patterns
Discover current layout
bash
cmux identify # Who am I?
cmux list-workspaces --json # All workspaces
cmux list-panes --json # All panes in current workspaceRun a command in a new split
bash
cmux new-split right # Create split to the right
# Then send a command to it (need to target the new surface)
cmux send --surface <new-surface-ref> "npm run dev"
cmux send-key --surface <new-surface-ref> EnterRead what's on another terminal
bash
cmux read-screen --surface <ref> # Current visible content
cmux read-screen --surface <ref> --scrollback --lines 200 # With scrollbackOpen a browser alongside terminal
bash
cmux browser open http://localhost:3000
# or as a directional split:
cmux new-pane --type browser --direction right --url http://localhost:3000Show progress in sidebar
bash
cmux set-progress 0.5 --label "Building..."
cmux log --level info --source claude -- "Step 3/5 complete"
cmux set-status task "Running tests" --icon checkmark --color "#00ff00"Tips
- Always use when you need to parse output programmatically.
--json - When creating splits/panes, capture the output to get the new surface/pane ID for subsequent commands.
- is invaluable for checking what's happening in other terminals.
read-screen - sends raw text; remember to follow with
sendto execute a command.send-key Enter - Browser gives you a DOM snapshot — use
snapshotfor a smaller representation.--compact - Use on browser interaction commands to get the page state after the action.
--snapshot-after