Muse Code

Muse Code is Meta's coding agent for the terminal and CI, built for Muse Spark. Run it in a project and it plans, edits, and runs commands to do a task, with approvals and an OS sandbox on from the first run.

Muse Code and the Model API are two ways to use the same model. Call the API directly when you build your own agent or app. Run Muse Code when you want a ready-made coding agent at the command line or in a pipeline.

Workflows coordinate parallel and staged agent work when the installed build includes the workflow engine and the rollout is enabled. They are not available on every build or platform. Session messaging lets independent live sessions exchange handoffs, review requests, and status updates.

Install

Install Muse Code with the one-line installer. It puts a native muse binary on your path.

bash
curl -fsSL https://dev.meta.ai/install.sh | sh

Confirm it's on your path:

bash
muse --version

First run

Run muse in any project directory to start an interactive session. On first entry Muse Code asks whether to trust the workspace (which loads its skills, rules, and hooks) and prompts you to authenticate with a browser sign-in or an API key. The default model is muse-spark-1.2.

bash
cd /path/to/your/project
muse

Reopen the sign-in options any time from an interactive session with /login. For a non-interactive environment such as CI, set META_API_KEY instead. See authentication and billing for the full sign-in and billing setup flows.

Interactive or headless

The same binary runs two ways:

  • Interactive: muse opens a terminal UI for a back-and-forth session with slash commands, approvals, and live status. See working with the agent.
  • Headless: muse exec "<prompt>" runs one prompt to completion for scripts and CI. See headless and CI.

Platform support

Muse Code runs on macOS, Linux, and Windows from one codebase. A few capabilities work differently on Windows:

  • PowerShell replaces Bash. Agent-run commands use PowerShell syntax and Windows command-line tools.
  • The sandbox may prompt for administrator approval. Windows can show a User Account Control (UAC) prompt the first time the sandbox initializes. Normal use does not require running as administrator.
  • Voice input is unavailable on Windows. See voice input.
  • Session messaging is unavailable on Windows. It is supported on macOS and Linux. See session messaging.

Drive it from your own program

Beyond the CLI, you can drive a Muse Code session from your own program over a stable, versioned session protocol. muse serve runs the protocol, and muse schema prints its JSON schema. The TypeScript SDK wraps the protocol: install it with npm install @muse-code/sdk. A quickstart, cookbook recipes, and a generated API reference are in the Muse Code SDK docs(opens in new tab).

What to read next

Next steps