Skip to main content
Manage cmux windows using the command-line interface. Windows contain workspaces and can be controlled programmatically.

list-windows

List all open windows with their IDs, indexes, and workspace counts.
Flags:
boolean
Output results in JSON format
string
Control ID output format: refs, uuids, or both (default: refs)
Output (text):
Output (JSON):

current-window

Get the ID of the currently focused window.
Flags:
boolean
Output results in JSON format
Output (text):
Output (JSON):

new-window

Create a new window.
Output:

focus-window

Focus a specific window by ID, ref, or index.
Flags:
string
required
Window ID (UUID), ref (window:1), or index (1)
Examples:
Output:

close-window

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

Global Flags

These flags can be used with any window command:
string
Path to the cmux socket (default: /tmp/cmux.sock or $CMUX_SOCKET_PATH)
string
Socket authentication password (or use $CMUX_SOCKET_PASSWORD)