codex-multi-auth 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +106 -106
- package/package.json +2 -2
- package/scripts/codex-multi-auth.js +12 -1
- package/scripts/codex-routing.js +19 -19
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/codex-multi-auth)
|
|
4
4
|
[](https://www.npmjs.com/package/codex-multi-auth)
|
|
5
5
|
|
|
6
|
-
Codex CLI-first multi-account OAuth manager for the official Codex CLI. The
|
|
6
|
+
Codex CLI-first multi-account OAuth manager for the official Codex CLI. The package installs conflict-free alongside official `codex` installs; use `codex-multi-auth ...` for account management or `codex-multi-auth-codex ...` when you explicitly want the forwarding wrapper.
|
|
7
7
|
|
|
8
8
|
<img width="1270" height="729" alt="2026-02-28 12_54_58-prompt txt - Notepads" src="https://github.com/user-attachments/assets/0cecb77e-a6d3-432a-ba48-3577db0c7093" />
|
|
9
9
|
|
|
@@ -15,22 +15,22 @@ Codex CLI-first multi-account OAuth manager for the official Codex CLI. The inst
|
|
|
15
15
|
|
|
16
16
|
## What You Get
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
- Official Codex CLI forwarding for all non-auth commands
|
|
20
|
-
- Multi-account OAuth pool with health-aware selection and automatic failover
|
|
21
|
-
- Project-scoped account storage under `~/.codex/multi-auth/projects/<project-key>/...`
|
|
22
|
-
- Interactive dashboard for account actions and settings
|
|
23
|
-
- Experimental settings tab for staged sync, backup, and refresh-guard controls
|
|
24
|
-
- Forecast, report, fix, and doctor commands for operational safety
|
|
25
|
-
- Local usage ledger, budgets, account policy controls, routing profiles, and monitor views for local governance
|
|
26
|
-
- Runtime counters, budget/cooldown state, and multi-auth probe visibility in `codex
|
|
27
|
-
- Default-on runtime Responses proxy for live account rotation inside forwarded Codex CLI/app sessions
|
|
28
|
-
- Optional loopback-only local bridge for `/health`, `/v1/models`, and `/v1/responses`, protected by hashed local client tokens
|
|
29
|
-
- Reversible packaged Codex app bind and user-level launcher routing helpers
|
|
30
|
-
- Flagged account verification and restore flow
|
|
31
|
-
- Session affinity and live account sync controls
|
|
32
|
-
- Proactive refresh and preemptive quota deferral controls
|
|
33
|
-
- Codex-oriented request/prompt compatibility with strict runtime handling
|
|
18
|
+
- Conflict-free `codex-multi-auth ...` workflow for account login, switching, checks, and diagnostics
|
|
19
|
+
- Official Codex CLI forwarding for all non-auth commands
|
|
20
|
+
- Multi-account OAuth pool with health-aware selection and automatic failover
|
|
21
|
+
- Project-scoped account storage under `~/.codex/multi-auth/projects/<project-key>/...`
|
|
22
|
+
- Interactive dashboard for account actions and settings
|
|
23
|
+
- Experimental settings tab for staged sync, backup, and refresh-guard controls
|
|
24
|
+
- Forecast, report, fix, and doctor commands for operational safety
|
|
25
|
+
- Local usage ledger, budgets, account policy controls, routing profiles, and monitor views for local governance
|
|
26
|
+
- Runtime counters, budget/cooldown state, and multi-auth probe visibility in `codex-multi-auth status` / `codex-multi-auth report`
|
|
27
|
+
- Default-on runtime Responses proxy for live account rotation inside forwarded Codex CLI/app sessions
|
|
28
|
+
- Optional loopback-only local bridge for `/health`, `/v1/models`, and `/v1/responses`, protected by hashed local client tokens
|
|
29
|
+
- Reversible packaged Codex app bind and user-level launcher routing helpers
|
|
30
|
+
- Flagged account verification and restore flow
|
|
31
|
+
- Session affinity and live account sync controls
|
|
32
|
+
- Proactive refresh and preemptive quota deferral controls
|
|
33
|
+
- Codex-oriented request/prompt compatibility with strict runtime handling
|
|
34
34
|
- Stable docs set for install, config, troubleshooting, and upgrade paths
|
|
35
35
|
|
|
36
36
|
---
|
|
@@ -41,7 +41,7 @@ Codex CLI-first multi-account OAuth manager for the official Codex CLI. The inst
|
|
|
41
41
|
> [!CAUTION]
|
|
42
42
|
> This project uses OAuth account credentials and is intended for personal development use.
|
|
43
43
|
>
|
|
44
|
-
> By using this package, you acknowledge:
|
|
44
|
+
> By using this package, you acknowledge:
|
|
45
45
|
> - This is an independent open-source project, not an official OpenAI product
|
|
46
46
|
> - You are responsible for your own usage and policy compliance
|
|
47
47
|
> - For production/commercial workloads, use the OpenAI Platform API
|
|
@@ -70,12 +70,12 @@ npm i -g codex-multi-auth
|
|
|
70
70
|
|
|
71
71
|
### Option C: Verify wiring
|
|
72
72
|
|
|
73
|
-
`codex --version` confirms the official Codex CLI is reachable. `codex-multi-auth --version` confirms the installed
|
|
73
|
+
`codex --version` confirms the official Codex CLI is reachable. `codex-multi-auth --version` confirms the installed manager package version. `codex-multi-auth-codex --version` is the optional forwarding wrapper entrypoint.
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
codex --version
|
|
77
77
|
codex-multi-auth --version
|
|
78
|
-
codex
|
|
78
|
+
codex-multi-auth status
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
Any official install path is fine as long as `codex` is on `PATH`: `npm i -g @openai/codex`, `brew install --cask codex`, or an official release binary.
|
|
@@ -89,15 +89,15 @@ Any official install path is fine as long as `codex` is on `PATH`: `npm i -g @op
|
|
|
89
89
|
|
|
90
90
|
1. Install global package:
|
|
91
91
|
- `npm i -g codex-multi-auth`
|
|
92
|
-
2. Run first login flow with `codex
|
|
93
|
-
3. Validate state with `codex
|
|
94
|
-
4. Confirm routing with `codex
|
|
92
|
+
2. Run first login flow with `codex-multi-auth login`
|
|
93
|
+
3. Validate state with `codex-multi-auth status` and `codex-multi-auth check`
|
|
94
|
+
4. Confirm routing with `codex-multi-auth forecast --live`
|
|
95
95
|
|
|
96
96
|
### Verification
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
codex
|
|
100
|
-
codex
|
|
99
|
+
codex-multi-auth status
|
|
100
|
+
codex-multi-auth check
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
</details>
|
|
@@ -111,33 +111,33 @@ Install and sign in:
|
|
|
111
111
|
```bash
|
|
112
112
|
npm i -g @openai/codex
|
|
113
113
|
npm i -g codex-multi-auth
|
|
114
|
-
codex
|
|
114
|
+
codex-multi-auth login
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
If you already installed the official native CLI via Homebrew or a release binary, you only need:
|
|
118
118
|
|
|
119
119
|
```bash
|
|
120
120
|
npm i -g codex-multi-auth
|
|
121
|
-
codex
|
|
121
|
+
codex-multi-auth login
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
Verify the
|
|
124
|
+
Verify the manager and the new account:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
|
-
codex
|
|
128
|
-
codex
|
|
127
|
+
codex-multi-auth status
|
|
128
|
+
codex-multi-auth check
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
Use these next:
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
|
-
codex
|
|
135
|
-
codex
|
|
136
|
-
codex
|
|
134
|
+
codex-multi-auth list
|
|
135
|
+
codex-multi-auth switch 2
|
|
136
|
+
codex-multi-auth forecast --live
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
-
If browser launch is blocked, use the alternate login paths in [docs/getting-started.md](docs/getting-started.md#alternate-login-paths).
|
|
140
|
-
For remote or headless shells, prefer `codex
|
|
139
|
+
If browser launch is blocked, use the alternate login paths in [docs/getting-started.md](docs/getting-started.md#alternate-login-paths).
|
|
140
|
+
For remote or headless shells, prefer `codex-multi-auth login --device-auth`.
|
|
141
141
|
|
|
142
142
|
---
|
|
143
143
|
|
|
@@ -147,39 +147,39 @@ For remote or headless shells, prefer `codex auth login --device-auth`.
|
|
|
147
147
|
|
|
148
148
|
| Command | What it answers |
|
|
149
149
|
| --- | --- |
|
|
150
|
-
| `codex
|
|
151
|
-
| `codex
|
|
152
|
-
| `codex
|
|
150
|
+
| `codex-multi-auth login` | How do I add or re-open the account menu? |
|
|
151
|
+
| `codex-multi-auth status` | Is the wrapper active right now? |
|
|
152
|
+
| `codex-multi-auth check` | Do my saved accounts look healthy? |
|
|
153
153
|
|
|
154
154
|
### Daily use
|
|
155
155
|
|
|
156
156
|
| Command | What it answers |
|
|
157
157
|
| --- | --- |
|
|
158
|
-
| `codex
|
|
159
|
-
| `codex
|
|
160
|
-
| `codex
|
|
158
|
+
| `codex-multi-auth list` | Which accounts are saved and which one is active? |
|
|
159
|
+
| `codex-multi-auth switch <index>` | How do I move to a different saved account? |
|
|
160
|
+
| `codex-multi-auth forecast --live` | Which account looks best for the next session? |
|
|
161
161
|
|
|
162
162
|
### Repair
|
|
163
163
|
|
|
164
164
|
| Command | What it answers |
|
|
165
165
|
| --- | --- |
|
|
166
|
-
| `codex
|
|
167
|
-
| `codex
|
|
168
|
-
| `codex
|
|
169
|
-
| `codex
|
|
166
|
+
| `codex-multi-auth verify-flagged` | Can any previously flagged account be restored? |
|
|
167
|
+
| `codex-multi-auth verify --paths` | Do my storage path chain and sandbox probes still pass self-test? |
|
|
168
|
+
| `codex-multi-auth fix --dry-run` | What safe storage or account repairs are available? |
|
|
169
|
+
| `codex-multi-auth doctor --fix` | Can the CLI diagnose and apply the safest fixes now? |
|
|
170
170
|
|
|
171
171
|
### Advanced
|
|
172
172
|
|
|
173
173
|
| Command | What it answers |
|
|
174
174
|
| --- | --- |
|
|
175
|
-
| `codex
|
|
176
|
-
| `codex
|
|
177
|
-
| `codex
|
|
178
|
-
| `codex
|
|
179
|
-
| `codex
|
|
180
|
-
| `codex
|
|
181
|
-
| `codex
|
|
182
|
-
| `codex
|
|
175
|
+
| `codex-multi-auth report --live --json` | How do I get the full machine-readable health report? |
|
|
176
|
+
| `codex-multi-auth fix --live --model gpt-5.3-codex` | How do I run live repair probes with a chosen model? |
|
|
177
|
+
| `codex-multi-auth why-selected --json` | Which account does the selector pick now, and why? |
|
|
178
|
+
| `codex-multi-auth usage --since 24h --by project` | What local usage has been recorded recently? |
|
|
179
|
+
| `codex-multi-auth monitor --json` | What is the combined usage, policy, quota, runtime, and project state? |
|
|
180
|
+
| `codex-multi-auth bridge token create --label local-client` | How do I create a local bridge bearer token? |
|
|
181
|
+
| `codex-multi-auth integrations --kind python` | How do I generate local bridge client snippets? |
|
|
182
|
+
| `codex-multi-auth rotation status` | Is live runtime account rotation enabled for forwarded Codex sessions? |
|
|
183
183
|
|
|
184
184
|
### Reliability behavior
|
|
185
185
|
|
|
@@ -187,7 +187,7 @@ For remote or headless shells, prefer `codex auth login --device-auth`.
|
|
|
187
187
|
- active requests use a bounded outbound request budget so one prompt cannot walk the full pool indefinitely
|
|
188
188
|
- repeated cross-account 5xx bursts trigger a short cooldown instead of continuing aggressive rotation
|
|
189
189
|
- proactive refresh is staggered to reduce background refresh bursts
|
|
190
|
-
- `codex
|
|
190
|
+
- `codex-multi-auth status` surfaces recent runtime request metrics in text output, and `codex-multi-auth report --json` exposes the machine-readable cooldown/runtime snapshot
|
|
191
191
|
|
|
192
192
|
---
|
|
193
193
|
|
|
@@ -222,17 +222,17 @@ For remote or headless shells, prefer `codex auth login --device-auth`.
|
|
|
222
222
|
| Settings | `~/.codex/multi-auth/settings.json` |
|
|
223
223
|
| Accounts | `~/.codex/multi-auth/openai-codex-accounts.json` |
|
|
224
224
|
| Flagged accounts | `~/.codex/multi-auth/openai-codex-flagged-accounts.json` |
|
|
225
|
-
| Quota cache | `~/.codex/multi-auth/quota-cache.json` |
|
|
226
|
-
| Runtime observability | `~/.codex/multi-auth/runtime-observability.json` |
|
|
227
|
-
| Usage ledger | `~/.codex/multi-auth/usage/usage-ledger.jsonl` |
|
|
228
|
-
| Account policies | `~/.codex/multi-auth/account-policies.json` |
|
|
229
|
-
| Routing profiles | `~/.codex/multi-auth/routing-profiles.json` |
|
|
230
|
-
| Budget guards | `~/.codex/multi-auth/budget-guards.json` |
|
|
231
|
-
| Local client tokens | `~/.codex/multi-auth/local-client-tokens.json` |
|
|
232
|
-
| Runtime app helper status | `~/.codex/multi-auth/runtime-rotation-app-helper.json` |
|
|
233
|
-
| Persistent app bind state/logs | `~/.codex/multi-auth/app-bind/` |
|
|
234
|
-
| Logs | `~/.codex/multi-auth/logs/codex-plugin/` |
|
|
235
|
-
| Per-project accounts | `~/.codex/multi-auth/projects/<project-key>/openai-codex-accounts.json` |
|
|
225
|
+
| Quota cache | `~/.codex/multi-auth/quota-cache.json` |
|
|
226
|
+
| Runtime observability | `~/.codex/multi-auth/runtime-observability.json` |
|
|
227
|
+
| Usage ledger | `~/.codex/multi-auth/usage/usage-ledger.jsonl` |
|
|
228
|
+
| Account policies | `~/.codex/multi-auth/account-policies.json` |
|
|
229
|
+
| Routing profiles | `~/.codex/multi-auth/routing-profiles.json` |
|
|
230
|
+
| Budget guards | `~/.codex/multi-auth/budget-guards.json` |
|
|
231
|
+
| Local client tokens | `~/.codex/multi-auth/local-client-tokens.json` |
|
|
232
|
+
| Runtime app helper status | `~/.codex/multi-auth/runtime-rotation-app-helper.json` |
|
|
233
|
+
| Persistent app bind state/logs | `~/.codex/multi-auth/app-bind/` |
|
|
234
|
+
| Logs | `~/.codex/multi-auth/logs/codex-plugin/` |
|
|
235
|
+
| Per-project accounts | `~/.codex/multi-auth/projects/<project-key>/openai-codex-accounts.json` |
|
|
236
236
|
|
|
237
237
|
Override root with `CODEX_MULTI_AUTH_DIR=<path>`.
|
|
238
238
|
|
|
@@ -249,16 +249,16 @@ Selected runtime/environment overrides:
|
|
|
249
249
|
| Variable | Effect |
|
|
250
250
|
| --- | --- |
|
|
251
251
|
| `CODEX_MULTI_AUTH_DIR` | Override settings/accounts root |
|
|
252
|
-
| `CODEX_MULTI_AUTH_CONFIG_PATH` | Alternate config file path |
|
|
253
|
-
| `CODEX_MODE=0/1` | Disable/enable Codex mode |
|
|
254
|
-
| `CODEX_MULTI_AUTH_RUNTIME_ROTATION_PROXY=0/1` | Opt out/in of live Responses proxy rotation for forwarded Codex CLI/app sessions |
|
|
255
|
-
| `CODEX_MULTI_AUTH_APP_ROTATION_IDLE_MS=<ms>` | Override automatic Codex app helper idle shutdown |
|
|
256
|
-
| `CODEX_MULTI_AUTH_APP_BIND_INSTALL=0/1` | Opt out/in of packaged Codex app bind self-heal during install/update or rotation enable |
|
|
257
|
-
| `CODEX_MULTI_AUTH_APP_LAUNCHER_INSTALL=0/1` | Opt out/in of routing supported app shortcuts during install/update or rotation enable |
|
|
258
|
-
| `CODEX_MULTI_AUTH_AUTO_UPDATE=0/1` | Opt out/in of best-effort global package auto-update checks |
|
|
259
|
-
| `CODEX_TUI_V2=0/1` | Disable/enable TUI v2 |
|
|
260
|
-
| `CODEX_TUI_COLOR_PROFILE=truecolor
|
|
261
|
-
| `CODEX_TUI_GLYPHS=ascii
|
|
252
|
+
| `CODEX_MULTI_AUTH_CONFIG_PATH` | Alternate config file path |
|
|
253
|
+
| `CODEX_MODE=0/1` | Disable/enable Codex mode |
|
|
254
|
+
| `CODEX_MULTI_AUTH_RUNTIME_ROTATION_PROXY=0/1` | Opt out/in of live Responses proxy rotation for forwarded Codex CLI/app sessions |
|
|
255
|
+
| `CODEX_MULTI_AUTH_APP_ROTATION_IDLE_MS=<ms>` | Override automatic Codex app helper idle shutdown |
|
|
256
|
+
| `CODEX_MULTI_AUTH_APP_BIND_INSTALL=0/1` | Opt out/in of packaged Codex app bind self-heal during install/update or rotation enable |
|
|
257
|
+
| `CODEX_MULTI_AUTH_APP_LAUNCHER_INSTALL=0/1` | Opt out/in of routing supported app shortcuts during install/update or rotation enable |
|
|
258
|
+
| `CODEX_MULTI_AUTH_AUTO_UPDATE=0/1` | Opt out/in of best-effort global package auto-update checks |
|
|
259
|
+
| `CODEX_TUI_V2=0/1` | Disable/enable TUI v2 |
|
|
260
|
+
| `CODEX_TUI_COLOR_PROFILE=truecolor\|ansi256\|ansi16` | TUI color profile |
|
|
261
|
+
| `CODEX_TUI_GLYPHS=ascii\|unicode\|auto` | TUI glyph style |
|
|
262
262
|
| `CODEX_AUTH_BACKGROUND_RESPONSES=0/1` | Opt in/out of stateful Responses `background: true` compatibility |
|
|
263
263
|
| `CODEX_AUTH_FETCH_TIMEOUT_MS=<ms>` | Request timeout override |
|
|
264
264
|
| `CODEX_AUTH_STREAM_STALL_TIMEOUT_MS=<ms>` | Stream stall timeout override |
|
|
@@ -266,14 +266,14 @@ Selected runtime/environment overrides:
|
|
|
266
266
|
Validate config after changes:
|
|
267
267
|
|
|
268
268
|
```bash
|
|
269
|
-
codex
|
|
270
|
-
codex
|
|
271
|
-
codex
|
|
269
|
+
codex-multi-auth status
|
|
270
|
+
codex-multi-auth check
|
|
271
|
+
codex-multi-auth forecast --live
|
|
272
272
|
```
|
|
273
273
|
|
|
274
|
-
Responses background mode stays opt-in. Enable `backgroundResponses` in settings or `CODEX_AUTH_BACKGROUND_RESPONSES=1` only for callers that intentionally send `background: true`, because those requests switch from stateless `store=false` routing to stateful `store=true`. See [docs/upgrade.md](docs/upgrade.md) for rollout guidance.
|
|
275
|
-
|
|
276
|
-
Runtime rotation is enabled by default for request-bearing wrapper-launched Codex sessions. Global install/update self-heals supported packaged Codex app binds and user-level launcher routing when possible, while `codex
|
|
274
|
+
Responses background mode stays opt-in. Enable `backgroundResponses` in settings or `CODEX_AUTH_BACKGROUND_RESPONSES=1` only for callers that intentionally send `background: true`, because those requests switch from stateless `store=false` routing to stateful `store=true`. See [docs/upgrade.md](docs/upgrade.md) for rollout guidance.
|
|
275
|
+
|
|
276
|
+
Runtime rotation is enabled by default for request-bearing wrapper-launched Codex sessions. Global install/update self-heals supported packaged Codex app binds and user-level launcher routing when possible, while `codex-multi-auth rotation enable` remains the explicit repair command. `codex-multi-auth rotation disable` turns the setting off and removes the persistent app bind. Set `CODEX_MULTI_AUTH_RUNTIME_ROTATION_PROXY=0`, `CODEX_MULTI_AUTH_APP_BIND_INSTALL=0`, `CODEX_MULTI_AUTH_APP_LAUNCHER_INSTALL=0`, or `CODEX_MULTI_AUTH_AUTO_UPDATE=0` to opt out of the matching default behavior.
|
|
277
277
|
|
|
278
278
|
---
|
|
279
279
|
|
|
@@ -295,15 +295,15 @@ These flows are intentionally non-destructive by default: sync previews before a
|
|
|
295
295
|
<summary><b>60-second recovery</b></summary>
|
|
296
296
|
|
|
297
297
|
```bash
|
|
298
|
-
codex
|
|
299
|
-
codex
|
|
300
|
-
codex
|
|
298
|
+
codex-multi-auth doctor --fix
|
|
299
|
+
codex-multi-auth check
|
|
300
|
+
codex-multi-auth forecast --live
|
|
301
301
|
```
|
|
302
302
|
|
|
303
303
|
If still broken:
|
|
304
304
|
|
|
305
305
|
```bash
|
|
306
|
-
codex
|
|
306
|
+
codex-multi-auth login
|
|
307
307
|
```
|
|
308
308
|
|
|
309
309
|
</details>
|
|
@@ -312,12 +312,12 @@ codex auth login
|
|
|
312
312
|
<summary><b>Common symptoms</b></summary>
|
|
313
313
|
|
|
314
314
|
- `codex auth` unrecognized: run `where codex` or `which codex`, then follow `docs/troubleshooting.md` for routing fallback commands
|
|
315
|
-
- Switch succeeds but wrong account appears active: run `codex
|
|
316
|
-
- Requests fail fast with a pool cooldown message: wait for the cooldown window or inspect `codex
|
|
317
|
-
- Requests fail fast after repeated upstream 5xx errors: inspect `codex
|
|
318
|
-
- Storage cleanup fails with `EBUSY` / `EPERM` (Windows): run `codex
|
|
319
|
-
- OAuth callback on port `1455` fails: free the port and re-run `codex
|
|
320
|
-
- Browser launch is blocked or you are in a headless shell: prefer `codex
|
|
315
|
+
- Switch succeeds but wrong account appears active: run `codex-multi-auth switch <index>`, then restart session
|
|
316
|
+
- Requests fail fast with a pool cooldown message: wait for the cooldown window or inspect `codex-multi-auth status`
|
|
317
|
+
- Requests fail fast after repeated upstream 5xx errors: inspect `codex-multi-auth report --json` for runtime traffic and cooldown details
|
|
318
|
+
- Storage cleanup fails with `EBUSY` / `EPERM` (Windows): run `codex-multi-auth doctor --fix` to retry, or manually remove `~/.codex/multi-auth/<project-key>/` and re-login
|
|
319
|
+
- OAuth callback on port `1455` fails: free the port and re-run `codex-multi-auth login`
|
|
320
|
+
- Browser launch is blocked or you are in a headless shell: prefer `codex-multi-auth login --device-auth`; use `codex-multi-auth login --manual` or `CODEX_AUTH_NO_BROWSER=1` only when you need the callback-paste fallback
|
|
321
321
|
- `missing field id_token` / `token_expired` / `refresh_token_reused`: re-login affected account
|
|
322
322
|
|
|
323
323
|
</details>
|
|
@@ -326,14 +326,14 @@ codex auth login
|
|
|
326
326
|
<summary><b>Diagnostics pack</b></summary>
|
|
327
327
|
|
|
328
328
|
```bash
|
|
329
|
-
codex
|
|
330
|
-
codex
|
|
331
|
-
codex
|
|
332
|
-
codex
|
|
333
|
-
codex
|
|
334
|
-
codex
|
|
335
|
-
codex
|
|
336
|
-
codex
|
|
329
|
+
codex-multi-auth list
|
|
330
|
+
codex-multi-auth status
|
|
331
|
+
codex-multi-auth check
|
|
332
|
+
codex-multi-auth verify-flagged --json
|
|
333
|
+
codex-multi-auth forecast --live
|
|
334
|
+
codex-multi-auth fix --dry-run
|
|
335
|
+
codex-multi-auth report --live --json
|
|
336
|
+
codex-multi-auth doctor --json
|
|
337
337
|
```
|
|
338
338
|
|
|
339
339
|
</details>
|
|
@@ -357,13 +357,13 @@ codex auth doctor --json
|
|
|
357
357
|
|
|
358
358
|
---
|
|
359
359
|
|
|
360
|
-
## Release Notes
|
|
361
|
-
|
|
362
|
-
- Current stable: [docs/releases/v2.1.
|
|
363
|
-
- Previous stable: [docs/releases/v2.1.
|
|
364
|
-
- Earlier stable: [docs/releases/v2.0.
|
|
365
|
-
- Earlier stable: [docs/releases/v1.3.2.md](docs/releases/v1.3.2.md)
|
|
366
|
-
- Stable archive: [docs/releases/v1.3.1.md](docs/releases/v1.3.1.md)
|
|
360
|
+
## Release Notes
|
|
361
|
+
|
|
362
|
+
- Current stable: [docs/releases/v2.1.2.md](docs/releases/v2.1.2.md)
|
|
363
|
+
- Previous stable: [docs/releases/v2.1.1.md](docs/releases/v2.1.1.md)
|
|
364
|
+
- Earlier stable: [docs/releases/v2.1.0.md](docs/releases/v2.1.0.md)
|
|
365
|
+
- Earlier stable: [docs/releases/v1.3.2.md](docs/releases/v1.3.2.md)
|
|
366
|
+
- Stable archive: [docs/releases/v1.3.1.md](docs/releases/v1.3.1.md)
|
|
367
367
|
- Full release archive: [docs/README.md#release-history](docs/README.md#release-history)
|
|
368
368
|
- Archived prerelease: [docs/releases/v0.1.0-beta.0.md](docs/releases/v0.1.0-beta.0.md)
|
|
369
369
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-multi-auth",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Multi-account OAuth manager and codex auth wrapper for the official @openai/codex CLI, with switching, health checks, and recovery tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"prepare": "husky"
|
|
107
107
|
},
|
|
108
108
|
"bin": {
|
|
109
|
-
"codex": "scripts/codex.js",
|
|
109
|
+
"codex-multi-auth-codex": "scripts/codex.js",
|
|
110
110
|
"codex-multi-auth-app-launcher": "scripts/codex-app-launcher.js",
|
|
111
111
|
"codex-multi-auth": "scripts/codex-multi-auth.js"
|
|
112
112
|
},
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// @ts-check
|
|
4
4
|
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
|
+
import { AUTH_SUBCOMMANDS } from "./codex-routing.js";
|
|
6
7
|
|
|
7
8
|
const versionFlags = new Set(["--version", "-v"]);
|
|
8
9
|
|
|
@@ -20,7 +21,17 @@ function resolveCliVersion() {
|
|
|
20
21
|
return "";
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
function normalizeStandaloneArgs(args) {
|
|
25
|
+
if (args[0] === "auth") return args;
|
|
26
|
+
const firstArg = args[0] ?? "";
|
|
27
|
+
if (AUTH_SUBCOMMANDS.has(firstArg)) {
|
|
28
|
+
// Keep this exhaustive: generic names here are reserved for auth routing.
|
|
29
|
+
return ["auth", ...args];
|
|
30
|
+
}
|
|
31
|
+
return args;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const args = normalizeStandaloneArgs(process.argv.slice(2));
|
|
24
35
|
const version = resolveCliVersion();
|
|
25
36
|
|
|
26
37
|
if (version.length > 0) {
|
package/scripts/codex-routing.js
CHANGED
|
@@ -3,25 +3,25 @@ const AUTH_SUBCOMMANDS = new Set([
|
|
|
3
3
|
"list",
|
|
4
4
|
"status",
|
|
5
5
|
"switch",
|
|
6
|
-
"best",
|
|
7
|
-
"check",
|
|
8
|
-
"features",
|
|
9
|
-
"usage",
|
|
10
|
-
"verify-flagged",
|
|
11
|
-
"verify",
|
|
12
|
-
"forecast",
|
|
13
|
-
"report",
|
|
14
|
-
"fix",
|
|
15
|
-
"doctor",
|
|
16
|
-
"account",
|
|
17
|
-
"budget",
|
|
18
|
-
"bridge",
|
|
19
|
-
"integrations",
|
|
20
|
-
"models",
|
|
21
|
-
"monitor",
|
|
22
|
-
"rotation",
|
|
23
|
-
"why-selected",
|
|
24
|
-
"config",
|
|
6
|
+
"best",
|
|
7
|
+
"check",
|
|
8
|
+
"features",
|
|
9
|
+
"usage",
|
|
10
|
+
"verify-flagged",
|
|
11
|
+
"verify",
|
|
12
|
+
"forecast",
|
|
13
|
+
"report",
|
|
14
|
+
"fix",
|
|
15
|
+
"doctor",
|
|
16
|
+
"account",
|
|
17
|
+
"budget",
|
|
18
|
+
"bridge",
|
|
19
|
+
"integrations",
|
|
20
|
+
"models",
|
|
21
|
+
"monitor",
|
|
22
|
+
"rotation",
|
|
23
|
+
"why-selected",
|
|
24
|
+
"config",
|
|
25
25
|
"init-config",
|
|
26
26
|
"debug",
|
|
27
27
|
]);
|