@tryarcanist/cli 0.1.382 → 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.
Files changed (3) hide show
  1. package/README.md +74 -4
  2. package/dist/index.js +4343 -11381
  3. 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, review, and sandbox build
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, or build a sandbox layer.
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
- `sandbox build` sends an `Idempotency-Key` header. The CLI does not auto-retry that endpoint; retry explicitly with the same `--idempotency-key` when a request may have already reached the server. It uses auto-random keys by default, so only an explicit key makes cross-invocation retries safe.
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
 
@@ -222,6 +236,62 @@ arcanist codex status --json
222
236
  JSON mode returns `{eligible, credential: {isSet, lastValidationStatus?, lastValidationReasonCode?}}`; `eligible` is always
223
237
  `true` and remains for compatibility with older clients.
224
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
+
225
295
  ### `arcanist sessions get <session-id>`
226
296
 
227
297
  ```bash
@@ -346,7 +416,7 @@ The upload limit is 3 MB. Each delivered review counts toward your plan's review
346
416
 
347
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)`.
348
418
 
349
- 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. Nitpicks come last, under `Nitpicks (N)`. JSON mode returns `{status, requestId, sessionId, verdict, summary, findings}`, where each finding is `{file, line, blocksMerge, title, body}`, plus `nit: true` on a nitpick.
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.
350
420
 
351
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).
352
422