Loading...
Loading...
Control the cmux macOS terminal app (CLI + socket API) — cmux workspaces, panes, surfaces, browser automation, notifications, settings, hooks. MUST be read before running any `cmux` command. Trigger ONLY when the user explicitly says "cmux" — a cmux pane, cmux workspace, cmux surface, or an agent running in cmux. Do NOT trigger on generic mentions of "workspace", "pane", "the other agent", or "delegate" when cmux is not named — workspaces in tmux, Ghostty, herdr, VS Code, etc. are NOT cmux. macOS only (14.0+).
npx skill4agent add davidondrej/skills cmuxcmux/tmp/cmux.sockworkspace:2pane:1surface:7--id-format uuids|bothpane:38surface:46--surface 46surface:46read-screencapture-pane--pane--workspace--surface--panecmux list-pane-surfaces --pane pane:Ncmux read-screen --surface surface:N2>/dev/null[ -S "${CMUX_SOCKET_PATH:-/tmp/cmux.sock}" ] || exit 0 # bail if not in cmux
[ -n "${CMUX_WORKSPACE_ID:-}" ] && echo "inside cmux surface"CMUX_WORKSPACE_IDCMUX_SURFACE_IDCMUX_SOCKET_PATHCMUX_PORTCMUX_WORKSPACE_IDcmux identify --json # who am I (window/workspace/pane/surface)
cmux tree # full hierarchy
cmux list-workspaces --json
cmux list-panes --workspace "$CMUX_WORKSPACE_ID"
cmux list-surfaces --workspace "$CMUX_WORKSPACE_ID"
cmux new-workspace --name "feature-x" --cwd /path/to/repo
cmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type terminal --direction right --focus false
cmux new-pane --workspace "$CMUX_WORKSPACE_ID" --type browser --direction right --url http://localhost:3000
cmux move-surface --surface surface:7 --pane pane:2 --focus false
cmux split-off --surface surface:7 right
cmux reorder-surface --surface surface:7 --before surface:3
cmux close-surface --surface surface:7sleepsleep 15sleep 2sleep 5send-surfacesend-key-surface--surfacesendsend-keysend-panelsend-key-panel--panelcmux send "echo hi\n" # focused terminal
cmux send-key "ctrl+c" # enter|tab|esc|backspace|arrows|ctrl+x|shift+tab
cmux send --surface surface:7 "npm run build" # specific surface (NOT send-surface)
cmux send-key --surface surface:7 enter # specific surface (NOT send-key-surface)cmux notify --title "Done" --body "tests passed"
cmux set-status build "compiling" --icon hammer --color "#ff9500"
cmux set-progress 0.5 --label "Building..."
cmux log --level success "All 42 tests passed" # info|progress|success|warning|error
cmux trigger-flash --workspace "$CMUX_WORKSPACE_ID" # blue-ring attention cue
cmux sidebar-state --json # dump all sidebar metadataS=$(cmux --json browser open https://example.com | jq -r .result.surface_ref)
cmux browser "$S" wait --load-state complete --timeout-ms 15000
cmux browser "$S" snapshot --interactive # returns elements as e1, e2, ...
cmux browser "$S" fill e1 "<email-address>"
cmux browser "$S" click e2 --snapshot-after
# Navigation / inspection
cmux browser "$S" goto URL | back | forward | reload
cmux browser "$S" get url | get title | get text body | get value "#email" | get count ".row"
cmux browser "$S" eval 'return document.title'
# Waits
cmux browser "$S" wait --selector "#ready" --timeout-ms 10000
cmux browser "$S" wait --url-contains "/dashboard" --timeout-ms 10000
# Session
cmux browser "$S" cookies get | cookies set --name foo --value bar
cmux browser "$S" state save /tmp/auth.json | state load /tmp/auth.json
# Diagnostics
cmux browser "$S" console list | errors list | screenshotnot_supportedcmux markdown open plan.md --direction right # live-watching renderer
cmux open file.pdf # auto-routes to right viewercmux markdown open--workspace--surface--window--direction <right|down|left|up>--focus <true|false>--pane--surface <existing-md-surface-in-that-pane>markdown open--direction right# 1. Find the right pane and its surfaces (anchor to THIS workspace)
cmux list-panes --workspace "$CMUX_WORKSPACE_ID"
cmux list-pane-surfaces --pane pane:10 # the right/helper pane
# 2. Open targeting an existing markdown surface IN that pane (reuses pane, adds tab)
cmux markdown open /abs/path/file.md --surface surface:12 --focus false
# 3. If it STILL spawned a new pane (it can), move the new surface in + verify
cmux move-surface --surface surface:NEW --pane pane:10 --focus false
cmux list-panes --workspace "$CMUX_WORKSPACE_ID" # confirm stray pane is gonemarkdown open# 1. close the previous right markdown surface (right side goes empty)
cmux list-panes --workspace "$CMUX_WORKSPACE_ID"
cmux close-surface --surface surface:PREV
# 2. THEN open the new file fresh
cmux markdown open /abs/path/new.md --direction right --focus falsemove-surfacesurface:126markdown openlist-paneslist-pane-surfacesmove-surfacetype=markdownsurface-healthclose-surfacecmux markdown open <path>refresh-surfacesread-screenSurface is not a terminalcmux list-surfacescmux list-pane-surfaces [--pane ...]cmux docs settings # prints paths, schema URL, reload cmd — read BEFORE editing
cmux settings path # path to cmux.json
cmux settings cmux-json # open in editor
cmux reload-config # hot-reload cmux.json + ~/.config/ghostty/config (Cmd+Shift+,)~/.config/cmux/cmux.json.cmux/cmux.json./cmux.json~/.config/ghostty/configcmux.json.bakhttps://raw.githubusercontent.com/manaflow-ai/cmux/main/web/data/cmux.schema.jsoncmux.json"sidebar": {
"showWorkspaceDescription": false, // custom/AI workspace descriptions
"showNotificationMessage": false // latest agent message preview (the "Repo scanned…" style blurb)
}sidebar.hideAllDetails: truebrew tap manaflow-ai/cmux && brew install --cask cmux
sudo ln -sf /Applications/cmux.app/Contents/Resources/bin/cmux /usr/local/bin/cmux
cmux hooks setup # all detected agents
cmux hooks setup codex|grok|antigravity|opencode # specific agent
npx skills add manaflow-ai/cmux -g -y # install cmux skills for agents/tmp/cmux.sockecho '{"id":"1","method":"workspace.list","params":{}}' | nc -U /tmp/cmux.socksystem.*window.*workspace.*pane.*surface.*notification.*browser.*references/socket-api.mdcmuxOnlyautomationpasswordallowAllFailed to connect to socketcmuxOnlycmux-workspaceCMUX_WORKSPACE_IDselect-workspacefocus-panefocus-panelfocus-surface--focus falsecmux new-pane --type … --focus falsecmux surface-healthcmuxOnly{"command":...}cat ~/.cmuxterm/*-hook-sessions.jsoncmux <cmd> --helpcmux capabilities --json