aq.dev / agents / muse-code

Muse Code: Meta's coding agent CLI, install and usage

Muse Code is Meta's coding agent for the terminal and CI. The command is muse, a native binary that runs on macOS, Linux and Windows. Install it with one line, curl -fsSL https://dev.meta.ai/install.sh | bash on macOS or Linux and irm https://dev.meta.ai/install.ps1 | iex in Windows PowerShell, then run muse inside a project. It needs a Meta Model API account to call the model: either a Muse subscription signed in through the browser, or an API key billed per token.

Install Muse Code on macOS, Linux and Windows

Meta's Muse Code overview documents one installer for macOS and Linux and a PowerShell installer for Windows. Both put a native muse binary on your path.

# macOS or Linux
curl -fsSL https://dev.meta.ai/install.sh | bash

# Windows PowerShell
irm https://dev.meta.ai/install.ps1 | iex

# Confirm it is on your path
muse --version

The installer is a Bash script, and Meta's overview pipes it to bash. The overview does not publish a list of supported CPU architectures.

Checked on November 18, 2026. We ran the Linux installer on an x86_64 Ubuntu machine with HOME pointed at an empty directory. It placed a muse launcher in ~/.local/bin, added that directory to PATH in .bashrc and .profile, and downloaded the binary. muse --version printed Muse Code 1.4.23 (1.4.23-R8977.1). muse --help listed these commands: resume, exec, config, export, trace, model-profile, skills, voice, plugins, sandbox, schema, serve, mxp, attach, acp, session-message, sessions, mcp, auth, login, logout, usage and init. No sign-in or prompt was run.

First run and sign-in

Start muse in a project directory. It asks whether to trust the workspace, then offers two ways to authenticate, per Meta's authentication docs: sign in with your browser, which opens a page to approve the session and returns you to the terminal, or paste a Meta API key. You can reopen those options from an interactive session with /login.

cd /path/to/your/project
muse

# Non-interactive, or to skip the browser flow
export META_API_KEY="<your-key>"

# Or store a key
muse auth set

# Remove the stored browser session and any stored key
muse logout

An API key takes priority over a browser sign-in: Muse Code uses META_API_KEY if set, then a stored key, and only then a stored browser session. muse logout does not unset a META_API_KEY you exported; remove that from your shell separately. Meta Managed Account users who sign up through Business & Enterprise must use an API key, since those accounts cannot use the browser flow.

Windows differences

Meta's overview lists four differences on Windows. Agent-run commands use PowerShell syntax and Windows command-line tools instead of Bash. Windows can show a User Account Control prompt the first time the sandbox initializes; normal use does not require running as administrator. Voice input is unavailable. Session messaging is unavailable on Windows and supported on macOS and Linux.

Where the muse binary lives on Linux

On our November 18 test, ~/.local/bin/muse was a Bash launcher script, and the program itself sat beside it as a versioned file, ~/.local/bin/muse-bin-1.4.23-R8977.1: a statically linked x86-64 executable of about 470 MB. Three small files next to it (.muse-version, .muse-release-info.json and .muse-update-checked-at) record the installed version, its release channel (muse-stable) and the last update check. The installer script reads MUSE_INSTALL_DIR if you want a directory other than ~/.local/bin. Stored sign-in and settings live under ~/.config/muse (or $XDG_CONFIG_HOME/muse).

Update Muse Code to the latest version

Meta's docs do not describe an update command. The launcher the installer writes handles updates itself: each time you start muse, it checks for a new release at most once an hour, downloads it in the background, removes the older muse-bin-* file, and prints Muse Code updated <old> -> <new> on the next run. To update right away, run the install command again; it replaces the launcher and fetches the current release. Setting MUSE_NO_AUTO_UPDATE=1 stops the background checks, which helps when CI should stay on one version. Then confirm with muse --version.

# Update now (macOS or Linux)
curl -fsSL https://dev.meta.ai/install.sh | bash
muse --version

Releases reach the installer before the written notes: on November 18, 2026 it delivered 1.4.23 while the changelog's newest entry was 1.4.18.

Uninstall Muse Code

