---
title: Muse Code CLI 无头 exec 与 PilotCut
description: 用 META_API_KEY 对 PilotCut 本地 MCP 跑 muse exec，在 .pcbundle 上做批量清理。审批、沙箱标志与 Meta 文档中的 MCP 无沙箱警告。仅 BYO。
url: https://www.pilotcut.com/zh-CN/blog/muse-code-cli-headless-exec-pilotcut
---

# Muse Code CLI 无头 exec 与 PilotCut

用 META\_API\_KEY 对 PilotCut 本地 MCP 跑 muse exec，在 .pcbundle 上做批量清理。审批、沙箱标志与 Meta 文档中的 MCP 无沙箱警告。仅 BYO。

2026年9月15日 5 min read

## 简短结论

交互式 Muse Code 是在项目里运行 `muse`。对脚本与批量清理，Meta 文档写了 **无头** 运行：环境中带 `META_API_KEY` 的 `muse exec "<prompt>"`（[auth](https://dev.meta.ai/docs/muse-code/auth)，[headless](https://dev.meta.ai/docs/muse-code/extending#headless)）。

把该代理指向 [PilotCut](https://www.pilotcut.com/?utm_source=blog\&utm_medium=cta\&utm_content=muse-code-cli-headless-exec-pilotcut) 的 **本地 MCP**，让批量工作改动真实的 `.pcbundle`：**由数万小时视频剪辑实践塑造的 83 个专用编辑工具**，不是 Muse AI 消费级任务。

Muse Code 仍是 **经 MCP/CLI 的 BYO**。它不是 PilotCut 应用内目录代理。PilotCut 的精选代理是：Claude Code、ChatGPT Codex、Grok Build、GitHub Copilot、OpenCode、Antigravity。

Tip

**测试期免费。带上你已经在付费的代理。** **由数万小时视频剪辑实践塑造的 83 个专用编辑工具。** 面向 AI 的最快编辑器：由数万小时视频剪辑实践塑造的 83 个专用工具，让你的代理和你少浪费时间与金钱。 [试用 PilotCut](https://www.pilotcut.com/?utm_source=blog\&utm_medium=cta\&utm_content=muse-code-cli-headless-exec-pilotcut). 查看 [PilotCut 测试期定价](https://www.pilotcut.com/zh-CN/pricing)。

## 安装一次，然后 exec

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

交互鉴权一次（浏览器或 API key），或自动化时始终提供密钥：

```
export META_API_KEY="<your-key>"
```

按 Meta，环境 API key 优先于已存浏览器会话（[auth](https://dev.meta.ai/docs/muse-code/auth)）。

## 无人值守运行前接入 PilotCut MCP

在拥有 `.pcbundle` 的 PilotCut 编辑器窗口打开时，于 Muse `mcp_servers` 中声明 PilotCut（`stdio` 或 `streamable_http`）（[MCP](https://dev.meta.ai/docs/muse-code/extending#mcp)）。

Warning

**MCP 工具没有沙箱**（Meta）。无头运行时还要读 Meta 的审批标志：`--disable-approval` 保留 OS 沙箱但跳过审批提示；`--yolo` 关闭审批 **以及** 沙箱并信任工作区。Meta 说仅在一次性、隔离容器中的可信代码上使用 `--yolo`（[headless](https://dev.meta.ai/docs/muse-code/extending#headless)）。

PilotCut 的 Core Agent 聊天面板按 `riskTier` 设门。作为第三方 MCP 客户端的 Muse Code **不会**得到该门。优先写要求静音/填充词工具先出 `confirm:false` 计划、再显式第二步 `confirm:true` 的提示。

## 无头形态示例

```
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 的退出码反映 **运行如何结束**，而不是剪辑是否正确（`0` 回合完成，`1` 失败/取消，`2` 用法错误）。运行后用你自己的检查把关（[headless](https://dev.meta.ai/docs/muse-code/extending#headless)）。

可选：`--max-model-steps` 限制卡住的循环。需要后续回合时用 `muse exec --session-id <uuid> "Continue."` 恢复。

## 批量清理适合什么

- 跨口播镜头提议 breath-safe 静音 / 填充词计划
- 人工复核计划后重跑同一提示文件
- 下一站是 Final Cut 时写出 `export type=fcpxml`

它 **不是** 文生视频。它 **不是** Muse AI。它是在本地媒体上调用 PilotCut 工具的编程代理。

## 资格与定价

Meta 将 Muse Spark 1.2 定位为 Muse Code / Model API 中的 **扩大全球访问**。鉴权时核实账号资格。美元查 Meta 实时定价页。PilotCut 测试期保持免费，BYO 代理编辑无编辑器侧积分表。

面向 AI 的最快编辑器：由数万小时视频剪辑实践塑造的 83 个专用工具，让你的代理和你少浪费时间与金钱。

## 事实（核对于 2026-09-15）

| Item            | Value                                                                         |
| --------------- | ----------------------------------------------------------------------------- |
| Headless        | `muse exec "..."`; CI via `META_API_KEY`                                      |
| Approvals       | `--disable-approval` vs `--yolo` (see Meta docs)                              |
| MCP             | Not sandboxed                                                                 |
| PilotCut        | Free during beta; BYO agent; 83 tools; `export type=fcpxml`                   |
| Featured agents | Claude Code, ChatGPT Codex, Grok Build, GitHub Copilot, OpenCode, Antigravity |
| Muse Code       | BYO only, not catalog                                                         |

## 延伸阅读

- [How to use Muse Code with PilotCut MCP](https://www.pilotcut.com/blog/how-to-use-muse-code-with-pilotcut-mcp)
- [How to use Claude Code / ChatGPT Codex MCP/CLI without Resolve Studio](https://www.pilotcut.com/blog/how-to-use-claude-codex-mcp-cli-video-editing-without-resolve-studio)
- [Edit videos with AI agents](https://www.pilotcut.com/blog/edit-videos-with-ai-agents)

## 结语

用 `muse exec` + `META_API_KEY` 在 `.pcbundle` 上做批量提议/应用循环，并尊重 Meta 的沙箱与 MCP 警告。Muse Code 留在精选目录列表之外的 BYO。剪辑留在 PilotCut 本地时间线上。

[试用 PilotCut](https://www.pilotcut.com/?utm_source=blog\&utm_medium=cta\&utm_content=muse-code-cli-headless-exec-pilotcut). 测试期免费。带上你已经在付费的代理。

## Related articles

[2026年9月15日](https://www.pilotcut.com/zh-CN/blog/how-to-use-muse-code-with-pilotcut-mcp)

## [如何用 Muse Code 连接 PilotCut MCP](https://www.pilotcut.com/zh-CN/blog/how-to-use-muse-code-with-pilotcut-mcp)

[把 Meta Muse Code 自带接入 PilotCut 本地 MCP：测试期免费，静音剪切用 confirm 协议，breath-safe 吸附，export type=fcpxml。Muse Code 不是应用内目录代理。](https://www.pilotcut.com/zh-CN/blog/how-to-use-muse-code-with-pilotcut-mcp)

[6 min read](https://www.pilotcut.com/zh-CN/blog/how-to-use-muse-code-with-pilotcut-mcp)

[2026年9月8日](https://www.pilotcut.com/zh-CN/blog/how-to-use-claude-codex-mcp-cli-video-editing-without-resolve-studio)

## [不用 Resolve Studio，也能用 Claude / Codex 的 MCP/CLI 剪视频](https://www.pilotcut.com/zh-CN/blog/how-to-use-claude-codex-mcp-cli-video-editing-without-resolve-studio)

[在搜 Resolve 21.1 的 Claude 或 ChatGPT Codex MCP 配置？先简要看 Studio 路径——再看 PilotCut：终端里 BYO 智能体，本地 Mac 项目上跑 MCP/CLI，测试期免费。](https://www.pilotcut.com/zh-CN/blog/how-to-use-claude-codex-mcp-cli-video-editing-without-resolve-studio)

[7 min read](https://www.pilotcut.com/zh-CN/blog/how-to-use-claude-codex-mcp-cli-video-editing-without-resolve-studio)

[2026年4月29日](https://www.pilotcut.com/zh-CN/blog/edit-videos-with-ai-agents)

## [如何利用 AI 智能体剪辑视频](https://www.pilotcut.com/zh-CN/blog/edit-videos-with-ai-agents)

[理解智能体辅助视频剪辑的实用思路：利用 AI 处理结构与重复性劳动，并在最终环节保留人工审美把关。](https://www.pilotcut.com/zh-CN/blog/edit-videos-with-ai-agents)

[3 min read](https://www.pilotcut.com/zh-CN/blog/edit-videos-with-ai-agents)
