Skip to content

Commit 8abfaed

Browse files
author
Raylan LIN
committed
feat: add 'mmx help' command + align all --help with official API docs
- New 'mmx help' command lists all official MiniMax API documentation links - Speech synthesize: model list expanded to 8 models (hd/turbo variants for 2.8/2.6/02/01) - Video generate: description updated with T2V/I2V/S2V model breakdown - Image generate: added image-01-live model - Text chat: model list expanded to all 7 models (M2.7, M2.7-highspeed, M2.5, M2.5-highspeed, M2.1, M2, Text-01) - API doc URLs corrected: speech-t2a-http, image-generation-t2i, text-post
1 parent 8561177 commit 8abfaed

7 files changed

Lines changed: 52 additions & 9 deletions

File tree

src/commands/help.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { defineCommand } from '../command';
2+
import type { Config } from '../config/schema';
3+
import type { GlobalFlags } from '../types/flags';
4+
5+
interface ApiRef {
6+
command: string;
7+
title: string;
8+
url: string;
9+
}
10+
11+
const API_REFS: ApiRef[] = [
12+
{ command: 'mmx text chat', title: 'Text Generation (Chat Completion)', url: 'https://platform.minimax.io/docs/api-reference/text-post' },
13+
{ command: 'mmx speech synthesize', title: 'Speech T2A (Text-to-Audio)', url: 'https://platform.minimax.io/docs/api-reference/speech-t2a-http' },
14+
{ command: 'mmx speech clone', title: 'Voice Clone', url: 'https://platform.minimax.io/docs/api-reference/speech-voice-clone-http' },
15+
{ command: 'mmx speech design', title: 'Voice Design', url: 'https://platform.minimax.io/docs/api-reference/speech-voice-design-http' },
16+
{ command: 'mmx image generate', title: 'Image Generation (T2I / I2I)', url: 'https://platform.minimax.io/docs/api-reference/image-generation-t2i' },
17+
{ command: 'mmx video generate', title: 'Video Generation (T2V / I2V / S2V)', url: 'https://platform.minimax.io/docs/api-reference/video-generation' },
18+
{ command: 'mmx music generate', title: 'Music Generation', url: 'https://platform.minimax.io/docs/api-reference/music-generation' },
19+
{ command: 'mmx music cover', title: 'Music Cover (via Music Generation)', url: 'https://platform.minimax.io/docs/api-reference/music-generation' },
20+
{ command: 'mmx search query', title: 'Web Search', url: 'https://platform.minimax.io/docs/api-reference/web-search' },
21+
{ command: 'mmx vision describe', title: 'Vision (Image Understanding)', url: 'https://platform.minimax.io/docs/api-reference/vision' },
22+
];
23+
24+
export default defineCommand({
25+
name: 'help',
26+
description: 'Show MiniMax API documentation links',
27+
usage: 'mmx help',
28+
apiDocs: 'https://platform.minimax.io/docs/api-reference',
29+
async run(_config: Config, _flags: GlobalFlags) {
30+
process.stdout.write(`
31+
MiniMax API Documentation Links
32+
33+
Official docs: https://platform.minimax.io/docs/api-reference
34+
35+
`);
36+
for (const ref of API_REFS) {
37+
process.stdout.write(` ${ref.command.padEnd(30)} ${ref.title}\n`);
38+
process.stdout.write(` ${' '.repeat(30)} ${ref.url}\n\n`);
39+
}
40+
},
41+
});

src/commands/image/generate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import { promptText, failIfMissing } from '../../utils/prompt';
2020

