@loongphy/codex-auth 0.2.3 → 0.2.4
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 +23 -4
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -49,6 +49,21 @@ npx @loongphy/codex-auth list
|
|
|
49
49
|
> npm installs already satisfy that requirement.
|
|
50
50
|
> Legacy standalone binary installs need Node.js 18+ on `PATH` when `codex-auth config api enable` is used.
|
|
51
51
|
|
|
52
|
+
## Storage Root
|
|
53
|
+
|
|
54
|
+
`codex-auth` uses the same Codex state root as the current process. Resolution order:
|
|
55
|
+
|
|
56
|
+
1. `CODEX_HOME` when set to a non-empty existing directory
|
|
57
|
+
2. `HOME/.codex`
|
|
58
|
+
3. `USERPROFILE/.codex` on Windows
|
|
59
|
+
|
|
60
|
+
When `CODEX_HOME` is set, `codex-auth` follows Codex and requires that directory to already exist.
|
|
61
|
+
That means you can isolate auth, registry, config, and session files by running:
|
|
62
|
+
|
|
63
|
+
```shell
|
|
64
|
+
CODEX_HOME=/path/to/custom-codex codex-auth list
|
|
65
|
+
```
|
|
66
|
+
|
|
52
67
|
### Uninstall
|
|
53
68
|
|
|
54
69
|
#### npm
|
|
@@ -95,7 +110,7 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
|
|
|
95
110
|
|
|
96
111
|
| Command | Description |
|
|
97
112
|
|---------|-------------|
|
|
98
|
-
| `codex-auth list` | List all accounts |
|
|
113
|
+
| `codex-auth list [--debug]` | List all accounts |
|
|
99
114
|
| `codex-auth login [--device-auth]` | Run `codex login` (optionally with `--device-auth`), then add the current account |
|
|
100
115
|
| `codex-auth switch [<email>]` | Switch active account interactively or by partial match |
|
|
101
116
|
| `codex-auth remove` | Remove accounts with interactive multi-select |
|
|
@@ -113,8 +128,8 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
|
|
|
113
128
|
|
|
114
129
|
| Command | Description |
|
|
115
130
|
|---------|-------------|
|
|
116
|
-
| `codex-auth config auto enable\|disable` | Enable or disable background auto-switching |
|
|
117
|
-
| `codex-auth config auto [--5h <%>] [--weekly <%>]` | Set auto-switch thresholds |
|
|
131
|
+
| `codex-auth config auto enable\|disable` | Enable or disable experimental background auto-switching |
|
|
132
|
+
| `codex-auth config auto [--5h <%>] [--weekly <%>]` | Set experimental auto-switch thresholds |
|
|
118
133
|
| `codex-auth config api enable\|disable` | Enable or disable both usage refresh and team name refresh API calls |
|
|
119
134
|
|
|
120
135
|
---
|
|
@@ -125,6 +140,7 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
|
|
|
125
140
|
|
|
126
141
|
```shell
|
|
127
142
|
codex-auth list
|
|
143
|
+
codex-auth list --debug
|
|
128
144
|
```
|
|
129
145
|
|
|
130
146
|
### Switch Account
|
|
@@ -135,7 +151,7 @@ Interactive: shows email, 5h, weekly, and last activity.
|
|
|
135
151
|
codex-auth switch
|
|
136
152
|
```
|
|
137
153
|
|
|
138
|
-
Before the picker opens, the
|
|
154
|
+
Before the picker opens, `switch` refreshes usage for all stored accounts with a maximum concurrency of `3`, so the picker is based on a fresh cross-account snapshot. If a refresh returns a non-`200` HTTP status such as `401` or `403`, that row shows the status in both usage columns. If a stored account snapshot cannot make a ChatGPT usage request at all because the required auth fields are missing, that row shows `MissingAuth` instead of the previous usage values. No extra usage refresh is attempted after the switch completes.
|
|
139
155
|
|
|
140
156
|

|
|
141
157
|
|
|
@@ -223,6 +239,9 @@ codex-auth status
|
|
|
223
239
|
|
|
224
240
|
#### Auto-Switch
|
|
225
241
|
|
|
242
|
+
> [!WARNING]
|
|
243
|
+
> Auto-switch is experimental. Behavior, defaults, and platform integration may change in future releases while the feature matures.
|
|
244
|
+
|
|
226
245
|
Enable or disable:
|
|
227
246
|
|
|
228
247
|
```shell
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loongphy/codex-auth",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "CLI for switching Codex accounts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@loongphy/codex-auth-linux-x64": "0.2.
|
|
24
|
-
"@loongphy/codex-auth-linux-arm64": "0.2.
|
|
25
|
-
"@loongphy/codex-auth-darwin-x64": "0.2.
|
|
26
|
-
"@loongphy/codex-auth-darwin-arm64": "0.2.
|
|
27
|
-
"@loongphy/codex-auth-win32-x64": "0.2.
|
|
28
|
-
"@loongphy/codex-auth-win32-arm64": "0.2.
|
|
23
|
+
"@loongphy/codex-auth-linux-x64": "0.2.4",
|
|
24
|
+
"@loongphy/codex-auth-linux-arm64": "0.2.4",
|
|
25
|
+
"@loongphy/codex-auth-darwin-x64": "0.2.4",
|
|
26
|
+
"@loongphy/codex-auth-darwin-arm64": "0.2.4",
|
|
27
|
+
"@loongphy/codex-auth-win32-x64": "0.2.4",
|
|
28
|
+
"@loongphy/codex-auth-win32-arm64": "0.2.4"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"check:versions": "node scripts/npm/check-versions.mjs",
|