@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.
Files changed (235) hide show
  1. package/CLOUDFLARE.md +9 -12
  2. package/COMMANDS.md +192 -111
  3. package/LOCAL.md +77 -84
  4. package/ONE.md +5 -6
  5. package/README.md +349 -173
  6. package/SECURITY.md +6 -4
  7. package/dist/auth/device-auth.d.ts +0 -1
  8. package/dist/auth/device-auth.js +6 -5
  9. package/dist/auth/index.d.ts +1 -2
  10. package/dist/auth/index.js +1 -2
  11. package/dist/auth/provider.d.ts +1 -1
  12. package/dist/auth/provider.js +16 -7
  13. package/dist/auth/refresh.d.ts +23 -4
  14. package/dist/auth/refresh.js +78 -22
  15. package/dist/auth/store.d.ts +78 -4
  16. package/dist/auth/store.js +385 -74
  17. package/dist/auth/token-metadata.d.ts +0 -1
  18. package/dist/auth/token-metadata.js +0 -1
  19. package/dist/auth/types.d.ts +0 -1
  20. package/dist/auth/types.js +0 -1
  21. package/dist/bin.d.ts +0 -1
  22. package/dist/bin.js +0 -1
  23. package/dist/cli.d.ts +4 -2
  24. package/dist/cli.js +13 -11
  25. package/dist/commands/account.d.ts +0 -1
  26. package/dist/commands/account.js +1 -2
  27. package/dist/commands/auth.d.ts +0 -1
  28. package/dist/commands/auth.js +71 -22
  29. package/dist/commands/billing.d.ts +0 -1
  30. package/dist/commands/billing.js +0 -1
  31. package/dist/commands/cloudflare.d.ts +1 -2
  32. package/dist/commands/cloudflare.js +14 -9
  33. package/dist/commands/helpers.d.ts +0 -1
  34. package/dist/commands/helpers.js +0 -1
  35. package/dist/commands/index.d.ts +0 -1
  36. package/dist/commands/index.js +0 -1
  37. package/dist/commands/legacy-validation.d.ts +7 -2
  38. package/dist/commands/legacy-validation.js +15 -3
  39. package/dist/commands/local.d.ts +6 -1
  40. package/dist/commands/local.js +36 -12
  41. package/dist/commands/one.d.ts +0 -1
  42. package/dist/commands/one.js +39 -13
  43. package/dist/commands/public-tools.d.ts +0 -1
  44. package/dist/commands/public-tools.js +63 -29
  45. package/dist/commands/runs.d.ts +0 -1
  46. package/dist/commands/runs.js +1 -2
  47. package/dist/commands/security.d.ts +1 -2
  48. package/dist/commands/security.js +34 -23
  49. package/dist/commands/watchdog.d.ts +0 -1
  50. package/dist/commands/watchdog.js +0 -1
  51. package/dist/index.d.ts +2 -3
  52. package/dist/index.js +1 -2
  53. package/dist/lib/banner.d.ts +0 -1
  54. package/dist/lib/banner.js +0 -1
  55. package/dist/lib/client.d.ts +9 -2
  56. package/dist/lib/client.js +49 -20
  57. package/dist/lib/cloudflare-client.d.ts +0 -1
  58. package/dist/lib/cloudflare-client.js +1 -2
  59. package/dist/lib/config.d.ts +16 -3
  60. package/dist/lib/config.js +41 -14
  61. package/dist/lib/format.d.ts +2 -1
  62. package/dist/lib/format.js +19 -8
  63. package/dist/lib/help.d.ts +4 -2
  64. package/dist/lib/help.js +72 -23
  65. package/dist/lib/network.d.ts +10 -1
  66. package/dist/lib/network.js +31 -4
  67. package/dist/lib/one-client.d.ts +4 -1
  68. package/dist/lib/one-client.js +9 -3
  69. package/dist/lib/one-error-hints.d.ts +19 -0
  70. package/dist/lib/one-error-hints.js +47 -0
  71. package/dist/lib/one-operations.d.ts +0 -1
  72. package/dist/lib/one-operations.js +0 -1
  73. package/dist/lib/open-url.d.ts +0 -1
  74. package/dist/lib/open-url.js +0 -1
  75. package/dist/lib/platform.d.ts +2 -0
  76. package/dist/lib/platform.js +4 -0
  77. package/dist/lib/progress.d.ts +0 -1
  78. package/dist/lib/progress.js +0 -1
  79. package/dist/lib/security-client.d.ts +0 -1
  80. package/dist/lib/security-client.js +0 -1
  81. package/dist/lib/skill-fetch.d.ts +0 -1
  82. package/dist/lib/skill-fetch.js +0 -1
  83. package/dist/lib/system-trust.d.ts +0 -1
  84. package/dist/lib/system-trust.js +0 -1
  85. package/dist/lib/tui.d.ts +0 -1
  86. package/dist/lib/tui.js +0 -1
  87. package/dist/local/cloudflare-checkup/cf/allowlist.d.ts +0 -1
  88. package/dist/local/cloudflare-checkup/cf/allowlist.js +0 -1
  89. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.d.ts +0 -1
  90. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.js +0 -1
  91. package/dist/local/cloudflare-checkup/cf/child-env.d.ts +0 -1
  92. package/dist/local/cloudflare-checkup/cf/child-env.js +0 -1
  93. package/dist/local/cloudflare-checkup/cf/install.d.ts +0 -1
  94. package/dist/local/cloudflare-checkup/cf/install.js +0 -1
  95. package/dist/local/cloudflare-checkup/cf/locate.d.ts +0 -1
  96. package/dist/local/cloudflare-checkup/cf/locate.js +0 -1
  97. package/dist/local/cloudflare-checkup/cf/run-cf.d.ts +0 -1
  98. package/dist/local/cloudflare-checkup/cf/run-cf.js +0 -1
  99. package/dist/local/cloudflare-checkup/collector.d.ts +0 -1
  100. package/dist/local/cloudflare-checkup/collector.js +0 -1
  101. package/dist/local/cloudflare-checkup/contract.d.ts +14 -3
  102. package/dist/local/cloudflare-checkup/contract.js +9 -3
  103. package/dist/local/cloudflare-checkup/email-verification.d.ts +0 -1
  104. package/dist/local/cloudflare-checkup/email-verification.js +0 -1
  105. package/dist/local/cloudflare-checkup/errors.d.ts +4 -1
  106. package/dist/local/cloudflare-checkup/errors.js +8 -2
  107. package/dist/local/cloudflare-checkup/output.d.ts +0 -1
  108. package/dist/local/cloudflare-checkup/output.js +0 -1
  109. package/dist/local/cloudflare-checkup/prompts.d.ts +0 -1
  110. package/dist/local/cloudflare-checkup/prompts.js +0 -1
  111. package/dist/local/cloudflare-checkup/rate-budget.d.ts +0 -1
  112. package/dist/local/cloudflare-checkup/rate-budget.js +0 -1
  113. package/dist/local/cloudflare-checkup/snapshot-file.d.ts +0 -1
  114. package/dist/local/cloudflare-checkup/snapshot-file.js +5 -4
  115. package/dist/local/cloudflare-checkup/submit-client.d.ts +19 -5
  116. package/dist/local/cloudflare-checkup/submit-client.js +63 -17
  117. package/dist/local/cloudflare-checkup/terminal-ui.d.ts +0 -1
  118. package/dist/local/cloudflare-checkup/terminal-ui.js +0 -1
  119. package/dist/types.d.ts +25 -3
  120. package/dist/types.js +16 -1
  121. package/dist/version.d.ts +0 -1
  122. package/dist/version.js +0 -1
  123. package/package.json +5 -9
  124. package/dist/auth/device-auth.d.ts.map +0 -1
  125. package/dist/auth/device-auth.js.map +0 -1
  126. package/dist/auth/index.d.ts.map +0 -1
  127. package/dist/auth/index.js.map +0 -1
  128. package/dist/auth/provider.d.ts.map +0 -1
  129. package/dist/auth/provider.js.map +0 -1
  130. package/dist/auth/refresh.d.ts.map +0 -1
  131. package/dist/auth/refresh.js.map +0 -1
  132. package/dist/auth/store.d.ts.map +0 -1
  133. package/dist/auth/store.js.map +0 -1
  134. package/dist/auth/token-metadata.d.ts.map +0 -1
  135. package/dist/auth/token-metadata.js.map +0 -1
  136. package/dist/auth/types.d.ts.map +0 -1
  137. package/dist/auth/types.js.map +0 -1
  138. package/dist/bin.d.ts.map +0 -1
  139. package/dist/bin.js.map +0 -1
  140. package/dist/cli.d.ts.map +0 -1
  141. package/dist/cli.js.map +0 -1
  142. package/dist/commands/account.d.ts.map +0 -1
  143. package/dist/commands/account.js.map +0 -1
  144. package/dist/commands/auth.d.ts.map +0 -1
  145. package/dist/commands/auth.js.map +0 -1
  146. package/dist/commands/billing.d.ts.map +0 -1
  147. package/dist/commands/billing.js.map +0 -1
  148. package/dist/commands/cloudflare.d.ts.map +0 -1
  149. package/dist/commands/cloudflare.js.map +0 -1
  150. package/dist/commands/helpers.d.ts.map +0 -1
  151. package/dist/commands/helpers.js.map +0 -1
  152. package/dist/commands/index.d.ts.map +0 -1
  153. package/dist/commands/index.js.map +0 -1
  154. package/dist/commands/legacy-validation.d.ts.map +0 -1
  155. package/dist/commands/legacy-validation.js.map +0 -1
  156. package/dist/commands/local.d.ts.map +0 -1
  157. package/dist/commands/local.js.map +0 -1
  158. package/dist/commands/one.d.ts.map +0 -1
  159. package/dist/commands/one.js.map +0 -1
  160. package/dist/commands/public-tools.d.ts.map +0 -1
  161. package/dist/commands/public-tools.js.map +0 -1
  162. package/dist/commands/runs.d.ts.map +0 -1
  163. package/dist/commands/runs.js.map +0 -1
  164. package/dist/commands/security.d.ts.map +0 -1
  165. package/dist/commands/security.js.map +0 -1
  166. package/dist/commands/watchdog.d.ts.map +0 -1
  167. package/dist/commands/watchdog.js.map +0 -1
  168. package/dist/index.d.ts.map +0 -1
  169. package/dist/index.js.map +0 -1
  170. package/dist/lib/banner.d.ts.map +0 -1
  171. package/dist/lib/banner.js.map +0 -1
  172. package/dist/lib/client.d.ts.map +0 -1
  173. package/dist/lib/client.js.map +0 -1
  174. package/dist/lib/cloudflare-client.d.ts.map +0 -1
  175. package/dist/lib/cloudflare-client.js.map +0 -1
  176. package/dist/lib/config.d.ts.map +0 -1
  177. package/dist/lib/config.js.map +0 -1
  178. package/dist/lib/format.d.ts.map +0 -1
  179. package/dist/lib/format.js.map +0 -1
  180. package/dist/lib/help.d.ts.map +0 -1
  181. package/dist/lib/help.js.map +0 -1
  182. package/dist/lib/network.d.ts.map +0 -1
  183. package/dist/lib/network.js.map +0 -1
  184. package/dist/lib/one-client.d.ts.map +0 -1
  185. package/dist/lib/one-client.js.map +0 -1
  186. package/dist/lib/one-operations.d.ts.map +0 -1
  187. package/dist/lib/one-operations.js.map +0 -1
  188. package/dist/lib/open-url.d.ts.map +0 -1
  189. package/dist/lib/open-url.js.map +0 -1
  190. package/dist/lib/progress.d.ts.map +0 -1
  191. package/dist/lib/progress.js.map +0 -1
  192. package/dist/lib/security-client.d.ts.map +0 -1
  193. package/dist/lib/security-client.js.map +0 -1
  194. package/dist/lib/skill-fetch.d.ts.map +0 -1
  195. package/dist/lib/skill-fetch.js.map +0 -1
  196. package/dist/lib/system-trust.d.ts.map +0 -1
  197. package/dist/lib/system-trust.js.map +0 -1
  198. package/dist/lib/tui.d.ts.map +0 -1
  199. package/dist/lib/tui.js.map +0 -1
  200. package/dist/local/cloudflare-checkup/cf/allowlist.d.ts.map +0 -1
  201. package/dist/local/cloudflare-checkup/cf/allowlist.js.map +0 -1
  202. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.d.ts.map +0 -1
  203. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.js.map +0 -1
  204. package/dist/local/cloudflare-checkup/cf/child-env.d.ts.map +0 -1
  205. package/dist/local/cloudflare-checkup/cf/child-env.js.map +0 -1
  206. package/dist/local/cloudflare-checkup/cf/install.d.ts.map +0 -1
  207. package/dist/local/cloudflare-checkup/cf/install.js.map +0 -1
  208. package/dist/local/cloudflare-checkup/cf/locate.d.ts.map +0 -1
  209. package/dist/local/cloudflare-checkup/cf/locate.js.map +0 -1
  210. package/dist/local/cloudflare-checkup/cf/run-cf.d.ts.map +0 -1
  211. package/dist/local/cloudflare-checkup/cf/run-cf.js.map +0 -1
  212. package/dist/local/cloudflare-checkup/collector.d.ts.map +0 -1
  213. package/dist/local/cloudflare-checkup/collector.js.map +0 -1
  214. package/dist/local/cloudflare-checkup/contract.d.ts.map +0 -1
  215. package/dist/local/cloudflare-checkup/contract.js.map +0 -1
  216. package/dist/local/cloudflare-checkup/email-verification.d.ts.map +0 -1
  217. package/dist/local/cloudflare-checkup/email-verification.js.map +0 -1
  218. package/dist/local/cloudflare-checkup/errors.d.ts.map +0 -1
  219. package/dist/local/cloudflare-checkup/errors.js.map +0 -1
  220. package/dist/local/cloudflare-checkup/output.d.ts.map +0 -1
  221. package/dist/local/cloudflare-checkup/output.js.map +0 -1
  222. package/dist/local/cloudflare-checkup/prompts.d.ts.map +0 -1
  223. package/dist/local/cloudflare-checkup/prompts.js.map +0 -1
  224. package/dist/local/cloudflare-checkup/rate-budget.d.ts.map +0 -1
  225. package/dist/local/cloudflare-checkup/rate-budget.js.map +0 -1
  226. package/dist/local/cloudflare-checkup/snapshot-file.d.ts.map +0 -1
  227. package/dist/local/cloudflare-checkup/snapshot-file.js.map +0 -1
  228. package/dist/local/cloudflare-checkup/submit-client.d.ts.map +0 -1
  229. package/dist/local/cloudflare-checkup/submit-client.js.map +0 -1
  230. package/dist/local/cloudflare-checkup/terminal-ui.d.ts.map +0 -1
  231. package/dist/local/cloudflare-checkup/terminal-ui.js.map +0 -1
  232. package/dist/types.d.ts.map +0 -1
  233. package/dist/types.js.map +0 -1
  234. package/dist/version.d.ts.map +0 -1
  235. package/dist/version.js.map +0 -1
