Skip to content

Commit 33116b9

Browse files
kapelamekapelame
authored andcommitted
docs(readme): describe new login flow (OAuth menu + --recommend + auto region)
- Quick Start prefers interactive 'mmx auth login' (with --api-key as the non-interactive variant) - Auth section documents the 3-option menu, --recommend / --recommend --region=global|cn, and the api_key XOR oauth invariant in config.json - Mention API-key auto-region detection - Drop the now-stale reference to ~/.mmx/credentials.json
1 parent d0170c3 commit 33116b9

2 files changed

Lines changed: 26 additions & 11 deletions

File tree

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ npm install -g mmx-cli
4545
## Quick Start
4646

4747
```bash
48-
# Authenticate
48+
# Authenticate (interactive — choose MiniMax OAuth or paste an API key)
49+
mmx auth login
50+
51+
# Or non-interactive
4952
mmx auth login --api-key sk-xxxxx
5053

5154
# Start creating
@@ -130,16 +133,21 @@ mmx search query --q "latest news" --output json
130133
### `mmx auth`
131134

132135
```bash
133-
mmx auth login --api-key sk-xxxxx
134-
mmx auth login # OAuth browser flow
136+
mmx auth login # interactive: pick OAuth (Global / China) or paste an API key
137+
mmx auth login --api-key sk-xxxxx # save an API key directly
138+
mmx auth login --recommend # skip the menu, pick OAuth region interactively
139+
mmx auth login --recommend --region=global # OAuth → api.minimax.io
140+
mmx auth login --recommend --region=cn # OAuth → api.minimaxi.com
135141
mmx auth status
136142
mmx auth refresh
137143
mmx auth logout
138144
```
139145

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

144152
### `mmx config` · `mmx quota`
145153

README_CN.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ npm install -g mmx-cli
4545
## 快速开始
4646

4747
```bash
48-
# 认证
48+
# 认证(交互式 — 选 MiniMax OAuth 或粘 API Key)
49+
mmx auth login
50+
51+
# 或者非交互
4952
mmx auth login --api-key sk-xxxxx
5053

5154
# 开始创作
@@ -130,16 +133,20 @@ mmx search query --q "最新动态" --output json
130133
### `mmx auth`
131134

132135
```bash
133-
mmx auth login --api-key sk-xxxxx
134-
mmx auth login # OAuth 浏览器授权
136+
mmx auth login # 交互式:选 OAuth (Global / 中国) 或粘 API Key
137+
mmx auth login --api-key sk-xxxxx # 直接保存 API Key
138+
mmx auth login --recommend # 跳过 3 选 1 菜单,弹出 region 选择器
139+
mmx auth login --recommend --region=global # 直接 OAuth → api.minimax.io
140+
mmx auth login --recommend --region=cn # 直接 OAuth → api.minimaxi.com
135141
mmx auth status
136142
mmx auth refresh
137143
mmx auth logout
138144
```
139145

140-
请使用 `mmx auth status` 作为认证状态的权威检查方式。`~/.mmx/credentials.json`
141-
只在 OAuth 登录时存在;API Key 登录会写入 `~/.mmx/config.json`(也可每次通过
142-
`--api-key` 直接传入)。
146+
请使用 `mmx auth status` 作为认证状态的权威检查方式。OAuth 与 API Key 凭据
147+
都保存在 `~/.mmx/config.json` 里,**两者互斥** —— 用一种登录会清掉另一种。
148+
也可以每次通过 `--api-key` 直接传入。使用 API Key 登录时,会自动同时探测
149+
Global 与中国两个 region,选用能通过的那个。
143150

144151
### `mmx config` · `mmx quota`
145152

0 commit comments

Comments
 (0)