@loongphy/codex-auth 0.2.2-alpha.4 → 0.2.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 +4 -8
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -98,8 +98,6 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
|
|
|
98
98
|
| `codex-auth remove` | Remove accounts with interactive multi-select |
|
|
99
99
|
| `codex-auth status` | Show auto-switch, service, and usage status |
|
|
100
100
|
|
|
101
|
-
> `codex-auth add` is still accepted as a deprecated alias for `codex-auth login`.
|
|
102
|
-
|
|
103
101
|
### Import
|
|
104
102
|
|
|
105
103
|
| Command | Description |
|
|
@@ -114,7 +112,7 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
|
|
|
114
112
|
|---------|-------------|
|
|
115
113
|
| `codex-auth config auto enable\|disable` | Enable or disable background auto-switching |
|
|
116
114
|
| `codex-auth config auto [--5h <%>] [--weekly <%>]` | Set auto-switch thresholds |
|
|
117
|
-
| `codex-auth config api enable\|disable` |
|
|
115
|
+
| `codex-auth config api enable\|disable` | Enable or disable both usage refresh and team name refresh API calls |
|
|
118
116
|
|
|
119
117
|
---
|
|
120
118
|
|
|
@@ -265,8 +263,6 @@ codex-auth config api disable
|
|
|
265
263
|
|
|
266
264
|
Changing `config api` updates `registry.json` immediately. `api enable` is shown as API mode and `api disable` is shown as local mode.
|
|
267
265
|
|
|
268
|
-
Implementation details are documented in [`docs/auto-switch.md`](docs/auto-switch.md).
|
|
269
|
-
|
|
270
266
|
## Q&A
|
|
271
267
|
|
|
272
268
|
### Why is my usage limit not refreshing?
|
|
@@ -339,8 +335,8 @@ This project is provided as-is and use is at your own risk.
|
|
|
339
335
|
**Usage Data Refresh Source:**
|
|
340
336
|
`codex-auth` supports two sources for refreshing account usage/usage limit information:
|
|
341
337
|
|
|
342
|
-
1. **API (default):** When `config api enable` is on, the tool makes direct HTTPS requests to OpenAI's endpoints using your account's access token. This
|
|
343
|
-
2. **Local-only:** When `config api disable` is on, the tool scans local `~/.codex/sessions/*/rollout-*.jsonl` files
|
|
338
|
+
1. **API (default):** When `config api enable` is on, the tool makes direct HTTPS requests to OpenAI's endpoints using your account's access token. This enables both usage refresh and team name refresh.
|
|
339
|
+
2. **Local-only:** When `config api disable` is on, the tool scans local `~/.codex/sessions/*/rollout-*.jsonl` files for usage data and skips team name refresh API calls. This mode is safer, but it can be less accurate because recent Codex rollout files often contain `rate_limits: null`, so the latest local usage limit data may lag by several hours.
|
|
344
340
|
|
|
345
341
|
**API Call Declaration:**
|
|
346
|
-
By enabling API-
|
|
342
|
+
By enabling API(`codex-auth config api enable`), this tool will send your ChatGPT access token to OpenAI's servers, including `https://chatgpt.com/backend-api/wham/usage` for usage limit and `https://chatgpt.com/backend-api/accounts/check/v4-2023-04-27` for team name. This behavior may be detected by OpenAI and could violate their terms of service, potentially leading to account suspension or other risks. The decision to use this feature and any resulting consequences are entirely yours.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loongphy/codex-auth",
|
|
3
|
-
"version": "0.2.2
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "CLI for switching Codex accounts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@loongphy/codex-auth-linux-x64": "0.2.2
|
|
24
|
-
"@loongphy/codex-auth-darwin-x64": "0.2.2
|
|
25
|
-
"@loongphy/codex-auth-darwin-arm64": "0.2.2
|
|
26
|
-
"@loongphy/codex-auth-win32-x64": "0.2.2
|
|
23
|
+
"@loongphy/codex-auth-linux-x64": "0.2.2",
|
|
24
|
+
"@loongphy/codex-auth-darwin-x64": "0.2.2",
|
|
25
|
+
"@loongphy/codex-auth-darwin-arm64": "0.2.2",
|
|
26
|
+
"@loongphy/codex-auth-win32-x64": "0.2.2"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"check:versions": "node scripts/npm/check-versions.mjs",
|