Meta does not document an uninstall step. On our Linux test machine the install consisted only of the files in ~/.local/bin above and one PATH line in each shell profile, so removing it takes four steps:

# 1. Clear the stored browser session and any stored key (Meta's documented sign-out)
muse logout

# 2. Remove the launcher, the binary and its version files
rm ~/.local/bin/muse ~/.local/bin/muse-bin-* ~/.local/bin/.muse-*

# 3. Delete the line ending in "# added by muse installer" from ~/.bashrc and ~/.profile

# 4. Optional: remove settings and sign-in
rm -rf ~/.config/muse

Also unset any META_API_KEY you exported, since muse logout does not. We did not run a session on the test machine, so check for session data in other folders before assuming nothing is left. We have not tested removal on macOS or Windows.

Plans and usage limits

Meta bills Muse Code two ways, per its subscriptions page. A subscription is a flat monthly rate that works only through the Muse Code CLI while signed in with your Meta Model API account. Pay-as-you-go is billed per token consumed with your Meta Model API key; any additional API keys you create under that account bill this way. The page lists four subscription plans and does not show prices:

  • Everyday Usage. Access to Muse Ember, Muse Spark, Muse Wonder and Muse Image; "Send 10-50 prompts every 5 hours, including image and video uploads"; voice mode; web search.
  • High Usage. Everything in Everyday Usage, 5x more usage, more multimodal inputs.
  • Power Usage. Everything in High Usage, 20x more usage than Everyday Usage, access to Muse Wonder Full (Meta calls it the higher-capability variant of Muse Wonder), early access to new features, higher file uploads.
  • Maximum Usage. Everything in Power Usage, 80x more usage than Everyday Usage.

When you reach a plan's limit, Meta says you can upgrade to the next plan or wait until the limit refreshes; on Maximum Usage you wait. An upgrade takes effect immediately with a prorated charge for the rest of the billing cycle, and a downgrade takes effect at the start of the next cycle. Type /upgrade in a session to open Meta's Accounts Center, where plans are managed. Run muse usage to see your allowance: the current window and weekly use, reset times and tier. Meta says this command does not run a model turn, and version 1.4.13 added warnings near the limit that show the remaining allowance and reset time.

muse usage

For pay-as-you-go, Meta's pricing page lists these standard rates per million tokens as of November 18, 2026:

  • Muse Spark (muse-spark-1.3, muse-spark-1.2 and muse-spark-1.1): $1.25 input, $0.15 cached input, $4.25 output, with no long-context premium.
  • Muse Wonder (muse-wonder-1.0): $4.00 input, $0.20 cached input, $20.00 output, with no long-context premium.
  • Muse Ember (muse-ember-1.0): $0.10 input, $0.004 cached input, $0.50 output for requests up to 200K input tokens; a request above that is billed in full at $0.30, $0.012 and $1.50.

Rate limits apply per team, across all its API keys, and each model has its own: 3,000 requests and 4,000,000 tokens per minute for each standard model listed above. Prices and limits are Meta's to change; check that page before budgeting.

Contributor mode and your code

Muse Code subscriptions default to Contributor mode. In Meta's words, "you get more usage from your plan in exchange for letting Meta use your content to train future Meta models." You can turn it off at any time: type /settings in a session, select the Contributor mode row under Model, and press Enter. Once it is off, your future content is not used for training unless you turn it back on. The setting is saved per computer, so change it on each machine you use. A single run can override it with --contributor-mode on or --contributor-mode off on muse or muse exec, or with MUSE_CONTRIBUTOR_MODE set to 1 or 0; the flag wins if both are set. Headless runs read the same saved setting, and Meta says a computer with no settings file runs muse exec with Contributor mode off, so set the flag on every CI run if the mode matters. On pay-as-you-go the same trade is a separate model id, muse-spark-1.3-contributor or muse-spark-1.2-contributor, at $0.10 per million input, $0.002 per million cached input and $0.20 per million output tokens, with lower limits of 150 requests and 3,000,000 tokens per minute. Meta does not offer Contributor mode for Muse Wonder or Muse Ember on pay-as-you-go.

Running it headless

muse exec runs one prompt to completion for scripts and CI, documented under Headless and CI:

