mmx-cli
從終端機產生 AI 媒體內容
直接從終端機使用 MiniMax AI 平台建立文字、圖片、影片、語音和音樂。透過簡單的命令列指令滿足所有 AI 生成需求,無需進行複雜的 API 整合。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「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。
安全審計
低風險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.
低風險問題 (3)
風險因素
品質評分
你能建構什麼
內容創作工作流程
內容創作者可直接從終端機腳本生成圖片、影片、語音和音樂,無需切換至網頁介面或編寫 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 旗標。同步影片生成可能會阻塞很長時間。