Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/cli-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ mmx
## 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`
1. `--api-key` flag (highest priority)
2. `~/.mmx/credentials.json` (OAuth token — only created by `mmx auth login` without `--api-key`)
3. `fileApiKey` in `~/.mmx/config.json` (persisted API key from a previous `mmx auth login --api-key`)

If none are found, the CLI returns `No credentials found`. The `~/.mmx/credentials.json` file
is **not required** when using API key auth — it is only created during OAuth login.

## Configuration

Expand Down
7 changes: 5 additions & 2 deletions skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ Use `mmx` to generate text, images, video, speech, music, and perform web search
# Install
npm install -g mmx-cli

# Auth (persisted to ~/.mmx/credentials.json)
# Auth — API key (persisted to ~/.mmx/config.json)
mmx auth login --api-key sk-xxxxx

# Or pass per-call
# Auth — OAuth (persisted to ~/.mmx/credentials.json)
mmx auth login

# Or pass per-call (no file needed)
mmx text chat --api-key sk-xxxxx --message "Hello"
```

Expand Down
Loading