mirror of
https://github.com/MiniMax-AI/cli.git
synced 2026-09-18 08:48:06 +08:00
bf9bee5e53
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>
1.9 KiB
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:
--api-keyflag$MINIMAX_API_KEYenv var~/.mmx/credentials.json(OAuth)api_keyin~/.mmx/config.yaml
Configuration
Config precedence: flag > env var > config file > default.
Config file: ~/.mmx/config.yaml