@vigilbase/cli 0.2.0 → 0.2.2
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/CLOUDFLARE.md +9 -12
- package/COMMANDS.md +192 -111
- package/LOCAL.md +77 -84
- package/ONE.md +5 -6
- package/README.md +349 -173
- package/SECURITY.md +6 -4
- package/dist/auth/device-auth.d.ts +0 -1
- package/dist/auth/device-auth.js +6 -5
- package/dist/auth/index.d.ts +1 -2
- package/dist/auth/index.js +1 -2
- package/dist/auth/provider.d.ts +1 -1
- package/dist/auth/provider.js +16 -7
- package/dist/auth/refresh.d.ts +23 -4
- package/dist/auth/refresh.js +78 -22
- package/dist/auth/store.d.ts +78 -4
- package/dist/auth/store.js +385 -74
- package/dist/auth/token-metadata.d.ts +0 -1
- package/dist/auth/token-metadata.js +0 -1
- package/dist/auth/types.d.ts +0 -1
- package/dist/auth/types.js +0 -1
- package/dist/bin.d.ts +0 -1
- package/dist/bin.js +0 -1
- package/dist/cli.d.ts +4 -2
- package/dist/cli.js +13 -11
- package/dist/commands/account.d.ts +0 -1
- package/dist/commands/account.js +1 -2
- package/dist/commands/auth.d.ts +0 -1
- package/dist/commands/auth.js +71 -22
- package/dist/commands/billing.d.ts +0 -1
- package/dist/commands/billing.js +0 -1
- package/dist/commands/cloudflare.d.ts +1 -2
- package/dist/commands/cloudflare.js +14 -9
- package/dist/commands/helpers.d.ts +0 -1
- package/dist/commands/helpers.js +0 -1
- package/dist/commands/index.d.ts +0 -1
- package/dist/commands/index.js +0 -1
- package/dist/commands/legacy-validation.d.ts +7 -2
- package/dist/commands/legacy-validation.js +15 -3
- package/dist/commands/local.d.ts +6 -1
- package/dist/commands/local.js +36 -12
- package/dist/commands/one.d.ts +0 -1
- package/dist/commands/one.js +39 -13
- package/dist/commands/public-tools.d.ts +0 -1
- package/dist/commands/public-tools.js +63 -29
- package/dist/commands/runs.d.ts +0 -1
- package/dist/commands/runs.js +1 -2
- package/dist/commands/security.d.ts +1 -2
- package/dist/commands/security.js +34 -23
- package/dist/commands/watchdog.d.ts +0 -1
- package/dist/commands/watchdog.js +0 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/lib/banner.d.ts +0 -1
- package/dist/lib/banner.js +0 -1
- package/dist/lib/client.d.ts +9 -2
- package/dist/lib/client.js +49 -20
- package/dist/lib/cloudflare-client.d.ts +0 -1
- package/dist/lib/cloudflare-client.js +1 -2
- package/dist/lib/config.d.ts +16 -3
- package/dist/lib/config.js +41 -14
- package/dist/lib/format.d.ts +2 -1
- package/dist/lib/format.js +19 -8
- package/dist/lib/help.d.ts +4 -2
- package/dist/lib/help.js +72 -23
- package/dist/lib/network.d.ts +10 -1
- package/dist/lib/network.js +31 -4
- package/dist/lib/one-client.d.ts +4 -1
- package/dist/lib/one-client.js +9 -3
- package/dist/lib/one-error-hints.d.ts +19 -0
- package/dist/lib/one-error-hints.js +47 -0
- package/dist/lib/one-operations.d.ts +0 -1
- package/dist/lib/one-operations.js +0 -1
- package/dist/lib/open-url.d.ts +0 -1
- package/dist/lib/open-url.js +0 -1
- package/dist/lib/platform.d.ts +2 -0
- package/dist/lib/platform.js +4 -0
- package/dist/lib/progress.d.ts +0 -1
- package/dist/lib/progress.js +0 -1
- package/dist/lib/security-client.d.ts +0 -1
- package/dist/lib/security-client.js +0 -1
- package/dist/lib/skill-fetch.d.ts +0 -1
- package/dist/lib/skill-fetch.js +0 -1
- package/dist/lib/system-trust.d.ts +0 -1
- package/dist/lib/system-trust.js +0 -1
- package/dist/lib/tui.d.ts +0 -1
- package/dist/lib/tui.js +0 -1
- package/dist/local/cloudflare-checkup/cf/allowlist.d.ts +0 -1
- package/dist/local/cloudflare-checkup/cf/allowlist.js +0 -1
- package/dist/local/cloudflare-checkup/cf/auth-lifecycle.d.ts +0 -1
- package/dist/local/cloudflare-checkup/cf/auth-lifecycle.js +0 -1
- package/dist/local/cloudflare-checkup/cf/child-env.d.ts +0 -1
- package/dist/local/cloudflare-checkup/cf/child-env.js +0 -1
- package/dist/local/cloudflare-checkup/cf/install.d.ts +0 -1
- package/dist/local/cloudflare-checkup/cf/install.js +0 -1
- package/dist/local/cloudflare-checkup/cf/locate.d.ts +0 -1
- package/dist/local/cloudflare-checkup/cf/locate.js +0 -1
- package/dist/local/cloudflare-checkup/cf/run-cf.d.ts +0 -1
- package/dist/local/cloudflare-checkup/cf/run-cf.js +0 -1
- package/dist/local/cloudflare-checkup/collector.d.ts +0 -1
- package/dist/local/cloudflare-checkup/collector.js +0 -1
- package/dist/local/cloudflare-checkup/contract.d.ts +14 -3
- package/dist/local/cloudflare-checkup/contract.js +9 -3
- package/dist/local/cloudflare-checkup/email-verification.d.ts +0 -1
- package/dist/local/cloudflare-checkup/email-verification.js +0 -1
- package/dist/local/cloudflare-checkup/errors.d.ts +4 -1
- package/dist/local/cloudflare-checkup/errors.js +8 -2
- package/dist/local/cloudflare-checkup/output.d.ts +0 -1
- package/dist/local/cloudflare-checkup/output.js +0 -1
- package/dist/local/cloudflare-checkup/prompts.d.ts +0 -1
- package/dist/local/cloudflare-checkup/prompts.js +0 -1
- package/dist/local/cloudflare-checkup/rate-budget.d.ts +0 -1
- package/dist/local/cloudflare-checkup/rate-budget.js +0 -1
- package/dist/local/cloudflare-checkup/snapshot-file.d.ts +0 -1
- package/dist/local/cloudflare-checkup/snapshot-file.js +5 -4
- package/dist/local/cloudflare-checkup/submit-client.d.ts +19 -5
- package/dist/local/cloudflare-checkup/submit-client.js +63 -17
- package/dist/local/cloudflare-checkup/terminal-ui.d.ts +0 -1
- package/dist/local/cloudflare-checkup/terminal-ui.js +0 -1
- package/dist/types.d.ts +25 -3
- package/dist/types.js +16 -1
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -1
- package/package.json +5 -9
- package/dist/auth/device-auth.d.ts.map +0 -1
- package/dist/auth/device-auth.js.map +0 -1
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/provider.d.ts.map +0 -1
- package/dist/auth/provider.js.map +0 -1
- package/dist/auth/refresh.d.ts.map +0 -1
- package/dist/auth/refresh.js.map +0 -1
- package/dist/auth/store.d.ts.map +0 -1
- package/dist/auth/store.js.map +0 -1
- package/dist/auth/token-metadata.d.ts.map +0 -1
- package/dist/auth/token-metadata.js.map +0 -1
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js.map +0 -1
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/account.d.ts.map +0 -1
- package/dist/commands/account.js.map +0 -1
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/billing.d.ts.map +0 -1
- package/dist/commands/billing.js.map +0 -1
- package/dist/commands/cloudflare.d.ts.map +0 -1
- package/dist/commands/cloudflare.js.map +0 -1
- package/dist/commands/helpers.d.ts.map +0 -1
- package/dist/commands/helpers.js.map +0 -1
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/legacy-validation.d.ts.map +0 -1
- package/dist/commands/legacy-validation.js.map +0 -1
- package/dist/commands/local.d.ts.map +0 -1
- package/dist/commands/local.js.map +0 -1
- package/dist/commands/one.d.ts.map +0 -1
- package/dist/commands/one.js.map +0 -1
- package/dist/commands/public-tools.d.ts.map +0 -1
- package/dist/commands/public-tools.js.map +0 -1
- package/dist/commands/runs.d.ts.map +0 -1
- package/dist/commands/runs.js.map +0 -1
- package/dist/commands/security.d.ts.map +0 -1
- package/dist/commands/security.js.map +0 -1
- package/dist/commands/watchdog.d.ts.map +0 -1
- package/dist/commands/watchdog.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/banner.d.ts.map +0 -1
- package/dist/lib/banner.js.map +0 -1
- package/dist/lib/client.d.ts.map +0 -1
- package/dist/lib/client.js.map +0 -1
- package/dist/lib/cloudflare-client.d.ts.map +0 -1
- package/dist/lib/cloudflare-client.js.map +0 -1
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/format.d.ts.map +0 -1
- package/dist/lib/format.js.map +0 -1
- package/dist/lib/help.d.ts.map +0 -1
- package/dist/lib/help.js.map +0 -1
- package/dist/lib/network.d.ts.map +0 -1
- package/dist/lib/network.js.map +0 -1
- package/dist/lib/one-client.d.ts.map +0 -1
- package/dist/lib/one-client.js.map +0 -1
- package/dist/lib/one-operations.d.ts.map +0 -1
- package/dist/lib/one-operations.js.map +0 -1
- package/dist/lib/open-url.d.ts.map +0 -1
- package/dist/lib/open-url.js.map +0 -1
- package/dist/lib/progress.d.ts.map +0 -1
- package/dist/lib/progress.js.map +0 -1
- package/dist/lib/security-client.d.ts.map +0 -1
- package/dist/lib/security-client.js.map +0 -1
- package/dist/lib/skill-fetch.d.ts.map +0 -1
- package/dist/lib/skill-fetch.js.map +0 -1
- package/dist/lib/system-trust.d.ts.map +0 -1
- package/dist/lib/system-trust.js.map +0 -1
- package/dist/lib/tui.d.ts.map +0 -1
- package/dist/lib/tui.js.map +0 -1
- package/dist/local/cloudflare-checkup/cf/allowlist.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/cf/allowlist.js.map +0 -1
- package/dist/local/cloudflare-checkup/cf/auth-lifecycle.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/cf/auth-lifecycle.js.map +0 -1
- package/dist/local/cloudflare-checkup/cf/child-env.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/cf/child-env.js.map +0 -1
- package/dist/local/cloudflare-checkup/cf/install.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/cf/install.js.map +0 -1
- package/dist/local/cloudflare-checkup/cf/locate.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/cf/locate.js.map +0 -1
- package/dist/local/cloudflare-checkup/cf/run-cf.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/cf/run-cf.js.map +0 -1
- package/dist/local/cloudflare-checkup/collector.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/collector.js.map +0 -1
- package/dist/local/cloudflare-checkup/contract.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/contract.js.map +0 -1
- package/dist/local/cloudflare-checkup/email-verification.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/email-verification.js.map +0 -1
- package/dist/local/cloudflare-checkup/errors.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/errors.js.map +0 -1
- package/dist/local/cloudflare-checkup/output.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/output.js.map +0 -1
- package/dist/local/cloudflare-checkup/prompts.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/prompts.js.map +0 -1
- package/dist/local/cloudflare-checkup/rate-budget.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/rate-budget.js.map +0 -1
- package/dist/local/cloudflare-checkup/snapshot-file.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/snapshot-file.js.map +0 -1
- package/dist/local/cloudflare-checkup/submit-client.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/submit-client.js.map +0 -1
- package/dist/local/cloudflare-checkup/terminal-ui.d.ts.map +0 -1
- package/dist/local/cloudflare-checkup/terminal-ui.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js.map +0 -1
package/LOCAL.md
CHANGED
|
@@ -1,50 +1,69 @@
|
|
|
1
1
|
# Local Cloudflare Checkup reference
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
collects your Cloudflare configuration **on your own machine** with
|
|
3
|
+
`vigilbase cloudflare-checkup` runs the Vigilbase Cloudflare Checkup in local
|
|
4
|
+
mode: it collects your Cloudflare configuration **on your own machine** with
|
|
5
5
|
Cloudflare's own CLI, `cf`, writes a minimised snapshot you can inspect, and
|
|
6
6
|
uploads exactly that file to vigilbase.com after you confirm. vigilbase.com
|
|
7
|
-
evaluates it with the same scanner as the browser
|
|
8
|
-
|
|
9
|
-
results page opens in your
|
|
7
|
+
evaluates it with the same scanner as the checkup in your browser, which uses a
|
|
8
|
+
read-only Cloudflare API token instead. Results are labelled **self-reported**;
|
|
9
|
+
they go to your verified work email, and the results page opens in your
|
|
10
|
+
browser.
|
|
11
|
+
|
|
12
|
+
Local mode is available while vigilbase.com has it switched on. The CLI checks
|
|
13
|
+
before it asks for your email; when local mode is off it stops with
|
|
14
|
+
`Local checkups aren't available right now.` and points you to the checkup in
|
|
15
|
+
your browser at <https://vigilbase.com/tools/cloudflare-checkup>.
|
|
10
16
|
|
|
11
17
|
`vigilbase cf checkup` runs on Vigilbase One's servers with stored credentials
|
|
12
|
-
(see [CLOUDFLARE.md](
|
|
13
|
-
your machine and needs no Vigilbase
|
|
18
|
+
(see [CLOUDFLARE.md](https://app.unpkg.com/@vigilbase/cli@0.2.2/files/CLOUDFLARE.md));
|
|
19
|
+
`vigilbase cloudflare-checkup` runs on your machine and needs no Vigilbase
|
|
20
|
+
login.
|
|
14
21
|
|
|
15
22
|
## Quick start: one command
|
|
16
23
|
|
|
17
|
-
Run this in a terminal (
|
|
24
|
+
Run this in a terminal (while local mode is on, the checkup page at
|
|
25
|
+
<https://vigilbase.com/tools/cloudflare-checkup> shows the same command):
|
|
18
26
|
|
|
19
27
|
```bash
|
|
20
28
|
npx @vigilbase/cli cloudflare-checkup
|
|
21
29
|
```
|
|
22
30
|
|
|
31
|
+
If it answers `Unknown command "cloudflare-checkup"`, an older global install
|
|
32
|
+
of the CLI (0.1.x) is running instead: `npx` prefers an installed global
|
|
33
|
+
`@vigilbase/cli`. Run `npx @vigilbase/cli@latest cloudflare-checkup` once, or
|
|
34
|
+
update the global install with `npm install -g @vigilbase/cli@latest`. With
|
|
35
|
+
Yarn 4.15+ or pnpm 11+, `yarn dlx` and `pnpm dlx` run an older release for a
|
|
36
|
+
day after each release; use `npx` (see
|
|
37
|
+
[Troubleshooting](https://app.unpkg.com/@vigilbase/cli@0.2.2/files/README.md#troubleshooting)).
|
|
38
|
+
|
|
23
39
|
The command does everything, in this order, and stops at the first problem
|
|
24
40
|
before any slower step:
|
|
25
41
|
|
|
26
42
|
1. Checks Node.js (22.18 or newer; macOS, Linux or Windows x64).
|
|
27
|
-
2. Asks
|
|
43
|
+
2. Asks vigilbase.com whether local checkups are available and accept this CLI
|
|
44
|
+
version (nothing about you is sent). If not, it stops here, before asking
|
|
45
|
+
for your email.
|
|
46
|
+
3. Asks for your work email (`Work email for your results:`), and
|
|
28
47
|
vigilbase.com emails you a 6-digit code. You enter it at
|
|
29
48
|
`Code from the email:` (`123456`, `123 456` and `123-456` all work), and
|
|
30
49
|
the CLI prints `✓ Verified j***@acme.com`.
|
|
31
|
-
|
|
50
|
+
4. Finds Cloudflare's `cf`. If none is usable (including a newer cf that
|
|
32
51
|
renamed a command the checkup needs), it offers to install the tested
|
|
33
52
|
release for Vigilbase (asks first; `--yes` answers for you). Your own cf is
|
|
34
53
|
left alone.
|
|
35
|
-
|
|
54
|
+
5. Signs in to Cloudflare with a **read-only** cf login (your browser opens) if
|
|
36
55
|
the cf profile `vigilbase-checkup` is missing or expired. With
|
|
37
56
|
`CLOUDFLARE_API_TOKEN` set in the shell, cf uses that token instead and the
|
|
38
57
|
browser sign-in is not offered: unset the variable, or add
|
|
39
58
|
`--cf-auth profile`, to sign in with your browser.
|
|
40
|
-
|
|
59
|
+
6. Lets you choose the account (one account is used as is; several get a
|
|
41
60
|
list to choose from).
|
|
42
|
-
|
|
43
|
-
|
|
61
|
+
7. Collects with read-only cf commands, at most 900 requests per 5 minutes.
|
|
62
|
+
8. Saves the snapshot to `~/.config/vigilbase/checkups/…` (mode 0600) and
|
|
44
63
|
shows what it contains.
|
|
45
|
-
|
|
64
|
+
9. Asks `Results go to j***@acme.com. Upload 182 KB to https://vigilbase.com? [y/N]`
|
|
46
65
|
and uploads exactly that file only after an explicit `y`.
|
|
47
|
-
|
|
66
|
+
10. Prints the results link and opens it in your browser.
|
|
48
67
|
|
|
49
68
|
In a terminal, the steps show as an interactive timeline (see
|
|
50
69
|
[Terminal UI and plain output](#terminal-ui-and-plain-output)):
|
|
@@ -137,12 +156,13 @@ and `vigilbase local cloudflare-checkup run` are the same command.
|
|
|
137
156
|
| `--json` | One JSON object on stdout; status lines and prompts go to stderr. |
|
|
138
157
|
|
|
139
158
|
Before anything slow, the command checks every flag (no I/O, and `--email`
|
|
140
|
-
only for its shape),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
159
|
+
only for its shape), that its questions can be answered (on a terminal, or
|
|
160
|
+
with `--yes` without one; `--confirm` answers only the upload question, not
|
|
161
|
+
installing cf), then Node, then that `--out` is writable, then that
|
|
162
|
+
vigilbase.com has local checkups on and accepts this CLI. So no code is emailed
|
|
163
|
+
for a run that could not install cf, confirm the upload or be accepted. It
|
|
164
|
+
verifies your email before cf runs, and checks that the snapshot location is
|
|
165
|
+
writable before collecting, so a long collection is never wasted.
|
|
146
166
|
|
|
147
167
|
Two problems can show only once cf runs, after the email was verified: without
|
|
148
168
|
a terminal, a missing cf login (`CF_AUTH_REQUIRED`) and several accounts
|
|
@@ -164,9 +184,10 @@ never answered from stdin: use `--account-id` and `--yes`.
|
|
|
164
184
|
|
|
165
185
|
In a terminal, the one command and `submit` show their steps as a timeline on
|
|
166
186
|
stderr (◆ the current step, ◇ a finished one, │ notes, ▲ a warning, ■ the error
|
|
167
|
-
that stopped the run, └ the result). Spinners run while
|
|
168
|
-
|
|
169
|
-
|
|
187
|
+
that stopped the run, └ the result). Spinners run while the CLI checks that
|
|
188
|
+
local checkups are available, while vigilbase.com sends or checks the code,
|
|
189
|
+
while the session is checked, while cf is found, checked and installed, and
|
|
190
|
+
while the upload is scored; a progress bar runs while
|
|
170
191
|
collecting (zones done, cf reads done of the estimate, and the time left, from
|
|
171
192
|
the request budget and the pace so far). Everything is redrawn in place and fits
|
|
172
193
|
the terminal width, also after a resize.
|
|
@@ -225,6 +246,17 @@ between the items of a summary line, in every step, spinner and message.
|
|
|
225
246
|
The CLI verifies your email itself; there is no browser step and no bot check
|
|
226
247
|
on this path.
|
|
227
248
|
|
|
249
|
+
- **Availability first.** Before asking for your email, the one command and
|
|
250
|
+
`submit` send `GET …/local-session/availability`, with no email, no
|
|
251
|
+
credentials and no body. If local checkups are switched off, the command
|
|
252
|
+
stops with `LOCAL_MODE_DISABLED`: `Local checkups aren't available right now.`
|
|
253
|
+
and the hint
|
|
254
|
+
`Run the Cloudflare Checkup in your browser instead: https://vigilbase.com/tools/cloudflare-checkup`.
|
|
255
|
+
Nothing is emailed and cf is not touched. If vigilbase.com needs a newer CLI
|
|
256
|
+
or doesn't accept this snapshot format, it stops with `CLI_UPGRADE_REQUIRED`.
|
|
257
|
+
If vigilbase.com doesn't answer the check (for example a network error or a
|
|
258
|
+
timeout, after 10 seconds or `--timeout`), the command goes on, and the same
|
|
259
|
+
checks happen when the checkup starts.
|
|
228
260
|
- **What vigilbase.com receives.** Your email address goes to vigilbase.com
|
|
229
261
|
(`POST …/local-session/request`) so it can send you the code, together with
|
|
230
262
|
the email language (`en`, `pt-PT` or `ar`, from `LC_ALL`, `LC_MESSAGES` or
|
|
@@ -276,9 +308,10 @@ removed from npm's environment when the CLI installs cf.)
|
|
|
276
308
|
stores, inspects or uploads it.
|
|
277
309
|
- **The only Vigilbase requests** go to
|
|
278
310
|
`https://vigilbase.com/api/v1/tools/cloudflare-checkup/local-session`:
|
|
279
|
-
`
|
|
280
|
-
|
|
281
|
-
|
|
311
|
+
`GET …/availability` (no body, no credential), `POST …/request` and
|
|
312
|
+
`POST …/verify` (the email verification, JSON bodies, no credential), then
|
|
313
|
+
`GET` of the session and `POST …/snapshot`, authorised by the session code
|
|
314
|
+
the verification returned. The upload is the exact bytes
|
|
282
315
|
of the file you can inspect; the CLI re-reads and re-hashes it and checks the
|
|
283
316
|
server's echoed SHA-256.
|
|
284
317
|
- **Installing cf** contacts only the npm registry your npm is configured for,
|
|
@@ -379,7 +412,8 @@ The snapshot is kept whatever happens to the upload: when it cannot go ahead
|
|
|
379
412
|
(`SESSION_*`, `VERIFICATION_*`, `SUBMIT_FAILED`, `VIGILBASE_*`,
|
|
380
413
|
`LOCAL_MODE_DISABLED`), the command prints, next to the error,
|
|
381
414
|
`npx @vigilbase/cli cloudflare-checkup submit <saved file>` to upload it
|
|
382
|
-
later without collecting again (it verifies your email again).
|
|
415
|
+
later without collecting again (it verifies your email again). When the run
|
|
416
|
+
used a loopback `--base-url`, that command ends with the same `--base-url`.
|
|
383
417
|
|
|
384
418
|
## Advanced commands
|
|
385
419
|
|
|
@@ -399,9 +433,10 @@ All are `vigilbase cloudflare-checkup <command>` or
|
|
|
399
433
|
the one command. `collect --dry-run` prints every cf command with
|
|
400
434
|
`<ZONE_ID>`/`<RULESET_ID>` placeholders, the child-environment variable names
|
|
401
435
|
(never values), the not-collected list and the request formula; it makes no
|
|
402
|
-
Cloudflare and no Vigilbase requests. `submit` checks the file,
|
|
403
|
-
|
|
404
|
-
(accepted for 24 hours) and prints
|
|
436
|
+
Cloudflare and no Vigilbase requests. `submit` checks the file, checks that
|
|
437
|
+
vigilbase.com has local checkups on, verifies your email like the one command,
|
|
438
|
+
then uploads a snapshot collected earlier (accepted for 24 hours) and prints
|
|
439
|
+
the results link.
|
|
405
440
|
|
|
406
441
|
`logout` runs `cf auth delete <profile>` through the cf it finds (an
|
|
407
442
|
interactive passthrough, so cf's own message is shown; cf 1.0.0-beta.13 takes
|
|
@@ -543,8 +578,8 @@ before every expiry in a long run.
|
|
|
543
578
|
|
|
544
579
|
## Scopes
|
|
545
580
|
|
|
546
|
-
The sign-in (and `login`) requests these read scopes (names verified against
|
|
547
|
-
|
|
581
|
+
The sign-in (and `login`) requests these read scopes (names verified against
|
|
582
|
+
cf 1.0.0-beta.13):
|
|
548
583
|
|
|
549
584
|
`account:read account-settings.read memberships.read user:read user-details.read
|
|
550
585
|
zone:read zone.read zone-settings.read dns.read dns_records:read
|
|
@@ -639,11 +674,11 @@ are never echoed.
|
|
|
639
674
|
| `CF_ERROR` | Run the same command again in a few minutes. |
|
|
640
675
|
| `ACCOUNT_SELECTION_REQUIRED` | Run the same command again in a terminal to choose, or add `--account-id <ACCOUNT_ID>` (listed in the error). |
|
|
641
676
|
| `ACCOUNT_NOT_VISIBLE` | Check that your Cloudflare user can read the account and its zones. |
|
|
642
|
-
| `ACCOUNT_TOO_LARGE` | Over 100 zones:
|
|
677
|
+
| `ACCOUNT_TOO_LARGE` | Over 100 zones: run the checkup in your browser instead, https://vigilbase.com/tools/cloudflare-checkup. |
|
|
643
678
|
| `ACCOUNT_MISMATCH` | The checkup is bound to another account; run the same command again without `--account-id`. |
|
|
644
679
|
| `OUTPUT_EXISTS` | Choose another `--out`, or pass `--overwrite`. |
|
|
645
|
-
| `SNAPSHOT_INVALID` / `SNAPSHOT_SECRET_LIKE_VALUE` | Run the same command again (remove the credential-like text from the rule or name first). |
|
|
646
|
-
| `SNAPSHOT_TOO_LARGE` |
|
|
680
|
+
| `SNAPSHOT_INVALID` / `SNAPSHOT_SECRET_LIKE_VALUE` | Run the same command again (remove the credential-like text from the rule or name first). When `inspect` or `submit` finds no file at the path, check the path, or collect one with `npx @vigilbase/cli cloudflare-checkup collect --out <file>`. |
|
|
681
|
+
| `SNAPSHOT_TOO_LARGE` | Run the checkup in your browser instead, https://vigilbase.com/tools/cloudflare-checkup. |
|
|
647
682
|
| `SNAPSHOT_STALE` | Snapshots are accepted for 24 hours; run the same command again. |
|
|
648
683
|
| `EMAIL_INVALID` | Use your work email (personal and disposable addresses are refused), then run the same command again. |
|
|
649
684
|
| `EMAIL_CODE_INVALID` | Five codes were wrong or not 6 digits; run the same command again for a new code. |
|
|
@@ -653,8 +688,8 @@ are never echoed.
|
|
|
653
688
|
| `SESSION_BUSY` | A snapshot for this checkup is still being processed; wait for the results email, or run the same command again. |
|
|
654
689
|
| `SUBMIT_ORIGIN_UNTRUSTED` | Upload only to https://vigilbase.com (or loopback for testing). |
|
|
655
690
|
| `CONFIRMATION_REQUIRED` | Run the command in a terminal, or add `--yes` (and, without `--email`, pipe the address and the code to stdin). |
|
|
656
|
-
| `CLI_UPGRADE_REQUIRED` | Run `npx @vigilbase/cli@latest cloudflare-checkup`, or `npm install --global @vigilbase/cli@latest`. |
|
|
657
|
-
| `LOCAL_MODE_DISABLED` |
|
|
691
|
+
| `CLI_UPGRADE_REQUIRED` | vigilbase.com needs a newer CLI (checked before your email is asked for). Run `npx @vigilbase/cli@latest cloudflare-checkup`, or `npm install --global @vigilbase/cli@latest`. |
|
|
692
|
+
| `LOCAL_MODE_DISABLED` | Local checkups aren't available right now. Run the Cloudflare Checkup in your browser instead: https://vigilbase.com/tools/cloudflare-checkup. |
|
|
658
693
|
| `VIGILBASE_RATE_LIMITED` | Wait as long as the error says (`retryAfterSec` in JSON), then run the same command again. |
|
|
659
694
|
| `VIGILBASE_CHALLENGED` | vigilbase.com challenged the request; try another network or contact help@vigilbase.com. |
|
|
660
695
|
| `SUBMIT_FAILED` | Run the same command again later. |
|
|
@@ -676,9 +711,9 @@ Windows x64 is supported as beta without CI coverage: cf runs via
|
|
|
676
711
|
`process.execPath` with the entry beside `cf.cmd` (npm's global layout), never
|
|
677
712
|
through `cmd.exe`; and the managed install uses the `npm-cli.js` beside
|
|
678
713
|
`node.exe`. The results page is not opened on Windows (the link is printed).
|
|
679
|
-
Windows on ARM is not supported.
|
|
680
|
-
|
|
681
|
-
above.
|
|
714
|
+
Windows on ARM is not supported. The checkup needs no Vigilbase sign-in, so it
|
|
715
|
+
works on Windows even though `vigilbase login` doesn't yet. pnpm and Volta
|
|
716
|
+
global installs are found automatically; otherwise pass `--cf-bin` as above.
|
|
682
717
|
|
|
683
718
|
## Cleanup
|
|
684
719
|
|
|
@@ -687,45 +722,3 @@ npx @vigilbase/cli cloudflare-checkup logout # cf auth delete vigilbase-checku
|
|
|
687
722
|
rm ~/.config/vigilbase/checkups/cloudflare-checkup-*.json # the snapshots are yours; delete them when done
|
|
688
723
|
```
|
|
689
724
|
|
|
690
|
-
## Test it locally (contributors)
|
|
691
|
-
|
|
692
|
-
From a checkout of the monorepo, one command runs the whole flow on your
|
|
693
|
-
machine: vigilbase.com (`next dev`, local mode on), an in-memory fake of One's
|
|
694
|
-
tool-runs API, and this CLI built from source.
|
|
695
|
-
|
|
696
|
-
```bash
|
|
697
|
-
pnpm dev:checkup-local # your own cf: sign in to your Cloudflare account (read-only)
|
|
698
|
-
pnpm dev:checkup-local --fake-cf # a fake cf with two accounts: no Cloudflare account needed
|
|
699
|
-
pnpm dev:checkup-local --help # every option
|
|
700
|
-
```
|
|
701
|
-
|
|
702
|
-
It needs Node 22.18+ (it finds Homebrew's or nvm's Node 22 when the shell has
|
|
703
|
-
another version) and an Infisical login for the dev environment
|
|
704
|
-
(`infisical login`). It builds the CLI when `packages/cli/dist` is older than
|
|
705
|
-
`src`, starts com on port 3011 (or the next free one) with the Infisical dev
|
|
706
|
-
values overridden for local mode, and runs the CLI against
|
|
707
|
-
`http://localhost:<port>`. Server output goes to a log, never the terminal.
|
|
708
|
-
|
|
709
|
-
- **Email** is never sent. Each message lands in a local inbox
|
|
710
|
-
(`$TMPDIR/vigilbase-checkup-local/inbox/`) and verification emails open in
|
|
711
|
-
your browser like a real inbox. `latest-email.json` beside it holds the
|
|
712
|
-
newest email, code included, for scripts.
|
|
713
|
-
- **Results** open from the CLI as usual. vigilbase.com keeps running after the
|
|
714
|
-
CLI finishes so the results page works: press Enter to stop, or `r` to run
|
|
715
|
-
the CLI again without restarting the server.
|
|
716
|
-
- **Options**: `--page` also opens the checkup page in local mode; `--no-open`
|
|
717
|
-
opens nothing (no inbox tabs, no results page); `--port <n>` picks the port;
|
|
718
|
-
`--one-budgets` applies One's creation budgets (one run per address every
|
|
719
|
-
8 minutes, as in production). Options after `--` go to the CLI, for example
|
|
720
|
-
`pnpm dev:checkup-local -- --email you@company.com` or `-- submit <file>`.
|
|
721
|
-
- **Logs**: `com.log` and `fake-one.log` in the same directory. The next run
|
|
722
|
-
overwrites them and the inbox; set `VIGILBASE_CHECKUP_LOCAL_DIR` to use
|
|
723
|
-
another directory.
|
|
724
|
-
- **CLI config** is a persistent `~/.config/vigilbase-checkup-local/` (`cli/`
|
|
725
|
-
with your cf, `fake-cf/` with the fake), separate from `~/.config/vigilbase`:
|
|
726
|
-
the managed cf install happens once, and dev checkups never mix with real
|
|
727
|
-
ones. The read-only cf profile itself is cf's, shared with real runs. Clean
|
|
728
|
-
up with `pnpm dev:checkup-local -- logout` (deletes that profile and the
|
|
729
|
-
managed cf) and `rm -rf ~/.config/vigilbase-checkup-local`.
|
|
730
|
-
|
|
731
|
-
Ctrl-C stops everything: no server keeps running after the command exits.
|
package/ONE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vigilbase One CLI reference
|
|
2
2
|
|
|
3
|
-
Log in with `vigilbase login
|
|
3
|
+
Log in with `vigilbase login` (signing in isn't supported on Windows yet). These command groups use the configured One origin (`--one-url`, `VIGILBASE_ONE_URL`, default `https://one.vigilbase.com`) and your saved sign-in. Every operation in this reference sends GET. Customer, organization, role, and integration access remains enforced by One; selecting an ID never grants access.
|
|
4
4
|
|
|
5
5
|
Use `--json` to retain the complete API response and pagination metadata. Plain/pretty output shows all fields as an indented tree, including null/unknown metrics, degraded status, totals, and cursors. `--timeout <milliseconds>` controls request timeouts. No command automatically follows pagination. Only documented flags are accepted; unrelated flags fail before authentication or network requests.
|
|
6
6
|
|
|
@@ -12,6 +12,7 @@ vigilbase monitoring status CUSTOMER_UUID --light
|
|
|
12
12
|
vigilbase monitoring history CUSTOMER_UUID --range 7d --region ams
|
|
13
13
|
vigilbase orgs members
|
|
14
14
|
vigilbase support tickets --all --limit 100
|
|
15
|
+
vigilbase support tickets --customer-id CUSTOMER_UUID
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
Replace uppercase placeholders with IDs from the corresponding list. Customer, report, Vigil investigation, and monitoring target IDs must be UUIDs. Organization IDs may contain letters, digits, underscores, and hyphens (maximum 256 characters).
|
|
@@ -87,13 +88,11 @@ A successful health response may describe an unconfigured backend or unknown pro
|
|
|
87
88
|
## Support
|
|
88
89
|
|
|
89
90
|
```sh
|
|
90
|
-
vigilbase support tickets [--all] [--limit 1..100] [--json]
|
|
91
|
+
vigilbase support tickets [--all] [--limit 1..100] [--customer-id <uuid>] [--json]
|
|
91
92
|
```
|
|
92
93
|
|
|
93
|
-
`vigilbase support` also defaults to `tickets`. Maps to GET `/api/support/tickets?includeAll=true&limit=N`; omitted flags omit their query parameters. Requires `support:access`.
|
|
94
|
+
`vigilbase support` also defaults to `tickets`. Maps to GET `/api/support/tickets?includeAll=true&limit=N&customerId=UUID`; omitted flags omit their query parameters. Requires `support:access`. Without `--customer-id`, the API uses the current organization's customer and its Pylon account. Vigilbase staff must choose the customer with `--customer-id <uuid>` (a UUID from `vigilbase customers list`); One checks your access to it. Without it, One answers HTTP 400 and the CLI prints `Request failed (HTTP 400).` with the hint `Vigilbase staff: add --customer-id <uuid>.` Open tickets are returned by default; `--all` includes closed tickets. Limit defaults to 50. An account with no customer or no Pylon link returns an empty list with the API's explanation. `hasMore` is preserved, but this API exposes no cursor pagination. The API may rate-limit requests or return 503 when Pylon is unavailable.
|
|
94
95
|
|
|
95
96
|
## Related commands and validation
|
|
96
97
|
|
|
97
|
-
See [README.md](README.md) for
|
|
98
|
-
|
|
99
|
-
The test suite validates argument rejection, auth failures, tenant ID encoding, API errors, response rendering, and read transport. `pnpm --filter @vigilbase/cli smoke:commands` builds the actual binary and exercises each named operation against independently authored local HTTP fixtures in `scripts/fixtures/one.mjs`. This verifies the binary, argument parser, credential store, HTTP request, and JSON/text output without writing production data. These fixtures do not assert deployed provider availability or that a particular production user has permissions.
|
|
98
|
+
See [README.md](https://app.unpkg.com/@vigilbase/cli@0.2.2/files/README.md) for sign-in and configuration, [COMMANDS.md](https://app.unpkg.com/@vigilbase/cli@0.2.2/files/COMMANDS.md) for account, billing, public scanners, run history and Watchdog, [CLOUDFLARE.md](https://app.unpkg.com/@vigilbase/cli@0.2.2/files/CLOUDFLARE.md) for `cf`/`cloudflare`, and [SECURITY.md](https://app.unpkg.com/@vigilbase/cli@0.2.2/files/SECURITY.md) for security commands. The read operations above do not replace the existing explicitly confirmed write commands.
|