Skip to main content
Manage workspaces (vertical tabs) in cmux. Each workspace contains one or more panes with surfaces.

list-workspaces

List all workspaces in the current or specified window.
Flags:
boolean
Output results in JSON format
string
Control ID output format: refs, uuids, or both (default: refs)
string
Window ID, ref, or index to list workspaces from
Output (text):
Output (JSON):

new-workspace

Create a new workspace with optional working directory and command.
Flags:
string
Working directory for the new workspace (absolute or relative path)
string
Command to run after workspace creation (automatically appends \n)
Examples:
Output:

select-workspace

Switch to a specific workspace by ID, ref, or index.
Flags:
string
required
Workspace ID (UUID), ref (workspace:1), or index (1)
Examples:
Output (text):
Output (JSON with —json):

close-workspace

Close a specific workspace by ID, ref, or index.
Flags:
string
required
Workspace ID (UUID), ref (workspace:1), or index (1)
Examples:
Output:

rename-workspace

Rename a workspace (also aliased as rename-window).
Flags:
string
Workspace to rename (defaults to current workspace from $CMUX_WORKSPACE_ID)
Examples:
Output:

current-workspace

Get the ID of the currently selected workspace.
Output (text):
Output (JSON with —json):

move-workspace-to-window

Move a workspace to a different window.
Flags:
string
required
Workspace to move (ID, ref, or index)
string
required
Destination window (ID, ref, or index)
Examples:
Output:

reorder-workspace

Reorder a workspace within its window.
Flags:
string
required
Workspace to reorder (ID, ref, or index)
string
Window context (if omitted, uses current window)
string
Place before this workspace (ID, ref, or index)
string
Place after this workspace (ID, ref, or index)
number
Set specific index position (0-based)
Examples:
Output:

workspace-action

Perform various workspace actions (next, previous, last, rename).
Flags:
string
required
Action: next, previous, last, or rename
string
Target workspace (defaults to current workspace)
string
New title (for rename action only)
Examples:
Output:

Global Flags

These flags can be used with most workspace commands:
string
Path to the cmux socket (default: /tmp/cmux.sock or $CMUX_SOCKET_PATH)
string
Socket authentication password (or use $CMUX_SOCKET_PASSWORD)
boolean
Output results in JSON format
string
Control ID output format: refs, uuids, or both