技能 mmx-cli
📦

mmx-cli

低風險 ⚙️ 外部命令📁 檔案系統存取🔑 環境變數

從終端機產生 AI 媒體內容

直接從終端機使用 MiniMax AI 平台建立文字、圖片、影片、語音和音樂。透過簡單的命令列指令滿足所有 AI 生成需求,無需進行複雜的 API 整合。

支援: Claude Codex Code(CC)
📊 71 充足
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「mmx-cli」。 mmx text chat --message "user:What is the capital of France?" --output json --quiet

預期結果:

AI 以 JSON 格式回應答案,包含回應文字和 token 使用量資訊。

正在使用「mmx-cli」。 mmx image generate --prompt "A cat in a spacesuit" --output json --quiet

預期結果:

命令回傳一個或多個指向已生成圖片的 URL。在安靜模式下,URL 會每行一個輸出至 stdout。

正在使用「mmx-cli」。 mmx speech synthesize --text "Hello world" --out hello.mp3 --quiet

預期結果:

命令在指定路徑建立 MP3 音訊檔案。完成後會將檔案路徑輸出至 stdout。

安全審計

低風險
v1 • 4/16/2026

The static analyzer reported 202 potential issues, all of which are false positives. SKILL.md is a markdown documentation file for the mmx CLI tool. The scanner misidentified markdown code block backticks as Ruby/shell backtick execution, model version strings as weak cryptographic algorithms, and CLI command examples as system reconnaissance. The skill instructs an AI agent to run the mmx CLI with user-provided parameters, which involves legitimate external command execution, filesystem access for credentials (~/.mmx/), and environment variable usage for API keys. No malicious intent, prompt injection attempts, or data exfiltration patterns were found.

1
已掃描檔案
360
分析行數
6
發現項
1
審計總數
低風險問題 (3)
External Command Execution via CLI
The skill instructs the AI agent to execute the mmx CLI tool with user-provided parameters. This is the core functionality of the skill and is expected behavior for a CLI helper. Arguments are constructed from user input but passed through the CLI tool interface, not directly to a shell.
Credential File Storage
The CLI stores API credentials in ~/.mmx/credentials.json. This is a standard pattern for CLI tools but represents filesystem access with sensitive data.
Environment Variable API Key Access
The skill documents using MINIMAX_API_KEY environment variable for authentication. Standard pattern for API-based CLI tools.

風險因素

⚙️ 外部命令 (1)
📁 檔案系統存取 (2)
🔑 環境變數 (1)
審計者: claude

品質評分

38
架構
100
可維護性
87
內容
50
社群
84
安全
91
規範符合性

你能建構什麼

內容創作工作流程

內容創作者可直接從終端機腳本生成圖片、影片、語音和音樂,無需切換至網頁介面或編寫 API 整合程式碼。

AI 原型開發

開發人員可快速測試 MiniMax 模型輸出,並將 CLI 作為原型設計工具,將生成功能整合至應用程式中。

自動化媒體製作

團隊可將 mmx 命令與 jq 等標準 Unix 工具串接,自動化媒體生成管線以處理 JSON。

試試這些提示

生成簡單圖片
Generate an image of a cat sitting on a cloud at sunset. Save it to the current directory.
多輪文字對話
Start a conversation with MiniMax using a system prompt that sets it as a Python tutor. Then ask it to explain list comprehensions with examples.
非同步影片生成工作流程
Generate a short video of ocean waves. Use async mode so I can continue working. Show me the task ID, then check its status and download when complete.
串接圖片生成與視覺分析
Generate an image of a sunset. Then use vision describe to analyze the generated image and describe what it contains. Pipe the results through jq to extract only the description text.

最佳實務

  • 在自動化或 CI 環境中,務必使用 --non-interactive 和 --quiet 旗標,以防止意外的提示訊息和進度輸出。
  • 當將命令輸出管線傳輸至其他工具或腳本時,使用 --output json 以取得機器可讀取的結果。
  • 將 MINIMAX_API_KEY 設定為環境變數,而非在每個命令中透過旗標傳遞,以避免憑證外洩至 shell 歷史記錄中。

避免

  • 不要在共用或記錄的環境中直接透過命令旗標傳遞 API 金鑰。請改用環境變數或 mmx auth login 命令。
  • 不要在自動化腳本中使用互動模式。互動提示會阻擋執行並導致逾時。
  • 不要在生產環境工作流程中忽略影片生成的 --async 旗標。同步影片生成可能會阻塞很長時間。

常見問題

如何向 MiniMax API 進行驗證?
使用 mmx auth login --api-key 並帶入你的 API 金鑰。憑證會儲存在 ~/.mmx/credentials.json。你也可以設定 MINIMAX_API_KEY 環境變數。
支援哪些 MiniMax 模型?
CLI 支援 MiniMax-M2.7(文字)、image-01(圖片)、MiniMax-Hailuo-2.3(影片)、speech-2.8-hd(語音)和 music-2.5(音樂生成)。
如何在自動化腳本或 CI 管線中使用 mmx?
使用 --non-interactive 旗標在缺少參數時快速失敗,使用 --quiet 抑制進度輸出,並使用 --output json 取得機器可讀取的結果。
我可以將一個 mmx 命令的輸出管線傳輸至另一個命令嗎?
可以。stdout 會輸出乾淨的資料以供管線傳輸。例如,將圖片生成輸出管線傳輸至 vision describe,或使用命令替換來擷取任務 ID。
非同步影片生成如何運作?
使用 --async 啟動任務並接收任務 ID。使用 mmx video task get 輪詢任務狀態,完成後使用 mmx video download 下載結果。
CLI 支援哪些區域?
CLI 會自動偵測你的區域。你可以使用 --region global 或 --region cn 進行覆寫。若要持久設定,請使用 mmx config set --key region。

開發者詳情

檔案結構

📄 SKILL.md