@verirun/cli 0.1.0 → 0.2.1

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/man/verirun.1 CHANGED
@@ -1,5 +1,5 @@
1
1
  .\" Manpage for verirun.
2
- .TH VERIRUN 1 "2026-09-03" "verirun 0.1.0" "User Commands"
2
+ .TH VERIRUN 1 "2026-09-20" "verirun 0.2.1" "User Commands"
3
3
  .\" -------------------------------------------------------------------
4
4
  .SH NAME
5
5
  verirun \- record a browser workflow, replay it, and capture the backend logs it produced
@@ -23,6 +23,8 @@ verirun \- record a browser workflow, replay it, and capture the backend logs it
23
23
  .B verirun run
24
24
  .I name
25
25
  .RB [ \-\-headed ]
26
+ .RB [ \-\-slow\-mo
27
+ .IR ms ]
26
28
  .RB [ \-\-user
27
29
  .IR id ]
28
30
  .RB [ \-\-channel
@@ -30,6 +32,15 @@ verirun \- record a browser workflow, replay it, and capture the backend logs it
30
32
  .RB [ \-\-cdp
31
33
  .IR url ]
32
34
  .br
35
+ .B verirun map
36
+ .RB [ \-\-json ]
37
+ .RB [ \-\-report ]
38
+ .RB [ \-\-reach ]
39
+ .RB [ \-\-bfs
40
+ .IR node ]
41
+ .RB [ \-\-depth
42
+ .IR n ]
43
+ .br
33
44
  .B verirun log
34
45
  .RI [ vercel | supabase | railway ]
35
46
  .RB [ \-\-reconnect ]
@@ -45,8 +56,14 @@ verirun \- record a browser workflow, replay it, and capture the backend logs it
45
56
  .br
46
57
  .B verirun whoami
47
58
  .br
59
+ .B verirun workflow check
60
+ .I name
61
+ .RB [ \-\-json ]
62
+ .br
48
63
  .B verirun agent
49
64
  .RB [ \-\-json ]
65
+ .RB [ \-\-skill
66
+ .RB [ \-\-install ]]
50
67
  .\" -------------------------------------------------------------------
51
68
  .SH DESCRIPTION
52
69
  .B verirun
@@ -94,6 +111,26 @@ or
94
111
  .B failed
95
112
  status. A replay failure still writes the file and sets exit status 1.
96
113
  .TP
114
+ .B map
115
+ Read this repository's React/TypeScript source and build an
116
+ .B interaction graph
117
+ \(em one node per page (routes come from
118
+ .B <Routes>
119
+ or a Next.js
120
+ .B app/**/page.tsx
121
+ tree), the interactive elements on it, the pages each one navigates to, and
122
+ the backend calls each one makes. Components a page renders from another file
123
+ are followed, so a page whose real UI lives in a child component is not empty.
124
+ Nothing is executed and no browser is started. With no flag it prints a
125
+ per-page summary;
126
+ .B \-\-json
127
+ emits the whole graph,
128
+ .B \-\-report
129
+ writes it next to a coverage report, and
130
+ .B \-\-bfs
131
+ walks outward from one page. Import aliases are read from
132
+ .IR tsconfig.json .
133
+ .TP
97
134
  .BR "log " [ \fIsource\fR ]
98
135
  With no source, print which log sources are configured. With
99
136
  .BR vercel ,
@@ -102,6 +139,10 @@ or
102
139
  .BR railway ,
103
140
  run that source's interactive connect flow and write its block of
104
141
  .IR .verirun/config.json .
142
+ Each flow is the same shape: paste an API token, pick the project, and the CLI
143
+ checks it by pulling a few recent log lines. Vercel additionally reads
144
+ .I .vercel/project.json
145
+ when the repo is linked, in which case it asks nothing after the token.
105
146
  .TP
106
147
  .B login
107
148
  Connect this machine to your Verirun account. Prints a short code and a link;
@@ -114,6 +155,20 @@ Disconnect this machine and revoke its device token on the server.
114
155
  .B whoami
115
156
  Show the connected account, plan, seat use, and subscription status.
116
157
  .TP
158
+ .BR "workflow check " \fIname\fR
159
+ Validate a workflow file without running it: JSON shape, schema version, known
160
+ actions, a
161
+ .I selector
162
+ where the action needs one, and the required
163
+ .I params
164
+ per action. It also warns when a
165
+ .B navigate
166
+ appears after the first step: walking the app by URL skips the UI, so a dead
167
+ link or a button that stopped submitting still passes. Static only \(em it
168
+ never opens a browser, so it cannot tell you a selector matches the live page. Use it after writing a workflow by hand or from
169
+ .BR "verirun map" ,
170
+ then run it for the real answer. Non-zero exit if anything is an error.
171
+ .TP
117
172
  .B agent
118
173
  Print a compact, self-contained reference for an AI coding agent: every
119
174
  command and flag (read from the CLI itself, so it never drifts), the
@@ -130,6 +185,7 @@ for a machine-readable form. Pipe it into your agent's context, e.g.
130
185
  .nf
131
186
 
132
187
  verirun agent > .verirun/AGENT.md
188
+ verirun agent --skill --install # Claude Code picks it up automatically
133
189
 
134
190
  .fi
135
191
  .RE
@@ -175,6 +231,13 @@ in config.
175
231
  Overwrite an existing workflow of the same name.
176
232
  .SS run
177
233
  .TP
234
+ .BI "\-\-slow\-mo " ms
235
+ Pause this long before each action. Defaults to 500 ms with
236
+ .BR \-\-headed ,
237
+ so a watched run is followable, and to 0 otherwise. Pass
238
+ .B \-\-slow\-mo 0
239
+ to watch at full speed, or a larger value to follow a fast form more easily.
240
+ .TP
178
241
  .B \-\-headed
179
242
  Show the browser window instead of running headless.
180
243
  .TP
@@ -213,12 +276,16 @@ identifier; for Vercel it is applied after delivery.
213
276
  Re-run the connect flow and replace what was saved. Any source.
214
277
  .TP
215
278
  .B \-\-test
216
- .RB ( supabase " / " railway )
217
- Query the last 5 minutes and print the row count per source, or the error.
218
- Non-zero exit if it errored.
279
+ Query the last 5 minutes and print what came back, or the error. Non-zero exit
280
+ if it errored.
219
281
  .TP
220
- .B \-\-listen
282
+ .B \-\-drain
221
283
  .RB ( vercel )
284
+ Set up the old push-based Log Drain \(em a tunnel plus a local listener \(em
285
+ instead of the API. Only needed if the runtime-log API is unavailable to you.
286
+ .TP
287
+ .B \-\-listen
288
+ .RB ( vercel ", drain mode)"
222
289
  Start the Log Drain listener now and keep it running until interrupted,
223
290
  printing each delivery. Use it for the dashboard's endpoint-verification step
224
291
  and for live tailing.
@@ -233,10 +300,82 @@ Account server base URL. Default
233
300
  .IR https://get\-verirun.duely.in .
234
301
  Also settable with
235
302
  .BR VERIRUN_LICENSE_SERVER .
303
+ .SS "map"
304
+ .TP
305
+ .BR \-d ", " \-\-dir " " \fIdir\fR
306
+ Analyze this directory instead of the repo root.
307
+ .TP
308
+ .B \-\-json
309
+ Print the full interaction graph as JSON on stdout.
310
+ .TP
311
+ .B \-\-report
312
+ Write
313
+ .I interaction-tree.json
314
+ and
315
+ .I coverage.md
316
+ to
317
+ .I .verirun/map
318
+ (or
319
+ .BR \-\-out ).
320
+ .TP
321
+ .BI "\-\-out " dir
322
+ Output directory for
323
+ .BR \-\-report .
324
+ .TP
325
+ .B \-\-reach
326
+ Print a per-route table of reachable versus attached elements \(em how much of
327
+ each page's surface the graph actually captured.
328
+ .TP
329
+ .BI "\-\-bfs " node
330
+ Walk the graph breadth-first from a node: a route path
331
+ .RB ( /account ),
332
+ a page id
333
+ .RB ( page:/account ),
334
+ or a page component name. Each node is reported once, at its shortest
335
+ distance.
336
+ .TP
337
+ .BI "\-\-depth " n
338
+ Steps to follow for
339
+ .BR \-\-bfs .
340
+ Default 2.
341
+ .TP
342
+ .BI "\-\-kind " "nav|effect"
343
+ Follow only navigation edges, or only backend-effect edges.
344
+ .TP
345
+ .BI "\-\-alias " "prefix=dir"
346
+ Extra import alias, e.g.
347
+ .BR @/=src .
348
+ Repeatable. Aliases in
349
+ .I tsconfig.json
350
+ are picked up automatically.
351
+ .TP
352
+ .B \-\-no\-follow\-children
353
+ Do not follow child components out of a page file \(em only that file's own
354
+ elements.
355
+ .TP
356
+ .BI "\-\-app\-file " file
357
+ The file declaring
358
+ .B <Routes>
359
+ for a react-router app. Auto-detected by default.
360
+ .SS "workflow"
361
+ .TP
362
+ .B \-\-json
363
+ Emit the findings as JSON instead of a report.
236
364
  .SS "agent"
237
365
  .TP
238
366
  .B \-\-json
239
367
  Emit JSON instead of Markdown.
368
+ .TP
369
+ .B \-\-skill
370
+ Emit the reference as a Claude Code skill file (YAML frontmatter plus body)
371
+ rather than plain Markdown.
372
+ .TP
373
+ .B \-\-install
374
+ With
375
+ .BR \-\-skill ,
376
+ write it to
377
+ .I .claude/skills/verirun/SKILL.md
378
+ in the repo instead of standard output.
240
379
  .\" -------------------------------------------------------------------
241
380
  .SH FILES
242
381
  .TP
@@ -244,7 +383,10 @@ Emit JSON instead of Markdown.
244
383
  Per-project config: log sources, the user filter, the test-id attribute.
245
384
  Written by the
246
385
  .B verirun log
247
- connect flows (mode 0600); read otherwise.
386
+ connect flows, restricted to the current user \(em mode 0600 on macOS and Linux,
387
+ an
388
+ .BR icacls (1)
389
+ ACL on Windows, where mode bits are not an access control. Read otherwise.
248
390
  .TP
249
391
  .I <repo>/.verirun/workflows/<name>.json
250
392
  A recorded workflow.
@@ -261,6 +403,12 @@ and the license server URL.
261
403
  .TP
262
404
  .I ~/.verirun/state.json
263
405
  The last server-signed license lease plus a local tamper check.
406
+ .PP
407
+ The
408
+ .I ~/.verirun
409
+ directory and both files in it are restricted to the current user by the same
410
+ rule as
411
+ .IR .verirun/config.json .
264
412
  .\" -------------------------------------------------------------------
265
413
  .SH ENVIRONMENT
266
414
  .TP
@@ -276,6 +424,11 @@ Supabase Management API token; overrides
276
424
  .B supabase.accessToken
277
425
  and is never written to the config file.
278
426
  .TP
427
+ .B VERIRUN_VERCEL_TOKEN
428
+ Vercel API token, replacing
429
+ .IR vercel.token .
430
+ Create one at vercel.com/account/settings/tokens.
431
+ .TP
279
432
  .B VERIRUN_VERCEL_DRAIN_SECRET
280
433
  Vercel Log Drain signing secret; overrides
281
434
  .BR vercel.drainSecret .
@@ -352,6 +505,41 @@ use
352
505
  and
353
506
  .B verirun \fIcommand\fB \-\-help
354
507
  there, or read this page under WSL, Git Bash, or MSYS2.
508
+ .PP
509
+ A
510
+ .B \-\-user\-data\-dir
511
+ profile must be created by hand and signed in there once, because identity
512
+ providers refuse an automation\-launched browser. On macOS and Linux launch
513
+ Chrome with
514
+ .B \-\-password\-store=basic
515
+ (plus
516
+ .B \-\-use\-mock\-keychain
517
+ on macOS), which is what Playwright itself uses \(em without them the
518
+ keyring\-encrypted cookies cannot be decrypted and the run silently starts
519
+ logged out. Both switches are Unix\-only and are ignored on Windows; there,
520
+ create the profile as the same Windows user that runs
521
+ .BR verirun .
522
+ The Windows path is untested. On every platform, use a dedicated profile rather
523
+ than your everyday one.
524
+ .PP
525
+ .B \-\-user\-data\-dir
526
+ is passed through to Playwright unchanged \(em
527
+ .B verirun
528
+ never expands a leading
529
+ .BR ~ .
530
+ On macOS and Linux the shell expands it first; cmd and PowerShell do not, so on
531
+ Windows give an absolute path or you will get a directory named
532
+ .BR ~ .
533
+ .PP
534
+ A workflow name becomes a filename, so two Windows restrictions are enforced on
535
+ every platform: a name may not end in a dot (Windows drops it, colliding with
536
+ the bare name), and its stem may not be a reserved device name
537
+ .RB ( con ", " prn ", " aux ", " nul ", " com1
538
+ to
539
+ .BR com9 ", " lpt1
540
+ to
541
+ .BR lpt9 )
542
+ at any extension. An invalid name is an error, never silently rewritten.
355
543
  .\" -------------------------------------------------------------------
356
544
  .SH SEE ALSO
357
545
  Full documentation in the bundled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verirun/cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,6 +14,7 @@
14
14
  "files": [
15
15
  "dist/cli.js",
16
16
  "dist/gate.mjs",
17
+ "dist/graph.mjs",
17
18
  "man/verirun.1",
18
19
  "README.md",
19
20
  "LICENSE"
@@ -27,16 +28,22 @@
27
28
  "typecheck": "tsc -p tsconfig.json --noEmit",
28
29
  "prepack": "npm run build",
29
30
  "postinstall": "playwright install chromium",
30
- "verirun": "node dist/cli.js"
31
+ "verirun": "node dist/cli.js",
32
+ "test": "node --import tsx --test \"test/**/*.test.ts\""
31
33
  },
32
34
  "dependencies": {
35
+ "@babel/parser": "^7.26.3",
36
+ "@babel/traverse": "^7.26.4",
37
+ "@babel/types": "^7.26.3",
33
38
  "commander": "^12.1.0",
34
39
  "playwright": "~1.62.0"
35
40
  },
36
41
  "devDependencies": {
42
+ "@types/babel__traverse": "^7.20.6",
37
43
  "@types/node": "^22.10.0",
38
44
  "esbuild": "^0.28.2",
39
45
  "javascript-obfuscator": "^5.6.0",
46
+ "tsx": "^4.19.2",
40
47
  "typescript": "^5.7.0"
41
48
  }
42
49
  }