技能 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格式返回答案,包含响应文本和令牌使用信息。

正在使用“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
规范符合性

你能构建什么

内容创作工作流

内容创作者直接从终端脚本生成图像、视频、语音和音乐,无需切换到Web界面或编写API集成代码。

AI原型设计和开发

开发者使用CLI作为原型设计工具,快速测试MiniMax模型输出并将生成功能集成到应用程序中。

自动化媒体制作

团队通过将mmx命令与标准Unix工具(如jq用于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命令。
  • 不要在自动化脚本中以交互模式使用CLI。交互式提示会阻止执行并导致超时。
  • 在生产工作流中不要忽略视频生成的--async标志。同步视频生成可能会阻塞较长时间。

常见问题

如何通过MiniMax API进行身份验证?
使用API密钥运行mmx auth login --api-key。凭证存储在~/.mmx/credentials.json中。您也可以设置MINIMAX_API_KEY环境变量。
支持哪些MiniMax模型?
CLI支持用于文本的MiniMax-M2.8、用于图像的image-01、用于视频的MiniMax-Hailuo-2.0、用于语音的speech-02-hd和用于音乐生成的music-01。
如何在自动化脚本或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