Last updated:
How to Use Muse Code: From Install to First Task
muse in your project, trust the workspace, sign in, and type a task. Works on macOS, Linux and Windows. Setup takes about 10 minutes. Everything below is summarised from Meta's official Muse Code docs, with a link to the source under each section.- Install the CLI. macOS/Linux: curl -fsSL https://dev.meta.ai/install.sh | sh. Windows (PowerShell): irm https://dev.meta.ai/install.ps1 | iex.
- Check the install. Run muse --version.
- Start a session in your project. Run muse inside your project directory and approve the workspace trust prompt.
- Sign in. Choose browser sign-in, or paste a Meta API key. For scripts and CI, set the META_API_KEY environment variable.
- Give it your first task. Type a task in the composer. Press Enter to steer a running turn, Alt+Enter to queue for the next turn, Esc to cancel.
How to install Muse Code (Mac, Linux, Windows)
macOS and Linux
curl -fsSL https://dev.meta.ai/install.sh | shWindows (PowerShell)
irm https://dev.meta.ai/install.ps1 | iexMuse Code runs natively on Windows; you do not need WSL. Then check the install:
muse --versionOnly install from dev.meta.ai. Third-party "Muse Code download" sites are not official.
Source: Official docs
Sign in: browser or API key
The first time you run muse in a project, it asks you to sign in. There are two ways:
- Browser sign-in: a browser opens, you approve the session, and you return to the terminal.
- API key: paste a Meta API key instead. For scripts and CI, export it:
export META_API_KEY="<your-key>"You can also store a key with muse auth set. The environment variable wins over a stored key, which wins over a browser session. Meta Managed Account (MMA) users must use an API key. Sign out with muse logout.
Source: Official docs
The workspace trust prompt and permissions
On first launch in a folder, Muse Code asks you to trust the workspace. Project instructions (like AGENTS.md) only load in trusted workspaces. After that, two safety layers are on by default:
- Approvals: safe actions run automatically; risky ones (for example a destructive
rm -rf) wait for you. You can allow once, always allow in this workspace, or reject. - Sandbox: shell commands run inside an OS sandbox (Seatbelt on macOS, bubblewrap on Linux, Windows sandbox on Windows), limited to your workspace and temp folders.
.git,.museand.agentsstay read-only.
| Permission profile | What it does |
|---|---|
| Ask me | You review every eligible approval |
| Auto-review (default) | An automated reviewer handles routine decisions and escalates to you |
| Read-only | Reads files only; no writes or side effects |
| Unrestricted | No approvals and no sandbox (same as --yolo) |
Network access defaults to proxy-only (you approve each destination); use --sandbox-network restricted for none. Use --yolo only in an isolated environment.
Source: Official docs
Run your first task
Type a task and press Enter. You don't have to wait for the agent to finish: press Enter to add instructions to the running turn, Alt+Enter to queue them for the next turn, and Esc to cancel the turn. You can paste images into the composer and refer to them as [Image #N]; Alt+V toggles voice dictation (not on Windows).
Source: Official docs
Muse Code commands: cheat sheet
| Command | What it does |
|---|---|
/login | Re-open the sign-in options |
/new, /clear | Start a fresh session |
/resume | Pick up an earlier session |
/fork, /name | Branch or rename a session |
/rewind (or Esc Esc) | Go back to an earlier message and branch from it |
/compact | Summarise earlier context to free up tokens |
/recap | Show a summary of recent activity |
/goal | Set a goal the agent keeps across turns |
/loop | Repeat a prompt on an interval (e.g. 10m) or cron schedule |
/tasks, /subagents | Watch background work and helper agents |
/workflows | Monitor multi-agent workflow runs |
/side | Open a side conversation without touching the main thread |
/models, /effort | Switch model or reasoning effort mid-session |
/export transcript | Save a readable transcript (/export trajectory for full JSON logs) |
/copy | Copy the last response |
/settings | Open settings (e.g. Tools > Workflows) |
Source: Official docs
Project rules: AGENTS.md (and CLAUDE.md)
Create a project instruction file with:
muse init # creates AGENTS.md
muse init --dry-run # preview firstMuse Code looks for AGENTS.md, CLAUDE.md, .agents/AGENTS.md and .claude/CLAUDE.md, from the workspace root up to the nearest .git. So if you already use Claude Code, your existing CLAUDE.md works. User settings live in ~/.config/muse/settings.json.
Source: Official docs
Choose the model and reasoning effort
Switch models mid-session with /models, or at launch with --model. Reasoning effort goes from none to ultra (default high); change it with /effort or --reasoning-effort. Higher effort uses more output tokens, which matters if you pay per token (see Muse Code pricing).
Source: Official docs
Multi-agent: subagents and workflows
A lead agent can hand bounded tasks to subagents, optionally each in its own git worktree so parallel edits don't collide. One agent tree runs up to 8 agents at once by default, configurable up to 64. For bigger jobs (parallel audits, comparing approaches, staged migrations) Muse Code can run a workflow: it orchestrates child agents and returns one combined result. Keep small, tightly coupled edits on the main agent.
Source: Official docs
Undo a wrong turn: rewind
Run /rewind or press Esc twice on an empty composer, pick an earlier message, and Muse Code opens a new branch from there. The original session is kept. Rewind changes conversation history only: it does not revert files in your workspace, so use git for that.
Source: Official docs
Run Muse Code in scripts and CI
muse exec "run the tests and fix any failures" --jsonHeadless mode has no UI. It exits 0 on success, 1 on failure and 2 on usage errors. Cap runs with --max-model-steps, and authenticate with META_API_KEY.
Source: Official docs
Muse Code on Windows: what's different
- Commands run in PowerShell instead of Bash.
- The sandbox may ask for administrator approval the first time.
- Voice input and session messaging are not available on Windows.
Source: Official docs
Using Muse Code in VS Code
The official docs don't list a VS Code extension. Open VS Code's integrated terminal and run muse there. Treat any "Muse Code for VS Code" extension as unofficial.
Limits to know before you start
- Plans cap usage in 5-hour windows (Everyday Usage: 10-50 prompts every 5 hours). When you hit the limit you upgrade or wait for it to refresh.
- The cheap Contributor token tier allows Meta to train on your prompts and completions, and has a lower rate limit.
- Hooks and MCP servers run outside the sandbox and approvals.
Costs and plans are on the Muse Code pricing page. Next, read our Muse Code review or compare Muse Code vs Claude Code.
FAQ
How do I use Muse?
If you mean Muse Code: install the CLI, run muse inside your project folder, trust the workspace, sign in and type a task. If you mean Meta Muse, the consumer chat assistant, that is a different product.
Does Muse Code work on Windows?
Yes, natively. Install it from PowerShell with "irm https://dev.meta.ai/install.ps1 | iex". Commands run through PowerShell instead of Bash, and voice input and session messaging are not available on Windows.
How do I install Muse Code on Mac or Linux?
Run "curl -fsSL https://dev.meta.ai/install.sh | sh" in your terminal, then check it with "muse --version".
Do I need an API key?
No. You can sign in through the browser. An API key (META_API_KEY or muse auth set) is only needed for non-interactive use, or if you have a Meta Managed Account, which cannot use browser sign-in.
Can I use Muse Code in VS Code?
The official docs do not list a VS Code extension. Run muse in VS Code's integrated terminal.
What does the trust-workspace prompt mean?
It asks whether Muse Code may work in this folder. Project instructions such as AGENTS.md are only loaded in trusted workspaces. Only trust folders whose contents you know.
Does Muse Code read my CLAUDE.md?
Yes. It looks for AGENTS.md, CLAUDE.md, .agents/AGENTS.md and .claude/CLAUDE.md, from the workspace root up to the nearest .git folder. Run muse init to create an AGENTS.md.
How do I stop an agent mid-task?
Press Esc to cancel the current turn. Background processes keep running; manage them with /tasks.
Can I run Muse Code in CI?
Yes. Use headless mode: muse exec "<prompt>", with --json for JSONL output. It exits 0 on success, 1 on failure and 2 on usage errors.