mux run executes a single request to completion and exits.
mux run
Execute a one-off agent task:
Options
| Option | Short | Description | Default |
|---|---|---|---|
--dir <path> | -d | Project directory | Current directory |
--model <model> | -m | Model to use (e.g., anthropic:claude-sonnet-4-5) | Default model |
--runtime <runtime> | -r | Runtime: local, worktree, or ssh <host> | local |
--mode <mode> | Agent mode: plan or exec | exec | |
--thinking <level> | -t | Thinking level: off, low, medium, high | medium |
--timeout <duration> | Timeout (e.g., 5m, 300s, 300000) | No timeout | |
--json | Output NDJSON for programmatic use | Off | |
--quiet | -q | Only output final result | Off |
--workspace-id <id> | Explicit workspace ID | Auto-generated | |
--config-root <path> | Mux config directory | ~/.mux |
Runtimes
local(default): Runs directly in the specified directory. Best for one-off tasks.worktree: Creates an isolated git worktree under~/.mux/src. Useful for parallel work.ssh <host>: Runs on a remote machine via SSH. Example:--runtime "ssh user@myserver.com"
Output Modes
- Default (TTY): Human-readable streaming with tool call formatting
--json: NDJSON streaming - each line is a JSON object with event data--quiet: Suppresses streaming output, only shows final assistant response
Examples
mux server
Start the HTTP/WebSocket server for remote access (e.g., from mobile devices):
--host <host>- Host to bind to (default:localhost)--port <port>- Port to bind to (default:3000)--auth-token <token>- Optional bearer token for authentication--add-project <path>- Add and open project at the specified path
mux desktop
Launch the desktop app. This is automatically invoked when running the packaged app or via electron .:
mux with no arguments under Electron, the desktop app launches automatically.