Skip to main content
Blog

Muse Code CLI Headless Exec with PilotCut

Run muse exec with META_API_KEY against PilotCut's local MCP for batch cleanup on a .pcbundle. Approvals, sandbox flags, and MCP not-sandboxed warnings from Meta docs. BYO only.

4 min read

Muse Code CLI Headless Exec with PilotCut

The short version

Interactive Muse Code is muse in a project. For scripts and batch cleanup, Meta documents headless runs: muse exec "<prompt>" with META_API_KEY in the environment (auth, headless).

Point that agent at PilotCut's local MCP so batch work mutates a real .pcbundle: 83 purpose-built editing tools, shaped by tens of thousands of hours of video-editing practice, not Muse AI consumer tasks.

Muse Code remains BYO via MCP/CLI. It is not a PilotCut in-app catalog agent. PilotCut's featured agents are Claude Code, ChatGPT Codex, Grok Build, GitHub Copilot, OpenCode, Antigravity.

Tip

Free during beta. Bring the agent you already pay for. 83 purpose-built editing tools, shaped by tens of thousands of hours of video-editing practice. The fastest editor for AI: 83 purpose-built tools, shaped by tens of thousands of hours of video-editing practice, so your agent and you waste less time and money. Try PilotCut.

Install once, then exec

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

Interactive auth once (browser or API key), or always supply the key for automation:

export META_API_KEY="<your-key>"

Per Meta, an environment API key takes priority over a stored browser session (auth).

Wire PilotCut MCP before unattended runs

Declare PilotCut in Muse mcp_servers (stdio or streamable_http) while the PilotCut editor window that owns the .pcbundle is open (MCP).

Warning

MCP tools are not sandboxed (Meta). For headless runs, also read Meta's approval flags: --disable-approval keeps the OS sandbox but skips approval prompts; --yolo disables approval and the sandbox and trusts the workspace. Meta says use --yolo only on trusted code in a disposable, isolated container (headless).

PilotCut's Core Agent chat panel gates on riskTier. Muse Code as a third-party MCP client does not get that gate. Prefer prompts that demand confirm:false plans first on silence/filler tools, then an explicit second step for confirm:true.

Example headless shapes

META_API_KEY="$MUSE_KEY" muse exec \
  "On the open PilotCut .pcbundle, run edit-words cutSilences and removeDeadAir with confirm:false only. Print the plan. Do not apply."
META_API_KEY="$MUSE_KEY" muse exec --json \
  "Apply the reviewed silence plan with confirm:true, then export type=fcpxml to the path I specify."
muse exec --prompt-file ./pilotcut-batch-task.txt

Meta's exit codes reflect how the run ended, not whether the edit is correct (0 turn complete, 1 fail/cancel, 2 usage error). Gate on your own checks after the run (headless).

Optional: --max-model-steps caps a stuck loop. Resume with muse exec --session-id <uuid> "Continue." when you need a follow-up turn.

What batch cleanup is good for

  • Propose breath-safe silence / filler plans across talking-head takes
  • Re-run the same prompt file after human review of the plan
  • Write export type=fcpxml when the next stop is Final Cut

It is not text-to-video. It is not Muse AI. It is a coding agent calling PilotCut tools on local media.

Eligibility and pricing

Meta positions Muse Spark 1.2 with expanded global access in Muse Code / Model API. Verify account eligibility at auth. Check Meta's live pricing pages for dollars. PilotCut stays free during beta with no editor-side credit meter for BYO agent edits.

Facts (checked 2026-09-15)

ItemValue
Headlessmuse exec "..."; CI via META_API_KEY
Approvals--disable-approval vs --yolo (see Meta docs)
MCPNot sandboxed
PilotCutFree during beta; BYO agent; 83 tools; export type=fcpxml
Featured agentsClaude Code, ChatGPT Codex, Grok Build, GitHub Copilot, OpenCode, Antigravity
Muse CodeBYO only, not catalog

Also read

Bottom line

Use muse exec + META_API_KEY for batch propose/apply loops on a .pcbundle, with Meta's sandbox and MCP warnings respected. Muse Code stays BYO outside the featured catalog list. Keep the cut on PilotCut's local timeline.

Try PilotCut. Free during beta. Bring the agent you already pay for.

Related articles