@loongphy/codex-auth 0.2.2 → 0.2.3-alpha.1
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 +3 -34
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ For the best experience, install the Codex CLI even if you mainly use the VS Cod
|
|
|
23
23
|
npm install -g @openai/codex
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
After that, you can use `codex login` or `codex-auth login` to sign in and add accounts more easily.
|
|
26
|
+
After that, you can use `codex login`, `codex login --device-auth`, `codex-auth login`, or `codex-auth login --device-auth` to sign in and add accounts more easily.
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
@@ -93,7 +93,7 @@ Remove-Item "$env:LOCALAPPDATA\codex-auth\bin\codex-auth-auto.exe" -Force -Error
|
|
|
93
93
|
| Command | Description |
|
|
94
94
|
|---------|-------------|
|
|
95
95
|
| `codex-auth list` | List all accounts |
|
|
96
|
-
| `codex-auth login` | Run `codex login
|
|
96
|
+
| `codex-auth login [--device-auth]` | Run `codex login` (optionally with `--device-auth`), then add the current account |
|
|
97
97
|
| `codex-auth switch [<email>]` | Switch active account interactively or by partial match |
|
|
98
98
|
| `codex-auth remove` | Remove accounts with interactive multi-select |
|
|
99
99
|
| `codex-auth status` | Show auto-switch, service, and usage status |
|
|
@@ -158,6 +158,7 @@ Add the currently logged-in Codex account:
|
|
|
158
158
|
|
|
159
159
|
```shell
|
|
160
160
|
codex-auth login
|
|
161
|
+
codex-auth login --device-auth
|
|
161
162
|
```
|
|
162
163
|
|
|
163
164
|
### Import
|
|
@@ -290,38 +291,6 @@ Upgrade notes:
|
|
|
290
291
|
- If you are upgrading from `v0.1.x` to the latest `v0.2.x`, API usage refresh is enabled by default.
|
|
291
292
|
- If you previously used an early `v0.2` prerelease/test build and `status` still shows `usage: local`, run `codex-auth config api enable` once to switch back to API mode.
|
|
292
293
|
|
|
293
|
-
### How to import tokens from cli-proxy-api?
|
|
294
|
-
|
|
295
|
-
If you have token files from `~/.cli-proxy-api/token*.json`, this repository includes a helper script that can convert them into a format codex-auth can read.
|
|
296
|
-
|
|
297
|
-
The CLI can also import the flat cli-proxy-api / CPA JSON files directly:
|
|
298
|
-
|
|
299
|
-
```shell
|
|
300
|
-
codex-auth import --cpa # default source: ~/.cli-proxy-api
|
|
301
|
-
codex-auth import --cpa /path/to/cpa-dir # scans direct child .json files
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Each CPA file is converted in memory to the standard auth snapshot shape before it is written into `~/.codex/accounts/`. Missing or empty `refresh_token` values are skipped as `MissingRefreshToken`.
|
|
305
|
-
|
|
306
|
-
The script is not bundled in the published npm package, so run it from a clone of this repository:
|
|
307
|
-
|
|
308
|
-
```shell
|
|
309
|
-
# Convert: ~/.cli-proxy-api → /tmp/tokens
|
|
310
|
-
python3 scripts/convert_tokens.sh
|
|
311
|
-
|
|
312
|
-
# Or specify custom directories
|
|
313
|
-
python3 scripts/convert_tokens.sh <source_dir> <output_dir>
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
Then import and switch:
|
|
317
|
-
|
|
318
|
-
```shell
|
|
319
|
-
codex-auth import /tmp/tokens/
|
|
320
|
-
# or import the CPA files directly without a conversion step
|
|
321
|
-
codex-auth import --cpa
|
|
322
|
-
codex-auth switch
|
|
323
|
-
```
|
|
324
|
-
|
|
325
294
|
Verify with:
|
|
326
295
|
|
|
327
296
|
```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.3-alpha.1",
|
|
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.
|
|
24
|
-
"@loongphy/codex-auth-darwin-x64": "0.2.
|
|
25
|
-
"@loongphy/codex-auth-darwin-arm64": "0.2.
|
|
26
|
-
"@loongphy/codex-auth-win32-x64": "0.2.
|
|
23
|
+
"@loongphy/codex-auth-linux-x64": "0.2.3-alpha.1",
|
|
24
|
+
"@loongphy/codex-auth-darwin-x64": "0.2.3-alpha.1",
|
|
25
|
+
"@loongphy/codex-auth-darwin-arm64": "0.2.3-alpha.1",
|
|
26
|
+
"@loongphy/codex-auth-win32-x64": "0.2.3-alpha.1"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"check:versions": "node scripts/npm/check-versions.mjs",
|