@tryarcanist/cli 0.1.210 → 0.1.212
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 -3
- package/dist/index.js +15 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ JSON mode prints the raw `/api/auth/whoami` API response. Fields currently inclu
|
|
|
140
140
|
|
|
141
141
|
### `arcanist codex login`
|
|
142
142
|
|
|
143
|
-
Authenticates a Codex/ChatGPT subscription and stores it for your Codex sessions, then activates it (turns on "use subscription auth for OpenAI sessions"). Runs the Codex CLI device-authorization login locally under a temporary `CODEX_HOME`, then uploads the resulting `auth.json` to Arcanist (encrypted, per user). The credential is never written to your default `~/.codex`. Requires a write-scoped token
|
|
143
|
+
Authenticates a Codex/ChatGPT subscription and stores it for your Codex sessions, then activates it (turns on "use subscription auth for OpenAI sessions"). Runs the Codex CLI device-authorization login locally under a temporary `CODEX_HOME`, then uploads the resulting `auth.json` to Arcanist (encrypted, per user). The credential is never written to your default `~/.codex`. Requires a write-scoped token. If activation fails the credential is still saved; run `arcanist codex use on`.
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
146
|
arcanist codex login
|
|
@@ -160,14 +160,15 @@ arcanist codex use off
|
|
|
160
160
|
|
|
161
161
|
### `arcanist codex status`
|
|
162
162
|
|
|
163
|
-
Shows
|
|
163
|
+
Shows that Codex subscription auth is available and whether an `auth.json` is currently saved.
|
|
164
164
|
|
|
165
165
|
```bash
|
|
166
166
|
arcanist codex status
|
|
167
167
|
arcanist codex status --json
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
JSON mode returns `{eligible, credential: {isSet, lastValidationStatus?, lastValidationReasonCode?}}
|
|
170
|
+
JSON mode returns `{eligible, credential: {isSet, lastValidationStatus?, lastValidationReasonCode?}}`; `eligible` is always
|
|
171
|
+
`true` and remains for compatibility with older clients.
|
|
171
172
|
|
|
172
173
|
### `arcanist codex logout`
|
|
173
174
|
|
package/dist/index.js
CHANGED
|
@@ -1934,6 +1934,14 @@ import { join as join3 } from "path";
|
|
|
1934
1934
|
var CODEX_SUBSCRIPTION_PATH = "/api/settings/codex-subscription";
|
|
1935
1935
|
var CODEX_SUBSCRIPTION_AUTH_JSON_PATH = "/api/settings/codex-subscription/auth-json";
|
|
1936
1936
|
var CODEX_SUBSCRIPTION_ENABLED_PATH = "/api/settings/codex-subscription/enabled";
|
|
1937
|
+
function describeCredentialStatus(credential) {
|
|
1938
|
+
if (!credential.isSet) return null;
|
|
1939
|
+
if (credential.lastValidationStatus === "invalid") {
|
|
1940
|
+
return "Expired. Run `arcanist codex login` to reconnect, or `arcanist codex use off` to fall back to your OpenAI key.";
|
|
1941
|
+
}
|
|
1942
|
+
if (credential.lastValidationStatus === "validated") return "Verified with OpenAI.";
|
|
1943
|
+
return "Saved, but not verified with OpenAI yet.";
|
|
1944
|
+
}
|
|
1937
1945
|
function resolveCodexPath(optionPath) {
|
|
1938
1946
|
return optionPath?.trim() || process.env.ARCANIST_CODEX_BIN?.trim() || "codex";
|
|
1939
1947
|
}
|
|
@@ -2017,7 +2025,8 @@ async function codexLoginCommand(options, command) {
|
|
|
2017
2025
|
console.log(
|
|
2018
2026
|
activated ? "Codex subscription auth saved and activated for OpenAI sessions." : "Codex subscription auth saved."
|
|
2019
2027
|
);
|
|
2020
|
-
|
|
2028
|
+
const status = describeCredentialStatus(payload);
|
|
2029
|
+
if (status) console.log(`Status: ${status}`);
|
|
2021
2030
|
if (!activated) {
|
|
2022
2031
|
console.log(`Could not activate it automatically${activationError ? ` (${activationError})` : ""}.`);
|
|
2023
2032
|
console.log("Run `arcanist codex use on` to start using it.");
|
|
@@ -2057,7 +2066,8 @@ async function codexStatusCommand(options, command) {
|
|
|
2057
2066
|
emit(command, options, payload, (state) => {
|
|
2058
2067
|
console.log(`Eligible: ${state.eligible ? "yes" : "no"}`);
|
|
2059
2068
|
console.log(`Auth.json saved: ${state.credential.isSet ? "yes" : "no"}`);
|
|
2060
|
-
|
|
2069
|
+
const status = describeCredentialStatus(state.credential);
|
|
2070
|
+
if (status) console.log(`Status: ${status}`);
|
|
2061
2071
|
});
|
|
2062
2072
|
}
|
|
2063
2073
|
async function codexLogoutCommand(options, command) {
|
|
@@ -6234,8 +6244,8 @@ codex.command("login").description("Authenticate a Codex/ChatGPT subscription an
|
|
|
6234
6244
|
"after",
|
|
6235
6245
|
`
|
|
6236
6246
|
Runs the Codex CLI device-authorization login locally under a temporary CODEX_HOME, then uploads
|
|
6237
|
-
the resulting auth.json to Arcanist (encrypted, per user) and activates it.
|
|
6238
|
-
|
|
6247
|
+
the resulting auth.json to Arcanist (encrypted, per user) and activates it. The credential is never
|
|
6248
|
+
written to your default ~/.codex.
|
|
6239
6249
|
|
|
6240
6250
|
Examples:
|
|
6241
6251
|
arcanist codex login
|
|
@@ -6243,7 +6253,7 @@ Examples:
|
|
|
6243
6253
|
`
|
|
6244
6254
|
).action((options, command) => codexLoginCommand(options, command));
|
|
6245
6255
|
codex.command("use <state>").description("Turn using your saved Codex subscription auth for OpenAI sessions on or off (state: on|off)").action((state, options, command) => codexUseCommand(state, options, command));
|
|
6246
|
-
codex.command("status").description("Show
|
|
6256
|
+
codex.command("status").description("Show Codex subscription availability and whether auth is saved").action((options, command) => codexStatusCommand(options, command));
|
|
6247
6257
|
codex.command("logout").description("Deactivate the selector and remove the stored Codex subscription auth for your user").action((options, command) => codexLogoutCommand(options, command));
|
|
6248
6258
|
var grok = program.command("grok").description("Grok (xAI) subscription (bring-your-own-subscription) commands");
|
|
6249
6259
|
grok.command("login").description("Authenticate a Grok (xAI) subscription and store it for future Grok BYOS sessions").option("--grok-path <path>", "Path to the grok executable (default: grok on PATH, or ARCANIST_GROK_BIN)").addHelpText(
|