GUIDE· 6 min read

Muse Code CLI cheat sheet: commands, flags, and shortcuts

Every Muse Code command worth knowing on one page: install and sign-in, slash commands, keyboard shortcuts, muse exec for CI, approval modes and --yolo, models and reasoning effort, skills, MCP, and where the config lives.

#cli#commands#reference#getting-started

Muse Code is a terminal program, and the muse command does almost everything. This page collects the commands, flags, slash commands, and shortcuts from Meta’s documentation as of CLI 1.4.13. Type /help in a session for the full list your version supports, and /keymap for the shortcuts.

Install, sign in, and check your version

Command What it does
curl -fsSL https://dev.meta.ai/install.sh | sh Install on macOS or Linux
irm https://dev.meta.ai/install.ps1 | iex Install on Windows (PowerShell)
muse --version Show the installed version
muse Start a session in the current directory; signs you in on first run
muse auth set Store an API key instead of using the browser
/login Reopen the sign-in options from inside a session
muse logout Clear the stored browser session and key
muse usage Show how much of your plan’s allowance is left
/upgrade Open Accounts Center to change your plan

Muse Code updates itself. Our install guide covers updating, troubleshooting, and uninstalling.

Session slash commands

Command What it does
/help List every command available in this workspace
/new Start a fresh session, keeping terminal scrollback
/clear Start a fresh session and wipe scrollback
/resume Pick an earlier session in this workspace to continue
/resume --last Continue the most recent session
/name [name] Show or set the session name
/fork Branch a new session from the latest stable point
/rewind Branch from an earlier message of yours
/side [prompt] or /btw <prompt> Open a side conversation without derailing the main one
/compact Summarize earlier context to free room
/recap Summarize recent activity
/copy Copy the last response
/export transcript Save the conversation as a .txt file
/export trajectory Save the full session log as JSON

Planning, goals, and agents

Command What it does
/plan Produce a plan and wait for your approval before building
/grill Stress-test the plan until it holds up
/goal <objective> Set a goal the agent works toward; /goal pause, /goal resume, /goal edit, /goal clear manage it
/loop <cadence> <prompt> Repeat a prompt on an interval (10m) or a cron expression
/workflows Open the control room for multi-agent workflow runs
/subagents Show running and finished subagents
/tasks Open the background tasks drawer
/stop Cancel background tasks and terminals

The bundled skills post explains how /plan, /grill, and /goal fit together.

Models and reasoning

Command or flag What it does
/model <model-id> Switch model directly, e.g. /model muse-wonder-1.0
/models Open the model picker
/effort Set reasoning effort for the session
--model <id> Choose the model at launch
--reasoning-effort <level> none, minimal, low, medium, high (default), xhigh, max, or ultra
/settings Settings, including Model → Contributor mode on plans
--contributor-mode on|off Override Contributor mode for one run

Reasoning tokens bill as output, so save max and ultra for hard problems. Setting effort to ultra can also start a multi-agent workflow on its own.

Keyboard shortcuts

Key What it does
Enter while the agent works Steer: add your text to the running turn
Alt+Enter Queue text for the next turn
Esc Interrupt the current turn
Esc on an empty prompt Take back the last queued instruction
Esc Esc when idle Rewind
Ctrl+C Interrupt (empty prompt) or clear the input
Alt+V (Option+V on Mac) Start or stop voice input (not on Windows)

When the agent asks clarifying questions, number keys pick options, Space toggles multi-select, Tab adds a note, and Enter submits.

Running headless: muse exec

Flag What it does
muse exec "<prompt>" Run one task to completion and exit
--json Print JSONL events to stdout
--prompt-file <path> Read the prompt from a file
--max-model-steps <n> Cap how much work the run can do
--session-id <uuid> Continue an earlier session non-interactively
--no-session-log Don’t keep a session log
muse export --session <uuid> --out run.json Export a session

Exit codes: 0 the turn completed, 1 it failed or was cancelled (including hitting the step limit), 2 usage error, 130/143 interrupted. A 0 doesn’t mean the code is right — run your tests. In CI, authenticate with META_API_KEY; our API key guide has an example.

Permissions and the sandbox

Flag What it does
--approval-mode on-request Default: risky shell commands stop for review
--approval-mode untrusted Anything without an allow rule stops for review
--approval-mode never No approval prompts; the sandbox still applies
--approval-judge off Send every approval decision to you, not the built-in judge
--disable-approval Skip approvals, keep the sandbox
--disable-sandbox Keep approvals, drop the sandbox
--yolo No approvals, no sandbox, workspace trusted — disposable containers only
--sandbox-network <mode> proxy-only (default), restricted, or unrestricted
--trust-workspace Trust the folder without the first-run prompt

Sessions start in the Auto-review profile; the others are Ask me, Read-only, and Unrestricted. The docs explain what each one allows.

Skills, MCP, and project setup

Command What it does
muse init Write an AGENTS.md for the project (--dry-run to preview)
muse skills list List installed skills
muse skills install ./my-skill --scope user Install a skill
muse skills import --from claude Import Claude Code skills (--from codex for Codex)
/migrate Import Claude Code or Codex memory and MCP config
/mcp Show connected MCP servers and tools
muse mcp login <server> Sign in to a remote MCP server
muse config status Show which settings are in effect
/theme Switch the terminal theme

Where things live

  • Settings: ~/.config/muse/settings.json — default permission profile, MCP servers, hooks, session retention.
  • Project instructions: AGENTS.md; Muse Code also reads CLAUDE.md, .agents/AGENTS.md, and .claude/CLAUDE.md.
  • Project skills and memory: .agents/skills/ and .agents/memory/ in the repository.
  • Project hooks: .muse/hooks.json, loaded only after you trust the folder.

New to Muse Code? Start with getting started, then keep this page open in a tab.

Keep reading