@tryarcanist/cli 0.1.382 → 0.1.384
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 +63 -4
- package/dist/index.js +181 -33927
- package/package.json +3 -3
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
|
|
|
@@ -143,6 +157,27 @@ arcanist environments retry owner/repo --wait --json
|
|
|
143
157
|
arcanist environments retry owner/repo --wait --poll-interval 5000 --json
|
|
144
158
|
```
|
|
145
159
|
|
|
160
|
+
### `arcanist environments export`
|
|
161
|
+
|
|
162
|
+
Write an environment's configuration as one JSON file: name, description, provisioning kind and app runtime config, helper files, cache settings (setup, maintenance and smoke scripts, dependencies, CPU and memory) and trusted domains. Secrets, the saved browser login and the review doc are not exported. Read-scoped tokens can export. Pass an environment id or `owner/repo` outside a checkout.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
arcanist environments export owner/repo -o environment.json
|
|
166
|
+
ARCANIST_API_URL=https://app.tryarcanist.com arcanist environments export owner/repo > prod.json
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### `arcanist environments import`
|
|
170
|
+
|
|
171
|
+
Apply an exported file to the same repository's environment on the current deployment, so one deployment can mirror another (for example QA from production). A write-scoped token is required. The target's primary repository must match the file. `--dry-run` lists the fields that differ without changing anything. When a build input changes, the server schedules a rebuild.
|
|
172
|
+
|
|
173
|
+
`--create` creates the environment from the file when the deployment has no team environment for the file's primary repository, and the server schedules its first build. It applies only without an `[environment]` argument. The Arcanist GitHub App must be installed for the repository there. A created environment has no secrets, browser login or review doc.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
ARCANIST_API_URL=https://staging.example.com arcanist environments import prod.json --dry-run
|
|
177
|
+
ARCANIST_API_URL=https://staging.example.com arcanist environments import prod.json --json
|
|
178
|
+
ARCANIST_API_URL=https://staging.example.com arcanist environments import local.json --create
|
|
179
|
+
```
|
|
180
|
+
|
|
146
181
|
### `arcanist environments login`
|
|
147
182
|
|
|
148
183
|
Log into your app once in a throwaway local browser and save that login on the environment so Arcanist sessions start signed in. Alias: `arcanist env login`. A write-scoped token is required. Pass an environment id or `owner/repo` outside a checkout; the environment must have an app runtime configured.
|
|
@@ -346,7 +381,7 @@ The upload limit is 3 MB. Each delivered review counts toward your plan's review
|
|
|
346
381
|
|
|
347
382
|
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
383
|
|
|
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.
|
|
384
|
+
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 `✅ Ruled out (N)` lists what the review tried to break and why it held. JSON mode returns `{status, requestId, sessionId, verdict, summary, findings, alsoChecked}`, where each finding is `{file, line, blocksMerge, title, body}`, plus `agentPrompt` when it has one; each Ruled out item is `{title, conclusion}`. `alsoChecked` is left out when empty. `environmentDegradedReason` is added when the review ran without a prepared environment.
|
|
350
385
|
|
|
351
386
|
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
387
|
|
|
@@ -367,3 +402,27 @@ For cron, prefer `ARCANIST_TOKEN` or a logged-in `~/.arcanist/config.json` over
|
|
|
367
402
|
- **401 on a previously working token**: the token may have expired or been revoked in Settings. Regenerate and log in again.
|
|
368
403
|
- **`You do not have access to this repository on GitHub`**: the token's user lacks repo access; fix the GitHub connection or use an accessible repo.
|
|
369
404
|
- **`command not found`**: run `npm install -g @tryarcanist/cli`.
|
|
405
|
+
|
|
406
|
+
### Read existing review diagnostics
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
arcanist reviews get <pr-request-id> --json
|
|
410
|
+
arcanist reviews stages <session-id> --json
|
|
411
|
+
arcanist reviews stages <session-id> judge --json
|
|
412
|
+
arcanist sessions view <session-id> --json
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
These commands read existing data. They start no review or model run and do not poll.
|
|
416
|
+
Successful reads exit 0, including active reviews and results with blocking findings.
|
|
417
|
+
API errors retain the normal exit codes. Quiet text mode suppresses output. JSON mode preserves the complete response.
|
|
418
|
+
|
|
419
|
+
`reviews get` accepts a **PR request ID** and returns `{review, requestStatus}`.
|
|
420
|
+
The lifecycle snapshot preserves `unavailableRequestIds` and retry/recovery state.
|
|
421
|
+
For a **local request ID**, use `arcanist review --request <id> --no-wait --json` with its existing review exit codes.
|
|
422
|
+
|
|
423
|
+
Stage reads require Arcanist membership. The index lists stage names, byte sizes, and upload timestamps.
|
|
424
|
+
A selected record includes full structured `input`, `output`, and `threads`. The CLI fetches no other records.
|
|
425
|
+
|
|
426
|
+
`sessions view` returns the enriched session envelope for the token workspace.
|
|
427
|
+
Its prompts contain the first page only (`promptLimit=1`). Use `sessions transcript` for full activity and `sessions artifacts` for files.
|
|
428
|
+
`sessions get` keeps its raw session response.
|