File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
4952mmx 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
135141mmx auth status
136142mmx auth refresh
137143mmx 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
Original file line number Diff line number Diff 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+ # 或者非交互
4952mmx 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
135141mmx auth status
136142mmx auth refresh
137143mmx 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
You can’t perform that action at this time.
0 commit comments