package/LOCAL.md CHANGED
@@ -1,50 +1,69 @@
1
1
  # Local Cloudflare Checkup reference
2
2
 
3
- The local mode of <https://vigilbase.com/tools/cloudflare-checkup?mode=local>
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 token mode. Results are
8
- labelled **self-reported**; they go to your verified work email, and the
9
- results page opens in your browser.
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](./CLOUDFLARE.md)); `vigilbase cloudflare-checkup` runs on
13
- your machine and needs no Vigilbase login.
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 (the checkup page shows the same command):
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 for your work email (`Work email for your results:`), and
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
- 3. Finds Cloudflare's `cf`. If none is usable (including a newer cf that
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
- 4. Signs in to Cloudflare with a **read-only** cf login (your browser opens) if
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
- 5. Lets you choose the account (one account is used as is; several get a
59
+ 6. Lets you choose the account (one account is used as is; several get a
41
60
  list to choose from).
42
- 6. Collects with read-only cf commands, at most 900 requests per 5 minutes.
43
- 7. Saves the snapshot to `~/.config/vigilbase/checkups/…` (mode 0600) and
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
- 8. Asks `Results go to j***@acme.com. Upload 182 KB to https://vigilbase.com? [y/N]`
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
- 9. Prints the results link and opens it in your browser.
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), then Node, then that its questions can be answered: on a
141
- terminal, or with `--yes` without one (`--confirm` answers only the upload
142
- question, not installing cf), so no code is emailed for a run that could not
143
- install cf or confirm the upload. It verifies your email before cf runs, and
144
- checks that the snapshot location is writable before collecting, so a long
145
- collection is never wasted.
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 vigilbase.com sends or
168
- checks the code, while the session is checked, while cf is found, checked and
169
- installed, and while the upload is scored; a progress bar runs while
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
- `POST …/request` and `POST …/verify` (the email verification, JSON bodies,
280
- no credential), then `GET` of the session and `POST …/snapshot`, authorised
281
- by the session code the verification returned. The upload is the exact bytes
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, verifies your
403
- email like the one command, then uploads a snapshot collected earlier
404
- (accepted for 24 hours) and prints the results link.
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 cf 1.0.0-beta.13;
547
- whether they suffice for every read is confirmed before launch):
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: use the browser token mode. |
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` | Use the browser token mode. |
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` | Use the browser token mode, or try later. |
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. pnpm and
680
- Volta global installs are found automatically; otherwise pass `--cf-bin` as
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`. These command groups use the configured One origin (`--one-url`, `VIGILBASE_ONE_URL`, default `https://one.vigilbase.com`) and the saved device-login credential. Every operation in this reference sends GET. Customer, organization, role, and integration access remains enforced by One; selecting an ID never grants access.
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`. The API identifies the current organization and its Pylon account. Open tickets are returned by default; `--all` includes closed tickets. Limit defaults to 50. An unlinked account 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
+ `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 login, account, billing, public scanners, run history, Watchdog, Cloudflare (`cf`/`cloudflare`), and security command references. The read operations above do not replace the existing explicitly confirmed write commands.
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.