Remote Accesscmux TUI
Remote Access

cmux TUI

cmux TUI is a Rust terminal multiplexer for macOS, Linux, and Windows. It combines workspaces, screens, split panes, terminal tabs, browser tabs, remote sessions, and a control socket in one process.

cmux TUI running inside cmux on macOS with Neovim, OpenCode, and Hunk in three panes beside the TUI workspace rail
A live session with Neovim, OpenCode, and the Hunk review TUI.

Install and run

The install scripts select the native binary for your operating system and architecture, verify its SHA-256 checksum, and add cmux to your PATH.

View install script
curl -fsSL https://cmux.com/tui/install.sh | sh

If Node.js is already installed, you can run cmux without installing it permanently:

npx cmux
Packaged builds support Apple Silicon and Intel Macs, x64 and Arm64 Linux, and x64 Windows. Windows on Arm runs the x64 build through emulation. Building from source requires Rust, Zig 0.15.2, and the repository's Ghostty submodule.

The workspace model

cmux TUI keeps one durable tree instead of flattening every process into an unrelated terminal tab.

session
└── workspaces
    └── screens
        └── panes
            └── tabs (terminal or browser surfaces)

A session owns one control socket. Each workspace can contain multiple screens; each screen owns a pane layout; each pane can contain terminal and browser tabs. Closing a tab does not close its pane when other tabs remain.

Keyboard and mouse

The default prefix is Ctrl-b. Press it twice to send a literal Ctrl-b to the active terminal.

KeysAction
Ctrl-b %Split the active pane right
Ctrl-b "Split the active pane down
Ctrl-b tCreate a terminal tab
Ctrl-b WCreate a workspace
Ctrl-b sShow or hide the workspace rail
Ctrl-b dQuit locally or detach from a server

Click pane borders, tabs, workspaces, and screens directly. Right-click a pane for actions. Hold Shift while right-clicking when the application inside the pane owns mouse input.

Headless sessions and attach

Headless mode keeps the mux backend and its terminals running without a local interface. Attach from another terminal when you need the UI.

cmux --headless --session agents
cmux attach --session agents

The default session is main. Named sessions use separate Unix sockets. Detaching leaves a headless server running, so a later attach restores the same tree and terminal state.

Keep a session running as a service

cmux server install keeps the main session running as a service, so it starts again after a reboot, with no one logged in. On Linux it writes a systemd user unit and turns on lingering; on macOS it writes a LaunchAgent. It needs no sudo, and the session listens only on a Unix socket that only your account can open.

cmux server install
cmux server status
cmux server logs --follow
cmux server uninstall

To set up another machine that you reach with SSH, give it as ssh://[user@]host[:port]. cmux installs itself there with the install script, starts the service, checks that the session answers, and adds the machine to the cmux app here. It shows each command and asks before it runs it; --yes runs every step without asking. Host-key checking stays as your SSH config has it, and agent, X11 and port forwarding are off.

cmux server install ssh://alice@build.example.com
cmux server uninstall ssh://alice@build.example.com

--user starts the service when you log in and stops it when you log out, and leaves lingering as it is. --channel stable or --channel nightly picks the build that goes on the other machine. On a machine where you already are, the install script does the same with --server:

curl -fsSL https://cmux.com/tui/install.sh | sh -s -- --server
The service commands ship in cmux NIGHTLY builds. install stops when a cmux-server unit or LaunchAgent that cmux did not write is in the way, and uninstall leaves such a unit as it is.

Remote machines

Enable the machine rail to switch between the current session and configured Unix-socket or SSH targets.

{
  "machine_sidebar": { "enabled": true },
  "machines": [
    {
      "id": "buildbox",
      "name": "Build box",
      "transport": "ssh",
      "host": "dev@buildbox",
      "session": "agents"
    }
  ]
}

The remote machine must already run a headless cmux session, and noninteractive SSH must find the cmux binary. cmux uses strict host-key checking and disables agent forwarding and port forwarding.

Browser tabs

A browser tab controls a real Chrome or Chromium target through the Chrome DevTools Protocol. Profiles persist between sessions, so cookies and sign-ins can remain available. Open a browser tab with:

Ctrl-b B

Automation and the control socket

Every tree mutation and inspection used by the TUI is also available through the command line and JSON-lines control socket.

cmux --session agents workspace list --json
workspace_id="$(cmux --session agents workspace create --name review --json | jq -r '.value.workspace_id')"
cmux --session agents workspace "$workspace_id" run -- npm test
cmux --session agents terminal <terminal-id> screen read

Commands can create workspaces, run processes, split panes, send input, read visible terminal text, subscribe to events, and report agent state. Typed bindings live in the repository for TypeScript, Python, Go, Java, and Rust.

Configuration

Configure keys, sidebar width, machines, browser behavior, startup commands, and theme values in the TUI config file. CMUX_TUI_CONFIG overrides the default path.

~/.config/cmux/cmux-tui.json

More