muse exec "Update the changelog for the latest release and run the tests."
muse exec --prompt-file ./task.txt
muse exec --json "Refactor the auth module and run the tests."   # JSONL events on stdout

# In CI, with a key from your secret store
META_API_KEY="$MUSE_KEY" muse exec "Run the test suite and summarize failures."

# Continue an interrupted job without the interactive UI
muse exec --session-id <uuid> "Continue the task."
muse export --session <uuid> --out run.json

The exit code reflects how the run ended: 0 when the turn completes, 1 when it fails or is cancelled (including a --max-model-steps cap), 2 for a usage error, 130 or 143 on SIGINT or SIGTERM. Meta is explicit that it says nothing about whether the work is correct, so gate on your own test command. --disable-approval skips approval prompts and keeps the sandbox on; --yolo turns off approval and the sandbox for a fully unattended run. With the sandbox on, a Linux CI runner needs a working Bubblewrap and a non-musl build, or every sandboxed shell command aborts as an environment failure. Since 1.4.11, muse exec --json prints a run.usage line before each run ends.

For programs that hold a long-lived session with Muse Code, muse serve hosts a session over stdio using Meta's session protocol, and muse schema exports that wire schema as JSON Schema or TypeScript. Meta ships SDKs on both registries: npm install @muse-code/sdk for TypeScript and pip install muse-code-sdk for Python.

How Muse Code works

