Files
minimax-ai__cli/docs/cli-design.md
yuanhe bf9bee5e53 refactor: rename CLI command from minimax to mmx
Follow industry convention (gh, az, hf) where platform API CLIs use
abbreviated company names, distinguishing from AI agent CLIs that use
full product names (claude, gemini, copilot).

Changes:
- npm package: minimax-cli → mmx-cli
- binary/command: minimax → mmx
- config directory: ~/.minimax → ~/.mmx
- User-Agent: mmx-cli/<version>
- All help text, usage strings, examples, and docs updated
- ASCII banner updated to MMX
- Build output: dist/mmx.mjs
- OAuth client ID: mmx-cli

Unchanged (company/API references):
- API URLs (api.minimax.io, api.minimaxi.com)
- Environment variables (MINIMAX_API_KEY, MINIMAX_REGION, etc.)
- GitHub repo path (MiniMax-AI-Dev/minimax-cli)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 07:41:28 -07:00

1.9 KiB

mmx CLI Design

Command Grammar

All commands follow resource + verb:

mmx <resource> <verb> [flags]

Command Tree

mmx
├── auth
│   ├── login              Authenticate via OAuth or API key
│   ├── status             Show current authentication state
│   ├── refresh            Manually refresh OAuth token
│   └── logout             Revoke tokens and clear stored credentials
├── text
│   └── chat               Send a chat completion (M2.7 / M2.7-highspeed)
├── speech
│   └── synthesize         Synchronous TTS, ≤10k chars
├── image
│   └── generate           Generate images (image-01)
├── video
│   ├── generate           Create a video generation task
│   ├── task
│   │   └── get            Query video task status
│   └── download           Download a completed video by file ID
├── music
│   └── generate           Generate a song (music-2.5)
├── quota
│   └── show               Display Token Plan usage and remaining quotas
└── config
    ├── show               Display current configuration
    └── set                Set a config value

Exit Codes

Code Meaning
0 Success
1 General / server error
2 Usage error (bad flags)
3 Authentication error
4 Rate limit or quota exceeded
5 Timeout
10 Content sensitivity filter

Authentication

Credential resolution order:

  1. --api-key flag
  2. $MINIMAX_API_KEY env var
  3. ~/.mmx/credentials.json (OAuth)
  4. api_key in ~/.mmx/config.yaml

Configuration

Config precedence: flag > env var > config file > default.

Config file: ~/.mmx/config.yaml