Skip to content
Merged
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
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,17 @@ mmx auth logout
```

`mmx auth status` is the canonical way to verify active authentication.
Both OAuth and API-key credentials live in `~/.mmx/config.json` (the two are
mutually exclusive — logging in with one method clears the other). API keys
can also be passed per command via `--api-key`. With an API key, the region
is auto-detected by probing both Global and CN.

**OAuth** uses the [Device Authorization Grant (RFC 8628)](https://tools.ietf.org/html/rfc8628) with PKCE —
the CLI opens your browser, you enter a code, and `access_token` + `refresh_token`
are saved to `~/.mmx/config.json`. Tokens refresh automatically (5-min buffer);
manual refresh via `mmx auth refresh`.

**API key** auth auto-detects the correct region by probing both Global and CN.
Useful for CI/CD (`mmx auth login --api-key sk-xxxxx`), or pass per-command via `--api-key`.

OAuth and API key are mutually exclusive — logging in with one clears the other.
Credential priority: `--api-key` flag > OAuth (config) > `api_key` (config).

### `mmx config` · `mmx quota`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mmx-cli",
"version": "1.0.15",
"version": "1.0.16",
"description": "CLI for the MiniMax AI Platform",
"type": "module",
"engines": {
Expand Down
Loading