---
title: Muse Code CLI 無頭 exec 與 PilotCut
description: 用 META_API_KEY 對 PilotCut 本機 MCP 跑 muse exec，在 .pcbundle 上做批次清理。核准、沙箱旗標與 Meta 文件中的 MCP 無沙箱警告。僅 BYO。
url: https://www.pilotcut.com/zh-TW/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-TW/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-TW/blog/how-to-use-muse-code-with-pilotcut-mcp)

## [如何用 Muse Code 連接 PilotCut MCP](https://www.pilotcut.com/zh-TW/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-TW/blog/how-to-use-muse-code-with-pilotcut-mcp)

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

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

## [不用 Resolve Studio，也能用 Claude / Codex 的 MCP/CLI 剪影片](https://www.pilotcut.com/zh-TW/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-TW/blog/how-to-use-claude-codex-mcp-cli-video-editing-without-resolve-studio)

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

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

## [如何利用 AI 智慧體剪輯影片](https://www.pilotcut.com/zh-TW/blog/edit-videos-with-ai-agents)

[理解智慧體輔助影片剪輯的實用思維：利用 AI 處理架構與重複性工作，並在最後環節保留人工品味把關。](https://www.pilotcut.com/zh-TW/blog/edit-videos-with-ai-agents)

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