2121
export default defineCommand({
2222
name: 'image generate',
23-
description: 'Generate images (image-01)',
24-
apiDocs: 'https://platform.minimax.io/docs/api-reference/image-generation',
23+
description: 'Generate images (image-01 / image-01-live)',
24+
apiDocs: 'https://platform.minimax.io/docs/api-reference/image-generation-t2i',
2525
usage: 'mmx image generate --prompt <text> [flags]',
2626
options: [
2727
{ flag: '--prompt <text>', description: 'Image description', required: true },

src/commands/music/cover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { musicCoverModel } from './models';
1414
export default defineCommand({
1515
name: 'music cover',
1616
description: 'Generate a cover version of a song based on reference audio (music-cover / music-cover-free)',
17-
apiDocs: 'https://platform.minimax.io/docs/api-reference/music-cover-generation',
17+
apiDocs: 'https://platform.minimax.io/docs/api-reference/music-generation',
1818
usage: 'mmx music cover --prompt <text> (--audio <url> | --audio-file <path>) [--lyrics <text>] [--out <path>] [flags]',
1919
options: [
2020
{ flag: '--model <model>', description: 'Model: music-cover (Token Plan), music-cover-free (Pay-as-you-go, default). Override only if needed.' },

src/commands/speech/synthesize.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import type { SpeechRequest, SpeechResponse } from '../../types/api';
1313

1414
export default defineCommand({
1515
name: 'speech synthesize',
16-
description: 'Synchronous TTS, up to 10,000 characters (speech-2.8-hd / 2.6 / 02)',
17-
apiDocs: 'https://platform.minimax.io/docs/api-reference/speech-synthesis',
16+
description: 'Synchronous TTS, up to 10,000 characters (speech-2.8 / 2.6 / 02 / 01)',
17+
apiDocs: 'https://platform.minimax.io/docs/api-reference/speech-t2a-http',
1818
usage: 'mmx speech synthesize --text <text> [--out <path>] [flags]',
1919
options: [
20-
{ flag: '--model <model>', description: 'Model ID: speech-2.8-hd (default, highest quality), speech-2.6 (balanced), speech-02 (fastest)' },
20+
{ flag: '--model <model>', description: 'Model ID: speech-2.8-hd (default, highest quality), speech-2.8-turbo, speech-2.6-hd, speech-2.6-turbo, speech-02-hd, speech-02-turbo, speech-01-hd, speech-01-turbo' },
2121
{ flag: '--text <text>', description: 'Text to synthesize. Max 10,000 characters. Supports SSML-like pronunciation tags.' },
2222
{ flag: '--text-file <path>', description: 'Read text from file (use - for stdin). Same 10k char limit applies.' },
2323
{ flag: '--voice <id>', description: 'Voice ID (default: English_expressive_narrator). Run "mmx speech voices" to list available voices.' },

src/commands/text/chat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ function extractText(content: ContentBlock[]): string {
7878
export default defineCommand({
7979
name: 'text chat',
8080
description: 'Send a chat completion (MiniMax Messages API)',
81-
apiDocs: 'https://platform.minimax.io/docs/api-reference/text-generation',
81+
apiDocs: 'https://platform.minimax.io/docs/api-reference/text-post',
8282
usage: 'mmx text chat --message <text> [flags]',
8383
options: [
84-
{ flag: '--model <model>', description: 'Model ID: MiniMax-M2.7 (default, balanced), MiniMax-M2.7-highspeed (faster, lower cost)' },
84+
{ flag: '--model <model>', description: 'Model ID: MiniMax-M2.7 (default), MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed, MiniMax-M2.1, MiniMax-M2, MiniMax-Text-01' },
8585
{ flag: '--message <text>', description: 'Message text (repeatable). Prefix with role: to set role — e.g. "user:Hello", "assistant:Hi!", "system:You are helpful"', required: true, type: 'array' },
8686
{ flag: '--messages-file <path>', description: 'JSON file with messages array (use - for stdin). Format: [{"role": "user", "content": "..."}]' },
8787
{ flag: '--system <text>', description: 'System prompt to set assistant behavior' },

src/commands/video/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { promptText, failIfMissing } from '../../utils/prompt';
2121

2222
export default defineCommand({
2323
name: 'video generate',
24-
description: 'Generate a video (Hailuo-2.3 / 2.3-Fast / Hailuo-02 / S2V-01)',
24+
description: 'Generate a video (T2V: Hailuo-2.3 / 2.3-Fast / Hailuo-02 | I2V: + I2V-01 / I2V-01-Director / I2V-01-live | S2V: S2V-01)',
2525
apiDocs: 'https://platform.minimax.io/docs/api-reference/video-generation',
2626
usage: 'mmx video generate --prompt <text> [flags]',
2727
options: [

src/registry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import configShow from './commands/config/show';
2424
import configSet from './commands/config/set';
2525
import configExportSchema from './commands/config/export-schema';
2626
import update from './commands/update';
27+
import help from './commands/help';
2728

2829
export type { Command, OptionDef } from './command';
2930

@@ -285,4 +286,5 @@ export const registry = new CommandRegistry({
285286
'config set': configSet,
286287
'config export-schema': configExportSchema,
287288
'update': update,
289+
'help': help,
288290
});

0 commit comments

Comments
 (0)