Muse Code is a coding harness: a model, project context, file and shell tools, approvals and an operating-system sandbox, on from the first run. Meta describes it as built for Muse Spark, with muse-spark-1.2 as the default model; the terminal picker also offers third-party models, which Meta's changelog does not name. Three parts are worth knowing before a long run.

  • Subagents and Git worktrees. A lead session can spawn child agents for bounded tasks. Children share the lead's checkout unless the lead requests worktree isolation for that child, in which case the child gets a Muse-managed Git worktree. If the permission profile, workspace, provider or Git state cannot support isolation, Muse rejects the request and the child never silently lands in the shared checkout. One agent tree runs eight agents at once by default, including the root. The CLI also has a session-level -w / --worktree option that starts the whole session in a new or existing worktree. Our guide to Git worktrees for AI coding agents covers the pattern.
  • Session event log. Every run is recorded as an append-only log of model calls, tool calls and results, and approval decisions. An interrupted or crashed run replays on /resume, rebuilding the conversation and closing the interrupted turn. Resume does not de-duplicate work that was in flight: a side effect interrupted mid-execution is recorded with an unknown outcome, and the agent is told to verify the real state before retrying. /fork branches a new session from the latest stable point; --no-session-log gives up resume, export and reattach.
  • Permissions and the sandbox are separate layers. Approval policy decides what the agent may ask to do; the OS sandbox contains what runs. Since 1.4.13, permission profiles that extend :ask-me enforce filesystem deny rules on macOS and Linux (workspace globs such as **/*.pem, absolute paths, paths under ~/). Linux snapshots paths when each shell command starts, so a file created mid-command under a deny glob is not covered there; macOS enforces globs live. Details are in Meta's permissions documentation.

Recent versions

Meta's changelog publishes version numbers without release dates, so this list has none. Its newest entry is 1.4.18; the installer we ran on November 18, 2026 delivered 1.4.23, so the written notes trail the shipped build.

  • 1.4.18. Reading an image or getting one from an MCP tool no longer breaks a session on a model that cannot view images, agent sessions in editors warn when the session can no longer be saved, and answers in French, Spanish, German and other languages are no longer discarded and rewritten after a short first message.
  • 1.4.17. The agent asks before putting what it built on your PATH, editing shell start-up files or installing a background service; a security fix stops /goal summary text written by the model from changing the terminal title, clearing the screen or moving the cursor; a failed Windows sandbox setup names the step that failed; several Linux sandbox fixes for commands that run at the same time.
  • 1.4.16. muse acp is on by default, so editors that support the Agent Client Protocol (such as Zed) can run Muse as their agent, a surface Meta marks experimental; long sessions ask the model for a shorter reply instead of stopping when the context window is nearly full.
  • 1.4.15. muse sessions --json and --watch list the sessions running on the machine, muse attach joins a running session as a second driver, muse serve --per-session gives each connection its own host, and muse mcp list, get, add, add-json and remove manage MCP servers.
  • 1.4.14. Permission profiles can allow, prompt for or deny Unix-socket access per path, and when the approval judge escalates a command to you, the card shows its reason in one line.
  • 1.4.13. muse usage without a model turn, near-limit warnings with the remaining allowance, enforced filesystem deny rules on macOS and Linux, the same third-party models in desktop and other connected clients as in the terminal picker, a built-in visual-coding skill.
  • 1.4.12. network.local_ports permission rules, muse serve --preset, a browser-game skill; pip install muse-code-sdk also installs its wire-types package.

Sessions and machine uptime

The event log recovers a session after an interruption; it does not keep a sleeping laptop awake. A run that must continue overnight needs a machine that stays on and a terminal session that survives a dropped connection. Our guide to keeping Muse Code running after closing your laptop walks through that setup. To weigh Muse Code against other tools, see the coding harness selection guide and the coding agent harness directory.

Where AQ fits

AQ is the multiplayer coding harness where teams run every agent CLI, Muse Code included, in isolated Git worktrees on private cloud machines of their own, on their own servers, or on a Mac. You connect Muse Code with your own Meta account, and AQ's built-in agent runs on that subscription with no markup. Each task gets its own worktree and branch, the work keeps going on a cloud machine when you close your laptop, and teammates open the same conversation to follow the work and review the diff. The guide to connecting Meta Muse to AQ covers the setup end to end.

Frequently asked questions

Does Muse have a CLI?

Yes. Muse Code is Meta's coding agent for the terminal and CI, and its command is muse. Run it in a project for an interactive session, or use muse exec "<prompt>" for a headless job. Meta documents macOS, Linux and Windows.

How do I install Muse Code on Windows?

Open PowerShell and run irm https://dev.meta.ai/install.ps1 | iex, then muse --version to confirm. On Windows, agent-run commands use PowerShell syntax, the sandbox may show a one-time User Account Control prompt, and voice input and session messaging are unavailable.

Does Muse Code run on Linux?

Yes. Install it with curl -fsSL https://dev.meta.ai/install.sh | bash. On November 18, 2026 that installer placed the launcher and the binary in ~/.local/bin on an x86_64 Ubuntu machine and installed version 1.4.23. Meta does not publish a CPU architecture list, and headless runs with the sandbox on need Bubblewrap and a non-musl build.

How do I check my Muse Code usage?

Run muse usage. It shows your subscription allowance: the current window and weekly use, reset times and tier. Meta says the command does not spend a model turn. Near the limit, Muse Code also shows the remaining allowance and reset time above the message queue.

Is there a free tier for Muse Code?

Meta's docs list four paid subscription plans (Everyday, High, Power and Maximum Usage) and pay-as-you-go billing per token through a Meta Model API key. They do not describe a free tier for Muse Code.

What is Contributor mode?

A setting, on by default for Muse Code subscriptions, that gives you more usage from your plan in exchange for letting Meta use your content to train future Meta models. Turn it off with /settings under Model, on each computer you use, or override one run with --contributor-mode off.

What is the latest Muse Code version?

Meta's changelog lists 1.4.18 as its newest entry and shows no release dates. The Linux installer delivered 1.4.23 on November 18, 2026. Run muse --version to see what you have.

How do I update Muse Code?

The launcher updates itself: when you start muse it checks for a new release at most once an hour and installs it in the background. To update immediately, run the install command again, then check muse --version.

How do I uninstall Muse Code?

Meta does not document an uninstall. On Linux, run muse logout, delete ~/.local/bin/muse, the muse-bin-* file and the .muse-* files beside it, remove the line marked added by muse installer from ~/.bashrc and ~/.profile, and delete ~/.config/muse if you want the settings gone.

Does Muse Code keep running after I close my laptop?

The event log lets an interrupted session resume; it does not keep a sleeping machine working. Run Muse Code on a machine that stays on, inside a terminal session that survives disconnects. Our Muse Code persistence guide covers the setup.