Skip to content

Commit b75385f

Browse files
authored
Merge pull request #14 from MiniMax-AI-Dev/docs/readme-update
docs: rewrite README + add README_CN
2 parents 16c10d3 + 5def3a7 commit b75385f

2 files changed

Lines changed: 320 additions & 44 deletions

File tree

README.md

Lines changed: 138 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,181 @@
11
# minimax-cli
22

3-
CLI for the [MiniMax AI Platform](https://platform.minimax.io) — generate text, images, video, speech, and music from the terminal. Supports **Global** (`api.minimax.io`) and **CN** (`api.minimaxi.com`) with automatic region detection.
3+
CLI for the [MiniMax AI Platform](https://platform.minimax.io) — generate text, images, video, speech, and music from the terminal.
44

5-
---
6-
7-
### Why minimax-cli?
8-
9-
Zero-config Agent integration — `minimax config export-schema` dumps a standard Anthropic/OpenAI-compatible JSON Tool Schema in one shot. Cursor, Cline, Dify, and any other Agent framework that speaks tool schemas can start using all minimax commands instantly.
10-
11-
Pipeline & CI friendly — all data flows through `stdout`, every piece of UI (spinners, status bars, progress bars) stays on `stderr`. `minimax text chat --message "hi" | jq .` Just Works™ — no stray ANSI codes, no mixed streams.
5+
Supports **Global** (`api.minimax.io`) and **CN** (`api.minimaxi.com`) with automatic region detection.
126

13-
Polished terminal experience — every invocation shows a branded dashboard with live quota balance and a real-color status bar exposing region, key source, and active model. Because how you look matters in the shell.
7+
[中文文档](README_CN.md)
148

159
---
1610

1711
## Install
1812

13+
**Binary (recommended) — macOS / Linux / Windows:**
14+
1915
```bash
20-
curl -fsSL https://raw.githubusercontent.com/MiniMax-AI-Dev/minimax-cli/main/install.sh | sh
16+
curl -fsSL https://raw.githubusercontent.com/MiniMax-AI-Dev/cli/main/install.sh | sh
2117
```
2218

23-
Or via npm / bun:
19+
**npm / bun:**
2420

2521
```bash
2622
npm install -g minimax-cli
2723
```
2824

25+
---
26+
2927
## Quick Start
3028

3129
```bash
3230
minimax auth login --api-key sk-xxxxx
31+
3332
minimax text chat --message "What is MiniMax?"
34-
minimax image generate --prompt "A cat in a spacesuit"
35-
minimax video generate --prompt "Ocean waves at sunset"
33+
minimax image "A cat in a spacesuit"
3634
minimax speech synthesize --text "Hello!" --out hello.mp3
37-
minimax music generate --prompt "Indie folk" --lyrics "La la la..."
38-
minimax vision describe --image photo.jpg
39-
minimax search query --q "MiniMax AI latest news"
35+
minimax search "MiniMax AI latest news"
36+
minimax vision photo.jpg
37+
minimax quota
4038
```
4139

40+
---
41+
4242
## Commands
4343

44-
| Command | Description |
44+
### Text
45+
46+
```bash
47+
minimax text chat --message "Write a poem"
48+
minimax text chat --model MiniMax-M2.7-highspeed --message "Hello" --stream
49+
minimax text chat --system "You are a coding assistant" --message "Fizzbuzz in Go"
50+
minimax text chat --message "user:Hi" --message "assistant:Hey!" --message "How are you?"
51+
cat messages.json | minimax text chat --messages-file - --output json
52+
```
53+
54+
### Image
55+
56+
```bash
57+
minimax image "A cat in a spacesuit" # shorthand
58+
minimax image generate --prompt "A cat" --n 3 --aspect-ratio 16:9
59+
minimax image generate --prompt "Logo" --out-dir ./out/
60+
```
61+
62+
### Video
63+
64+
```bash
65+
minimax video generate --prompt "Ocean waves at sunset" --async
66+
minimax video generate --prompt "A robot painting" --download sunset.mp4
67+
minimax video task get --task-id 123456
68+
minimax video download --file-id 176844028768320 --out video.mp4
69+
```
70+
71+
### Speech
72+
73+
```bash
74+
minimax speech synthesize --text "Hello!" --out hello.mp3
75+
minimax speech synthesize --text "Stream me" --stream | mpv -
76+
minimax speech synthesize --text "Hi" --voice Boyan_new_hailuo --speed 1.2
77+
echo "Breaking news" | minimax speech synthesize --text-file - --out news.mp3
78+
minimax speech voices
79+
```
80+
81+
### Music
82+
83+
```bash
84+
minimax music "Upbeat pop" # shorthand
85+
minimax music generate --prompt "Jazz" --lyrics "La la la" --out song.mp3
86+
```
87+
88+
### Vision
89+
90+
```bash
91+
minimax vision photo.jpg # shorthand
92+
minimax vision describe --image https://example.com/img.jpg --prompt "What breed?"
93+
minimax vision describe --file-id file-123
94+
```
95+
96+
### Search
97+
98+
```bash
99+
minimax search "MiniMax AI" # shorthand
100+
minimax search query --q "latest news" --output json
101+
```
102+
103+
### Quota & Config
104+
105+
```bash
106+
minimax quota
107+
minimax config show
108+
minimax config set --key region --value cn
109+
minimax config export-schema | jq .
110+
```
111+
112+
### Auth
113+
114+
```bash
115+
minimax auth login --api-key sk-xxxxx
116+
minimax auth login # OAuth browser flow
117+
minimax auth status
118+
minimax auth refresh
119+
minimax auth logout
120+
```
121+
122+
### Update
123+
124+
```bash
125+
minimax update
126+
minimax update latest
127+
```
128+
129+
---
130+
131+
## Global Flags
132+
133+
| Flag | Description |
45134
|---|---|
46-
| `text chat` | Chat completion (MiniMax-M2.7) |
47-
| `image generate` | Image generation (image-01) |
48-
| `video generate` | Video generation (Hailuo-2.3) |
49-
| `speech synthesize` | Text-to-speech (speech-2.8-hd) |
50-
| `music generate` | Music generation (music-2.5) |
51-
| `vision describe` | Image understanding (VLM) |
52-
| `search query` | Web search |
53-
| `quota show` | Usage quotas |
54-
| `config show / set` | Configuration |
55-
| `config export-schema` | Export tool schemas as JSON |
56-
| `auth login/status/refresh/logout` | Authentication |
57-
| `update` | Self-update |
135+
| `--api-key <key>` | API key (overrides config) |
136+
| `--region <global\|cn>` | API region |
137+
| `--output <text\|json\|yaml>` | Output format |
138+
| `--quiet` | Data only on stdout, no decorations |
139+
| `--verbose` | Print HTTP request/response |
140+
| `--dry-run` | Show request body, no API call |
141+
| `--async` | Return task ID immediately (video) |
142+
| `--non-interactive` | Disable prompts (CI/agent mode) |
143+
| `--timeout <seconds>` | Request timeout (default: 300) |
144+
| `--no-color` | Disable ANSI colors |
145+
146+
Add `--help` to any command for full options.
58147

59-
Run `minimax <command> --help` for full options.
148+
---
60149

61-
## Agent / CI Usage
150+
## Agent / CI Integration
62151

63-
See [skill/SKILL.md](skill/SKILL.md) for the complete agent integration guide, including all command signatures, tool schema export, and piping patterns.
152+
Export all commands as JSON Tool Schema in one shot:
64153

65154
```bash
66-
minimax video generate --prompt "A robot." --async --quiet # non-blocking
67-
minimax text chat --message "Hi" --output json | jq . # pipe-friendly
68-
minimax config export-schema | jq . # tool schemas
155+
minimax config export-schema | jq .
156+
minimax config export-schema --command "text chat"
69157
```
70158

71-
## Changelog
159+
Compatible with Cursor, Cline, Dify, and any framework that speaks Anthropic/OpenAI tool schemas. See [skill/SKILL.md](skill/SKILL.md) for the full integration guide.
72160

73-
### v0.5.0
74-
- **Brand status bar**: HTTP requests now print a beautiful true-color status bar showing `MINIMAX Region: CN | Key: sk-c...nI7s | Model: MiniMax-M2.7` in MiniMax brand colors (blue, purple, cyan, pink)
75-
- Status bar respects `--quiet` flag and only renders in TTY terminals
76-
- Removed duplicate `[Model: ...]` output from `text chat` command
161+
**Piping:**
77162

78-
### v0.1.0
79-
- Initial release — text, image, video, speech, music, vision, and search commands
163+
```bash
164+
minimax text chat --message "Hello" --output json | jq .content
165+
minimax image "A logo" --quiet | xargs curl -O
166+
minimax video generate --prompt "A robot" --async --quiet
167+
```
168+
169+
stdout is always clean data. stderr carries all UI (status bar, spinners, progress).
170+
171+
---
80172

81173
## Output Philosophy
82174

83-
- `stdout` → data only (text, paths, JSON)
84-
- `stderr` → spinners, warnings, help
175+
- `stdout` → data only (text, URLs, JSON, raw audio bytes)
176+
- `stderr` → status bar, progress, warnings, help
177+
178+
---
85179

86180
## License
87181

0 commit comments

Comments
 (0)