# Mmx CLI

Use mmx to generate text, images, video, speech, and music via the MiniMax AI platform.

- Repository: https://github.com/MiniMax-AI/skills (13760 stars)
- Category: Media
- License: MIT
- Last updated: 2026-04-18
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add MiniMax-AI/skills --skill mmx-cli -g -a claude-code -y`
Codex: `npx skills add MiniMax-AI/skills --skill mmx-cli -g -a codex -y`
Cursor: `npx skills add MiniMax-AI/skills --skill mmx-cli -g -a cursor -y`
Gemini CLI: `npx skills add MiniMax-AI/skills --skill mmx-cli -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add MiniMax-AI/skills`

## Description

Use mmx to generate text, images, video, speech, and music via the MiniMax AI platform. Use when the user wants to create media content, chat with MiniMax models, perform web search, or manage MiniMax API resources from the terminal.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# MiniMax CLI, Agent Skill Guide

Use `mmx` to generate text, images, video, speech, music, and perform web search via the MiniMax AI platform.

## Prerequisites

```bash
# Install
npm install -g mmx-cli

# Auth (persisted to ~/.mmx/credentials.json)
mmx auth login --api-key sk-xxxxx

# Or pass per-call
mmx text chat --api-key sk-xxxxx --message "Hello"
```

Region is auto-detected. Override with `--region global` or `--region cn`.

---

## Agent Flags

Always use these flags in non-interactive (agent/CI) contexts:

| Flag | Purpose |
|---|---|
| `--non-interactive` | Fail fast on missing args instead of prompting |
| `--quiet` | Suppress spinners/progress; stdout is pure data |
| `--output json` | Machine-readable JSON output |
| `--async` | Return task ID immediately (video generation) |
| `--dry-run` | Preview the API request without executing |
| `--yes` | Skip confirmation prompts |

---

## Commands

### text chat

Chat completion. Default model: `MiniMax-M2.7`.

```bash
mmx text chat --message <text> [flags]
```

| Flag | Type | Description |
|---|---|---|
| `--message <text>` | string, **required**, repeatable | Message text. Prefix with `role:` to set role (e.g. `"system:You are helpful"`, `"user:Hello"`) |
| `--messages-file <path>` | string | JSON file with messages array. Use `-` for stdin |
| `--system <text>` | string | System prompt |
| `--model <model>` | string | Model ID (default: `MiniMax-M2.7`) |
| `--max-tokens <n>` | number | Max tokens (default: 4096) |
| `--temperature <n>` | number | Sampling temperature (0.0, 1.0] |
| `--top-p <n>` | number | Nucleus sampling threshold |
| `--stream` | boolean | Stream tokens (default: on in TTY) |
| `--tool <json-or-path>` | string, repeatable | Tool definition JSON or file path |

```bash
# Single message
mmx text chat --message "user:What is MiniMax?" --output json --quiet

The rest: https://github.com/MiniMax-AI/skills/blob/HEAD/skills/minimax-multimodal-toolkit/SKILL.md
