cmux-workspace

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

Work inside the current cmux workspace and terminal. Use for cmux workspace, current workspace, caller surface, panes, surfaces, socket targeting, and non-interfering cmux automation.

skills/cmux-workspace/SKILL.md

Download bundle ↓
main · 6f118af3 bundle filesScanned 2026-09-15

references/commands.md

1,183 tokens · o200k_base · 4,393 bytes

Source excerpt starting at line 1.
# cmux Workspace Command Reference Use these commands from a cmux terminal. Most commands infer the caller workspace from `CMUX_WORKSPACE_ID`, but explicit flags are safer for automation. ## Context ```bashcmux identify --jsoncmux --json --id-format both identify   # stable UUIDs plus human refs, for logs and handoffscmux current-workspace --jsoncmux capabilities --jsoncmux ping``` ## Windows and Workspaces ```bashcmux list-windowscmux current-windowcmux new-windowcmux focus-window --window window:2cmux close-window --window window:2 cmux list-workspacescmux list-workspaces --jsoncmux new-workspace --name "task" --cwd "$PWD"cmux new-workspace --command "npm run dev"cmux new-workspace --layout '{"root":{"type":"terminal"}}'cmux current-workspacecmux select-workspace --workspace workspace:2cmux rename-workspace --workspace workspace:2 -- "new name"cmux close-workspace --workspace workspace:2cmux reorder-workspace --workspace workspace:4 --before workspace:2cmux move-workspace-to-window --workspace workspace:4 --window window:1``` ## Panes and Surfaces ```bashcmux list-panes --workspace "$CMUX_WORKSPACE_ID"cmux list-pane-surfaces --workspace "$CMUX_WORKSPACE_ID" --pane pane:1cmux list-panels --workspace "$CMUX_WORKSPACE_ID"cmux tree --workspace "$CMUX_WORKSPACE_ID" cmux new-split right --workspace "$CMUX_WORKSPACE_ID"cmux new-split down --workspace "$CMUX_WORKSPACE_ID" --surface "$CMUX_SURFACE_ID"cmux new-split down --workspace "$CMUX_WORKSPACE_ID" --command "npm run dev"cmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type terminal --direction rightcmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type terminal --direction right --command "tail -f logs/dev.log"cmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type browser --url http://localhost:3000cmux new-surface --workspace "$CMUX_WORKSPACE_ID" --type terminal --pane pane:1cmux new-surface --workspace "$CMUX_WORKSPACE_ID" --type terminal --pane pane:1 --working-directory "$PWD" --command "npm test"cmux new-surface --workspace "$CMUX_WORKSPACE_ID" --type browser --pane pane:1 --url http://localhost:3000 cmux focus-pane --workspace "$CMUX_WORKSPACE_ID" --pane pane:2cmux focus-panel --workspace "$CMUX_WORKSPACE_ID" --panel surface:3cmux close-surface --workspace "$CMUX_WORKSPACE_ID" --surface surface:3cmux move-surface --surface surface:7 --pane pane:2 --focus truecmux reorder-surface --surface surface:7 --before surface:3cmux move-tab-to-new-workspace --surface surface:7 --title "browser"``` `--command <text>` (also on `new-workspace`) types the text plus one Enter into the new terminal's interactive shell at spawn time, so no follow-up `send` or `send-key enter` is needed and the shell stays alive after the command exits. It is terminal-only (`--type browser|simulator|agent-session` rejects it), blank text is ignored, and `new-workspace --layout` ignores it. ## Input ```bashcmux send "echo hello\n"cmux send-key entercmux send --surface "$CMUX_SURFACE_ID" "git status\n"cmux send-key --surface "$CMUX_SURFACE_ID" entercmux read-screen --surface "$CMUX_SURFACE_ID"``` ## Sidebar Metadata ```bashcmux set-status build "running" --workspace "$CMUX_WORKSPACE_ID" --icon hammer --color "#ff9500"cmux clear-status build --workspace "$CMUX_WORKSPACE_ID"cmux list-status --workspace "$CMUX_WORKSPACE_ID"cmux set-progress 0.5 --workspace "$CMUX_WORKSPACE_ID" --label "Building"cmux clear-progress --workspace "$CMUX_WORKSPACE_ID"cmux log --workspace "$CMUX_WORKSPACE_ID" --level info -- "Build started"cmux list-log --workspace "$CMUX_WORKSPACE_ID" --limit 20cmux clear-log --workspace "$CMUX_WORKSPACE_ID"cmux sidebar-state --workspace "$CMUX_WORKSPACE_ID" --json``` ## Notifications and Attention ```bashnotification_id="$(cmux notify --title "Done" --body "Task complete" --id-format uuids | awk '$1 == "OK" {print $2}')"cmux dismiss-notification --id "$notification_id"cmux notify --clearcmux list-notifications --jsoncmux clear-notifications --workspace "$CMUX_WORKSPACE_ID" --surface "$CMUX_SURFACE_ID"cmux trigger-flash --workspace "$CMUX_WORKSPACE_ID" --surface "$CMUX_SURFACE_ID"cmux surface-health --workspace "$CMUX_WORKSPACE_ID" --json``` ## Config and Docs ```bashcmux docs apicmux docs browsercmux docs settingscmux settings pathcmux settings cmux-jsoncmux settings shortcutscmux reload-config``` 
Referenced from SKILL.md