@tryarcanist/cli 0.1.381 → 0.1.383
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 +115 -3
- package/dist/index.js +7175 -11865
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ arcanist sessions list --json
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
export ARCANIST_TOKEN=arc_... # write-scoped for prepare
|
|
21
|
+
export ARCANIST_TOKEN=arc_... # write-scoped for prepare and review
|
|
22
22
|
SESSION_ID=$(arcanist sessions list --json | jq -r '.sessions[0].id')
|
|
23
23
|
arcanist sessions events "$SESSION_ID" --follow --json
|
|
24
24
|
```
|
|
@@ -33,7 +33,7 @@ printf "arc_..." | arcanist auth login --token-stdin
|
|
|
33
33
|
|
|
34
34
|
Token config is stored at `~/.arcanist/config.json`. Existing automation can provide a token through `ARCANIST_TOKEN` or `--token`. Multiple active tokens per user are supported; revoke tokens independently when a device or workflow no longer needs access.
|
|
35
35
|
|
|
36
|
-
Use a read-scoped token for inspection and debugging; use a write-scoped token to prepare or retry environments, trigger an Arcanist review
|
|
36
|
+
Use a read-scoped token for inspection and debugging; use a write-scoped token to prepare or retry environments, or trigger an Arcanist review.
|
|
37
37
|
|
|
38
38
|
Auth and API URL precedence:
|
|
39
39
|
|
|
@@ -93,6 +93,8 @@ With `--json`, successful command output is machine-readable and newline-termina
|
|
|
93
93
|
}
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
+
A usage error (unknown command, unknown option, missing argument, a command group with no subcommand) uses the same shape, and stderr holds only that one object. `error.hint` names the next command to run when there is one.
|
|
97
|
+
|
|
96
98
|
`error.data` is omitted when there is no structured recovery data.
|
|
97
99
|
Stable fields are `serverCode` for server-provided error codes, `repository`, and `environmentsUrl`.
|
|
98
100
|
|
|
@@ -104,11 +106,23 @@ Exit codes:
|
|
|
104
106
|
2 auth error (401/403)
|
|
105
107
|
3 not found (404)
|
|
106
108
|
4 conflict (409)
|
|
109
|
+
5 review still running (`review --no-wait`)
|
|
107
110
|
10 server or network error
|
|
108
111
|
130 interrupted
|
|
109
112
|
```
|
|
110
113
|
|
|
111
|
-
|
|
114
|
+
## Command discovery for agents
|
|
115
|
+
|
|
116
|
+
`arcanist help --json` prints the whole command tree as one JSON object, so an agent learns every command in one call. `arcanist help <command...> --json` prints one branch.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
arcanist help --json
|
|
120
|
+
arcanist help sessions events --json
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Each node is `{path, description, aliases, arguments, options, notes?, subcommands}`. The node you ask for also has `globalOptions`, the flags it inherits from its parent commands. `arguments` entries are `{name, description, required, variadic}`, `options` entries are `{flags, description, required, defaultValue?}`, and `notes` holds the examples and JSON output shape that `--help` prints below the options.
|
|
124
|
+
|
|
125
|
+
Commands that need a person at a terminal (`environments login` without `--clear`, `claude login` without `--token-stdin`) fail at once with exit code `1` when stdin or stderr is not a terminal.
|
|
112
126
|
|
|
113
127
|
## Commands
|
|
114
128
|
|
|
@@ -186,6 +200,8 @@ JSON mode prints the raw `/api/auth/whoami` API response. Fields currently inclu
|
|
|
186
200
|
|
|
187
201
|
### `arcanist codex login`
|
|
188
202
|
|
|
203
|
+
Local development only; deployed workspaces return 403.
|
|
204
|
+
|
|
189
205
|
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`.
|
|
190
206
|
|
|
191
207
|
```bash
|
|
@@ -197,6 +213,8 @@ arcanist codex login --codex-path /usr/local/bin/codex
|
|
|
197
213
|
|
|
198
214
|
### `arcanist codex use <on|off>`
|
|
199
215
|
|
|
216
|
+
`on` works in local development only; deployed workspaces return 403. `off` works everywhere.
|
|
217
|
+
|
|
200
218
|
Turns using your saved Codex subscription auth for OpenAI sessions on or off, without changing the stored credential. `arcanist codex login` turns it on automatically; use this to toggle it later.
|
|
201
219
|
|
|
202
220
|
```bash
|
|
@@ -206,6 +224,8 @@ arcanist codex use off
|
|
|
206
224
|
|
|
207
225
|
### `arcanist codex status`
|
|
208
226
|
|
|
227
|
+
Deployed workspaces report subscription auth as unavailable; it works in local development only.
|
|
228
|
+
|
|
209
229
|
Shows that Codex subscription auth is available and whether an `auth.json` is currently saved.
|
|
210
230
|
|
|
211
231
|
```bash
|
|
@@ -216,6 +236,62 @@ arcanist codex status --json
|
|
|
216
236
|
JSON mode returns `{eligible, credential: {isSet, lastValidationStatus?, lastValidationReasonCode?}}`; `eligible` is always
|
|
217
237
|
`true` and remains for compatibility with older clients.
|
|
218
238
|
|
|
239
|
+
### `arcanist codex logout`
|
|
240
|
+
|
|
241
|
+
Removes the saved Codex subscription `auth.json`. OpenAI sessions fall back to the platform key.
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
arcanist codex logout
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### `arcanist settings …`
|
|
248
|
+
|
|
249
|
+
Reads and changes every customer-facing setting the web app exposes. A read-scope token reads; a write-scope token changes.
|
|
250
|
+
Workspace-wide changes (team defaults, exclusions, members, invite, secrets, integrations) also need the admin role.
|
|
251
|
+
`approvals show` and `approvals set` both need a write-scope token and the admin role. `repo-reviews set`,
|
|
252
|
+
`review-instructions set`, and `learned-doc clear` need write permission on the repository on GitHub.
|
|
253
|
+
Every subcommand supports `--json`, which prints the API payload. Secret values are never printed.
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
arcanist settings show # your review display preferences
|
|
257
|
+
arcanist settings set --inline-nits on
|
|
258
|
+
arcanist settings team-reviews show
|
|
259
|
+
arcanist settings team-reviews set --auto-review on --drafts off
|
|
260
|
+
arcanist settings repo-reviews list
|
|
261
|
+
arcanist settings repo-reviews set acme/widgets --check blocking
|
|
262
|
+
arcanist settings my-reviews set acme/widgets --auto-review inherit
|
|
263
|
+
arcanist settings branch-exclusions add acme/widgets 'release/*'
|
|
264
|
+
arcanist settings bot-exclusions add dependabot[bot]
|
|
265
|
+
arcanist settings approvals show acme/widgets
|
|
266
|
+
arcanist settings approvals set --policy-file policy.json
|
|
267
|
+
arcanist settings review-instructions set acme/widgets --file REVIEW.md
|
|
268
|
+
arcanist settings learned-doc clear acme/widgets
|
|
269
|
+
arcanist settings members set-role 42 admin
|
|
270
|
+
arcanist settings invite rotate
|
|
271
|
+
arcanist settings secrets set acme/widgets NPM_TOKEN --value-file token.txt --sensitive on
|
|
272
|
+
arcanist settings secrets import acme/widgets --file secrets.env
|
|
273
|
+
arcanist settings integrations list
|
|
274
|
+
arcanist settings setup answer acme/widgets <question-id> "use pnpm"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Run `arcanist settings <group> --help` for the flags of each group.
|
|
278
|
+
|
|
279
|
+
### `arcanist resource-pools …` and `arcanist environments resources …`
|
|
280
|
+
|
|
281
|
+
Manages shared resource pools (pooled credentials that sandboxes lease) and which environments draw from them.
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
arcanist resource-pools create accounts
|
|
285
|
+
arcanist resource-pools list
|
|
286
|
+
arcanist resource-pools slots add accounts --name primary --credentials-file creds.env
|
|
287
|
+
arcanist resource-pools slots set accounts <slot-id> --name primary --credentials-file creds.env
|
|
288
|
+
arcanist resource-pools slots rm accounts <slot-id>
|
|
289
|
+
arcanist resource-pools rm accounts
|
|
290
|
+
arcanist environments resources list <environment-id>
|
|
291
|
+
arcanist environments resources attach <environment-id> --name db --pool accounts
|
|
292
|
+
arcanist environments resources detach <environment-id> --name db
|
|
293
|
+
```
|
|
294
|
+
|
|
219
295
|
### `arcanist sessions get <session-id>`
|
|
220
296
|
|
|
221
297
|
```bash
|
|
@@ -308,6 +384,42 @@ arcanist repos list --json
|
|
|
308
384
|
|
|
309
385
|
JSON mode returns `{repos, ssoOrgs}`.
|
|
310
386
|
|
|
387
|
+
### `arcanist review [pr-url]`
|
|
388
|
+
|
|
389
|
+
Review your local commits before you open a pull request. Run it inside a checkout of a repository that Arcanist is installed on. A write-scoped token and a paid Arcanist plan or a pilot are required.
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
arcanist review
|
|
393
|
+
arcanist review --base origin/release --json
|
|
394
|
+
arcanist review --include config/.env.test
|
|
395
|
+
arcanist review --request <id>
|
|
396
|
+
arcanist review --no-wait --json
|
|
397
|
+
arcanist review --request <id> --no-wait --json
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
What is uploaded: the committed changes on your branch that are not on the default branch of `origin`, plus their commit messages. Nothing is posted to GitHub.
|
|
401
|
+
|
|
402
|
+
What is left out:
|
|
403
|
+
|
|
404
|
+
- Uncommitted changes are not reviewed. Commit them first.
|
|
405
|
+
- Secret-looking files (dotenv files, keys, certificates) and git-ignored files are held back unless you name them with `--include`.
|
|
406
|
+
- Binary files are skipped.
|
|
407
|
+
|
|
408
|
+
The upload limit is 3 MB. Each delivered review counts toward your plan's review usage; a review that fails does not.
|
|
409
|
+
|
|
410
|
+
- `--base <ref>` compares against this ref instead of the default branch.
|
|
411
|
+
- `--include <path>` uploads a held-back file or folder. Repeat it for more.
|
|
412
|
+
- `--request <id>` gets the result of a review that is already running or finished. Use it when the command was interrupted; the request id is always printed to stderr when the review starts, also with `--json` and `--quiet`.
|
|
413
|
+
- `--no-wait` starts a review, or checks one with `--request <id>`, and returns at once. It exits `5` while the review is still running.
|
|
414
|
+
- `--poll-interval <ms>` sets how often the CLI checks for the result (default `10000`).
|
|
415
|
+
- `--wait` applies only to a PR URL; a local review waits by default, up to 30 minutes, and prints `Still reviewing (Nm)` with the `--request` command every minute (stderr, not with `--json` or `--quiet`).
|
|
416
|
+
|
|
417
|
+
Held-back files are committed, so they ship with your branch; the CLI lists them as `Committed but not uploaded for review (pass --include <path> to upload)`.
|
|
418
|
+
|
|
419
|
+
Output is the headline (`Arcanist review: Hold off on merging.` when a finding blocks merge, else `Arcanist review: Ready to merge.`), the summary, then each finding as `file:line - title` followed by its full text. A blocking finding's title ends with `(blocks merge)`; a non-blocking finding has no tag. A finding with an agent prompt shows it under `Agent prompt:`, ready to paste into a coding agent in this checkout. Then `Code quality (N)` lists maintainability notes (never blocking), `Nitpicks (N)` lists nitpicks, and `✅ Ruled out (N)` lists what the review tried to break and why it held. JSON mode returns `{status, requestId, sessionId, verdict, summary, findings, codeQuality, alsoChecked}`, where each finding is `{file, line, blocksMerge, title, body}`, plus `nit: true` on a nitpick and `agentPrompt` when it has one; each code quality note is `{file, line, title, detail}` and each Ruled out item is `{title, conclusion}`. `codeQuality` and `alsoChecked` are left out when empty. `environmentDegradedReason` is added when the review ran without a prepared environment.
|
|
420
|
+
|
|
421
|
+
Exit codes: `0` when no finding blocks merge, `1` when a finding blocks merge or the review could not start, `4` when another review of yours is still running, `5` when the review is still running (`--no-wait`), `10` when the review failed, `130` when interrupted (Ctrl-C or SIGTERM).
|
|
422
|
+
|
|
311
423
|
## Automation recipes
|
|
312
424
|
|
|
313
425
|
Chain commands with `--json` and `jq`:
|