mmx-cli 1.0.19 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmx-cli",
3
- "version": "1.0.19",
3
+ "version": "1.0.22",
4
4
  "description": "CLI for the MiniMax AI Platform",
5
5
  "type": "module",
6
6
  "repository": {
package/README.md DELETED
@@ -1,209 +0,0 @@
1
- <img src="https://file.cdn.minimax.io/public/MMX.png" alt="MiniMax" width="100%" />
2
-
3
- <p align="center">
4
- <strong>The official CLI for the MiniMax AI Platform</strong><br>
5
- Built for AI agents. Generate text, images, video, speech, and music — from any agent or terminal.
6
- </p>
7
-
8
- <p align="center">
9
- <a href="https://www.npmjs.com/package/mmx-cli"><img src="https://img.shields.io/npm/v/mmx-cli.svg" alt="npm version" /></a>
10
- <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT" /></a>
11
- <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg" alt="Node.js >= 18" /></a>
12
- </p>
13
-
14
- <p align="center">
15
- <a href="README_CN.md">中文文档</a> · <a href="https://platform.minimax.io">Global Platform</a> · <a href="https://platform.minimaxi.com">CN Platform</a> · <a href="https://platform.minimax.io/docs/token-plan/minimax-cli">Example</a>
16
- </p>
17
-
18
- ## Features
19
-
20
- - **Text** — Multi-turn chat, streaming, system prompts, JSON output
21
- - **Image** — Text-to-image with aspect ratio and batch controls
22
- - **Video** — Async video generation with progress tracking
23
- - **Speech** — TTS with 30+ voices, speed control, streaming playback
24
- - **Music** — Text-to-music with lyrics, instrumental mode, auto lyrics, and cover generation from reference audio
25
- - **Vision** — Image understanding and description
26
- - **Search** — Web search powered by MiniMax
27
- - **Dual Region** — Seamless Global (`api.minimax.io`) and CN (`api.minimaxi.com`) support
28
-
29
- <img src="https://file.cdn.minimax.io/public/MMX-CLI.png" alt="MiniMax" width="100%" />
30
-
31
- ## Install
32
-
33
- ```bash
34
- # For AI agents (OpenClaw, Cursor, Claude Code, etc.): add skill to your agent
35
- npx skills add MiniMax-AI/cli -y -g
36
-
37
- # Or install CLI globally for terminal use
38
- npm install -g mmx-cli
39
- ```
40
-
41
- > Requires [Node.js](https://nodejs.org) 18+
42
-
43
- > **Requires a MiniMax Token Plan** — [Global](https://platform.minimax.io/subscribe/token-plan) · [CN](https://platform.minimaxi.com/subscribe/token-plan)
44
-
45
- ## Quick Start
46
-
47
- ```bash
48
- # Authenticate (interactive — choose MiniMax OAuth or paste an API key)
49
- mmx auth login
50
-
51
- # Or non-interactive
52
- mmx auth login --api-key sk-xxxxx
53
-
54
- # Start creating
55
- mmx text chat --message "What is MiniMax?"
56
- mmx image "A cat in a spacesuit"
57
- mmx speech synthesize --text "Hello!" --out hello.mp3
58
- mmx video generate --prompt "Ocean waves at sunset"
59
- mmx music generate --prompt "Upbeat pop" --lyrics "[verse] La da dee, sunny day"
60
- mmx search "MiniMax AI latest news"
61
- mmx vision photo.jpg
62
- mmx quota
63
- ```
64
-
65
- ## Commands
66
-
67
- ### `mmx text`
68
-
69
- ```bash
70
- mmx text chat --message "Write a poem"
71
- mmx text chat --model MiniMax-M3 --message "Hello" --stream
72
- mmx text chat --system "You are a coding assistant" --message "Fizzbuzz in Go"
73
- mmx text chat --message "user:Hi" --message "assistant:Hey!" --message "How are you?"
74
- cat messages.json | mmx text chat --messages-file - --output json
75
- ```
76
-
77
- ### `mmx image`
78
-
79
- ```bash
80
- mmx image "A cat in a spacesuit"
81
- mmx image generate --prompt "A cat" --n 3 --aspect-ratio 16:9
82
- mmx image generate --prompt "Logo" --out-dir ./out/
83
- ```
84
-
85
- ### `mmx video`
86
-
87
- ```bash
88
- # Hailuo-2.3 (Video Generation V1)
89
- mmx video generate --prompt "Ocean waves at sunset" --download sunset.mp4
90
- mmx video generate --prompt "A robot painting" --async
91
-
92
- # MiniMax-H3 (Video Generation V2)
93
- mmx video generate --api-key "$MINIMAX_API_KEY" --model MiniMax-H3 --prompt "Ocean waves at sunset"
94
- mmx video generate --api-key "$MINIMAX_API_KEY" --model MiniMax-H3 --prompt "The subject walks forward" --image start.jpg
95
- mmx video generate --api-key "$MINIMAX_API_KEY" --model MiniMax-H3 --prompt "Keep the same character" --reference-image character.png --reference-video motion.mp4
96
-
97
- mmx video task get --task-id 123456
98
- mmx video task get --task-id 424010985738629 --model MiniMax-H3
99
- mmx video download --file-id 176844028768320 --out video.mp4
100
- ```
101
-
102
- For MiniMax-H3, local files and Base64 data URIs are preflight-checked against the documented limits: image 30 MB, reference video 50 MB, reference audio 15 MB, and total JSON request body 64 MB. The API validates dimensions, aspect ratio, duration, frame rate, and codecs for all media.
103
-
104
- `--region` is an existing global CLI option, not an H3 parameter. Normal video generation does not need it; the CLI uses the saved or automatically detected region. H3 defaults to 2K, 5 seconds, and 16:9 for text-to-video.
105
-
106
- ### `mmx speech`
107
-
108
- ```bash
109
- mmx speech synthesize --text "Hello!" --out hello.mp3
110
- mmx speech synthesize --text "Stream me" --stream | mpv -
111
- mmx speech synthesize --text "Hi" --voice English_magnetic_voiced_man --speed 1.2
112
- echo "Breaking news" | mmx speech synthesize --text-file - --out news.mp3
113
- mmx speech voices
114
- ```
115
-
116
- ### `mmx music`
117
-
118
- ```bash
119
- # Generate with lyrics
120
- mmx music generate --prompt "Upbeat pop" --lyrics "[verse] La da dee, sunny day" --out song.mp3
121
- # Auto-generate lyrics from prompt
122
- mmx music generate --prompt "Indie folk, melancholic, rainy night" --lyrics-optimizer --out song.mp3
123
- # Instrumental (no vocals)
124
- mmx music generate --prompt "Cinematic orchestral" --instrumental --out bgm.mp3
125
- # Cover — generate a cover version from a reference audio file
126
- mmx music cover --prompt "Jazz, piano, warm female vocal" --audio-file original.mp3 --out cover.mp3
127
- mmx music cover --prompt "Indie folk" --audio https://example.com/song.mp3 --out cover.mp3
128
- ```
129
-
130
- ### `mmx vision`
131
-
132
- ```bash
133
- mmx vision photo.jpg
134
- mmx vision describe --image https://example.com/img.jpg --prompt "What breed?"
135
- mmx vision describe --file-id file-123
136
- ```
137
-
138
- ### `mmx search`
139
-
140
- ```bash
141
- mmx search "MiniMax AI"
142
- mmx search query --q "latest news" --output json
143
- ```
144
-
145
- > The `/v1/coding_plan/search` API returns at most 10 results per call and does not currently expose a pagination parameter (see #107). Refine your query if you need different results.
146
-
147
- ### `mmx auth`
148
-
149
- ```bash
150
- mmx auth login # interactive: pick OAuth (Global / China) or paste an API key
151
- mmx auth login --api-key sk-xxxxx # save an API key directly
152
- mmx auth login --recommend # skip the menu, pick OAuth region interactively
153
- mmx auth login --recommend --region=global # OAuth → api.minimax.io
154
- mmx auth login --recommend --region=cn # OAuth → api.minimaxi.com
155
- mmx auth status
156
- mmx auth refresh
157
- mmx auth logout
158
- ```
159
-
160
- `mmx auth status` is the canonical way to verify active authentication.
161
-
162
- **OAuth** uses the [Device Authorization Grant (RFC 8628)](https://tools.ietf.org/html/rfc8628) with PKCE —
163
- the CLI opens your browser, you enter a code, and `access_token` + `refresh_token`
164
- are saved to `~/.mmx/config.json`. Tokens refresh automatically (5-min buffer);
165
- manual refresh via `mmx auth refresh`.
166
-
167
- **API key** auth auto-detects the correct region by probing both Global and CN.
168
- Useful for CI/CD (`mmx auth login --api-key sk-xxxxx`), or pass per-command via `--api-key`.
169
-
170
- OAuth and API key are mutually exclusive — logging in with one clears the other.
171
- Credential priority: `--api-key` flag > OAuth (config) > `api_key` (config).
172
-
173
- ### Environment variables
174
-
175
- | Variable | Description |
176
- |---|---|
177
- | `MINIMAX_REGION` | `global` or `cn`. |
178
- | `MINIMAX_BASE_URL` | Override the API base URL. |
179
- | `MINIMAX_OUTPUT` | `text` or `json`. |
180
- | `MINIMAX_TIMEOUT` | Request timeout in seconds. |
181
- | `MINIMAX_VERBOSE` | `1` to enable verbose HTTP logging. |
182
- | `MMX_CONFIG_DIR` | Directory containing the `config.json` file (default: `~/.mmx`). Set this when `mmx` runs from a subprocess, service, or CI job whose home directory differs from where you logged in. |
183
-
184
- ### `mmx config` · `mmx quota`
185
-
186
- ```bash
187
- mmx quota
188
- mmx config show
189
- mmx config set --key region --value cn
190
- mmx config set --key default-text-model --value MiniMax-M3
191
- mmx config export-schema | jq .
192
- ```
193
-
194
- ### `mmx update`
195
-
196
- ```bash
197
- mmx update
198
- mmx update latest
199
- ```
200
-
201
- ## Thanks to
202
-
203
- <a href="https://github.com/MiniMax-AI/cli/graphs/contributors">
204
- <img src="https://contrib.rocks/image?repo=MiniMax-AI/cli" />
205
- </a>
206
-
207
- ## License
208
-
209
- [MIT](LICENSE)