@verirun/cli 0.2.4 → 0.3.0

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,8 +1,8 @@
1
1
  .\" Manpage for verirun.
2
- .TH VERIRUN 1 "2026-09-21" "verirun 0.2.4" "User Commands"
2
+ .TH VERIRUN 1 "2026-11-15" "verirun 0.3.0" "User Commands"
3
3
  .\" -------------------------------------------------------------------
4
4
  .SH NAME
5
- verirun \- record a browser workflow, replay it, and capture the backend logs it produced
5
+ verirun \- record a browser workflow, replay it, capture the backend logs it produced, and scan a live site
6
6
  .\" -------------------------------------------------------------------
7
7
  .SH SYNOPSIS
8
8
  .B verirun
@@ -31,6 +31,22 @@ verirun \- record a browser workflow, replay it, and capture the backend logs it
31
31
  .IR channel ]
32
32
  .RB [ \-\-cdp
33
33
  .IR url ]
34
+ .RB [ \-\-dialog
35
+ .IR answer ]
36
+ .RB [ \-\-json ]
37
+ .RB [ \-\-verbose ]
38
+ .br
39
+ .B verirun scan
40
+ .I url
41
+ .RB [ \-\-max\-pages
42
+ .IR n ]
43
+ .RB [ \-\-depth
44
+ .IR n ]
45
+ .RB [ \-\-delay
46
+ .IR ms ]
47
+ .RB [ \-\-no\-browser ]
48
+ .RB [ \-\-json | \-\-md ]
49
+ .RB [ \-\-verbose ]
34
50
  .br
35
51
  .B verirun map
36
52
  .RB [ \-\-json ]
@@ -55,12 +71,16 @@ verirun \- record a browser workflow, replay it, and capture the backend logs it
55
71
  .B verirun logout
56
72
  .br
57
73
  .B verirun whoami
74
+ .RB [ \-\-json ]
58
75
  .br
59
76
  .B verirun workflow check
60
77
  .I name
61
78
  .RB [ \-\-json ]
62
79
  .br
63
80
  .B verirun agent
81
+ .RB [ \-\-topic
82
+ .IR name ]
83
+ .RB [ \-\-full ]
64
84
  .RB [ \-\-json ]
65
85
  .RB [ \-\-skill
66
86
  .RB [ \-\-install ]]
@@ -83,11 +103,22 @@ or failing that a
83
103
  .IR package.json ,
84
104
  otherwise the current directory).
85
105
  .PP
86
- .BR record " and " run
106
+ .BR record ", " run ", " map " and " scan
87
107
  require a connected Verirun account (see
88
108
  .BR login ).
89
- .BR "\-\-help" ", " "\-\-version" ", " "verirun log" ", and " "verirun agent"
109
+ .BR "\-\-help" ", " "\-\-version" ", " "verirun log" ", " "verirun workflow check" ", and " "verirun agent"
90
110
  do not.
111
+ .PP
112
+ Output is compact by default: a verdict on the first line, then only the
113
+ evidence for it. Commands that report something take
114
+ .B \-\-json
115
+ (one object on one line, carrying a
116
+ .BR schemaVersion )
117
+ and
118
+ .B \-\-verbose
119
+ for the full detail. See
120
+ .B EXIT STATUS
121
+ for the codes a script or an agent can branch on.
91
122
  .\" -------------------------------------------------------------------
92
123
  .SH COMMANDS
93
124
  .TP
@@ -98,7 +129,12 @@ click, type, navigate \(em then
98
129
  to save the sequence to
99
130
  .IR .verirun/workflows/ name .json .
100
131
  Closing without doing anything saves nothing. A text field is only captured
101
- when it loses focus, so tab out of the last field before closing.
132
+ when it loses focus, so tab out of the last field before closing. Answer any
133
+ alert, confirm or prompt dialog as usual; afterwards
134
+ .B record
135
+ asks, for each step that opened one, whether you pressed OK or Cancel, and
136
+ saves the answer on the step as
137
+ .BR \(dqdialog\(dq .
102
138
  .TP
103
139
  .BI "run " name
104
140
  Replay a recorded workflow headless (in the browser kind it was recorded in),
@@ -110,6 +146,45 @@ with the merged, time-sorted entries, a per-source summary, and an
110
146
  or
111
147
  .B failed
112
148
  status. A replay failure still writes the file and sets exit status 1.
149
+ .IP
150
+ It prints a short summary:
151
+ .B PASS
152
+ or
153
+ .B FAIL
154
+ first, on a failure the step that failed with its error and selector, then the
155
+ error-level log entries (and any carrying an HTTP 5xx status) from the run
156
+ window, with repeated lines folded into one and a count. The full entries stay
157
+ in
158
+ .IR logs.json ,
159
+ whose path is the last line.
160
+ .TP
161
+ .BI "scan " url
162
+ Crawl a live site from outside and report what is broken on it. No source, no
163
+ recording and no log source is needed. It follows same-origin links breadth
164
+ first (20 pages and 2 hops by default, up to 4 pages at a time with a pause
165
+ before each request), plus the same-origin pages the site's sitemap lists
166
+ (robots.txt
167
+ .B Sitemap:
168
+ lines, else /sitemap.xml). A request that gets no response is retried once
169
+ before it is reported; a 429 (rate limiting) is counted, not reported. It
170
+ reports, per page: JavaScript exceptions, console errors, failed requests and HTTP 4xx /
171
+ 5xx responses that belong to the site (its own origin, or an API it calls;
172
+ analytics, ad and chat-widget traffic is dropped), dead internal links,
173
+ in-page
174
+ .B #anchor
175
+ and skip-link targets that do not exist, and a missing main landmark.
176
+ .IP
177
+ The scan is strictly read-only. It only navigates: it sends GET and HEAD
178
+ requests, never clicks a button or submits a form, and never requests a link
179
+ that looks destructive (logout, sign out, delete, unsubscribe and similar). It
180
+ identifies itself as
181
+ .B VerirunScan/1.0
182
+ with a URL describing the scanner, and obeys
183
+ .IR robots.txt ,
184
+ including
185
+ .BR Crawl\-delay .
186
+ Exit status 0 when nothing was found, 1 when there are findings, 2 when the
187
+ scan could not run (unreachable, disallowed by robots.txt, not HTML).
113
188
  .TP
114
189
  .B map
115
190
  Read this repository's React/TypeScript source and build an
@@ -130,6 +205,15 @@ writes it next to a coverage report, and
130
205
  .B \-\-bfs
131
206
  walks outward from one page. Import aliases are read from
132
207
  .IR tsconfig.json .
208
+ An element whose handler calls the native
209
+ .BR alert() ", " confirm() " or " prompt()
210
+ carries a
211
+ .B dialogs
212
+ list in the graph, printed under its edge by
213
+ .B \-\-bfs
214
+ and listed in the coverage report;
215
+ .B gates
216
+ marks one whose answer changes what the click does.
133
217
  .TP
134
218
  .BR "log " [ \fIsource\fR ]
135
219
  With no source, print which log sources are configured. With
@@ -146,14 +230,16 @@ when the repo is linked, in which case it asks nothing after the token.
146
230
  .TP
147
231
  .B login
148
232
  Connect this machine to your Verirun account. Prints a short code and a link;
149
- open the link, sign in (a 7 day trial starts automatically if you are new),
150
- and enter the code. A 7 day trial needs no card.
233
+ open the link, sign in (a 3-day trial starts automatically if you are new),
234
+ and enter the code. The trial needs no card.
151
235
  .TP
152
236
  .B logout
153
237
  Disconnect this machine and revoke its device token on the server.
154
238
  .TP
155
239
  .B whoami
156
- Show the connected account, plan, seat use, and subscription status.
240
+ Show the connected account, plan, seat use, and subscription status. Exits 0
241
+ when the gated commands would run and 1 when they would not, so a script can
242
+ check the license without parsing anything.
157
243
  .TP
158
244
  .BR "workflow check " \fIname\fR
159
245
  Validate a workflow file without running it: JSON shape, schema version, known
@@ -164,30 +250,49 @@ where the action needs one, and the required
164
250
  per action. It also warns when a
165
251
  .B navigate
166
252
  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
253
+ link or a button that stopped submitting still passes. When
254
+ .I .verirun/map/interaction-tree.json
255
+ exists (from
256
+ .BR "map \-\-report" ),
257
+ it also warns about a step that clicks an element known to open a browser
258
+ dialog but has no
259
+ .B dialog
260
+ answer. Static only \(em it
168
261
  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
262
  .BR "verirun map" ,
170
- then run it for the real answer. Non-zero exit if anything is an error.
263
+ then run it for the real answer. Exit status 1 if anything is an error.
171
264
  .TP
172
265
  .B agent
173
- Print a compact, self-contained reference for an AI coding agent: every
174
- command and flag (read from the CLI itself, so it never drifts), the
175
- .B .verirun/
176
- layout, the
177
- .I logs.json
178
- schema, and the recommended record-then-run loop. It also reports what
266
+ Print a compact reference for an AI coding agent: what the tool does, the
267
+ loop to follow, how to read a result, the exit codes, and the commands an
268
+ agent drives with their flags (read from the CLI itself, so they never
269
+ drift). It also reports what
179
270
  .B this
180
271
  checkout has \(em resolved repo root, configured log sources, recorded
181
- workflows, recent runs. Markdown by default;
272
+ workflows, recent runs. Three longer sections are left out of the default and
273
+ printed on request with
274
+ .BR \-\-topic :
275
+ .B authoring
276
+ (writing a workflow file from the map),
277
+ .B signed\-in
278
+ (running behind a login) and
279
+ .B schemas
280
+ (the
281
+ .BR "run \-\-json" ,
282
+ .I logs.json
283
+ and scan report shapes).
284
+ .B \-\-full
285
+ prints everything in one document. Markdown by default;
182
286
  .B \-\-json
183
287
  for a machine-readable form. Pipe it into your agent's context, e.g.
184
288
  .RS
185
289
  .nf
186
290
 
187
- verirun agent > .verirun/AGENT.md
291
+ verirun agent --full > .verirun/AGENT.md
188
292
  verirun agent --skill --install # Claude Code: .claude/skills/verirun/SKILL.md
189
293
  verirun agent --skill --install cursor # Cursor: .cursor/rules/verirun.mdc
190
- verirun agent --skill --install all # both
294
+ verirun agent --skill --install codex # Codex: .agents/skills/verirun/SKILL.md + AGENTS.md section
295
+ verirun agent --skill --install all # all three
191
296
 
192
297
  .fi
193
298
  .RE
@@ -272,6 +377,89 @@ as
272
377
  .RB \(dq filter \(dq .
273
378
  For Supabase and Railway the filter is pushed to the query when it is a plain
274
379
  identifier; for Vercel it is applied after delivery.
380
+ .TP
381
+ .BI \-\-dialog " answer"
382
+ How to answer a browser dialog (alert, confirm, prompt, beforeunload) opened by
383
+ a step that has no saved
384
+ .B dialog
385
+ answer:
386
+ .B accept
387
+ (OK, the default) or
388
+ .B dismiss
389
+ (Cancel). A step's own answer always wins. Every dialog answered is listed in
390
+ .I logs.json
391
+ under
392
+ .RB \(dq dialogs \(dq .
393
+ .TP
394
+ .B \-\-json
395
+ Print the run summary as one JSON object (schemaVersion 1) instead of text:
396
+ .BR status ,
397
+ .BR steps ,
398
+ .B failedStep
399
+ and
400
+ .B error
401
+ on a failure, per-source counts, and
402
+ .B logs
403
+ with the error-level entries grouped and counted. Progress goes to stderr. The
404
+ .I logs.json
405
+ file is written either way and its schema is unchanged.
406
+ .TP
407
+ .B \-\-verbose
408
+ Also print each step as it replays, every distinct error line (the default
409
+ shows the 8 most frequent), and the full error text.
410
+ .SS "scan"
411
+ .TP
412
+ .BI "\-\-max\-pages " n
413
+ Stop after this many pages. Default 20.
414
+ .TP
415
+ .BI "\-\-depth " n
416
+ Follow same-origin links this many hops from the start URL. Default 2.
417
+ .TP
418
+ .BI "\-\-delay " ms
419
+ Pause before each page load, on each of the 4 parallel connections. Default
420
+ 500. A larger
421
+ .B Crawl\-delay
422
+ in robots.txt wins, and also drops the scan to one connection.
423
+ .TP
424
+ .BI "\-\-timeout " ms
425
+ Per-page load timeout. Default 20000.
426
+ .TP
427
+ .B \-\-no\-browser
428
+ Use plain HTTP instead of headless Chromium. Nothing is executed, so
429
+ JavaScript exceptions and console errors are not checked, and a page that
430
+ renders entirely client-side shows little; the report says so.
431
+ .TP
432
+ .B \-\-json
433
+ Print the report as one JSON object (schemaVersion 1):
434
+ .BR status ,
435
+ .BR summary ,
436
+ .B pages
437
+ and
438
+ .BR findings ,
439
+ each finding with its
440
+ .BR kind ,
441
+ .BR message ,
442
+ .BR evidence ,
443
+ the pages it was seen on and a count.
444
+ .TP
445
+ .B \-\-md
446
+ Print the report as Markdown, ready to paste into a reply or an issue.
447
+ .TP
448
+ .B \-\-verbose
449
+ List every finding with its evidence, and every page scanned.
450
+ .SS "record"
451
+ .TP
452
+ .B \-\-json
453
+ Print the result as JSON (schemaVersion 1); everything else goes to stderr.
454
+ .TP
455
+ .B \-\-verbose
456
+ List every recorded step after saving.
457
+ .SS "whoami"
458
+ .TP
459
+ .B \-\-json
460
+ Print the status as JSON (schemaVersion 1), including a
461
+ .B licensed
462
+ boolean.
275
463
  .SS "log"
276
464
  .TP
277
465
  .B \-\-reconnect
@@ -308,7 +496,16 @@ Also settable with
308
496
  Analyze this directory instead of the repo root.
309
497
  .TP
310
498
  .B \-\-json
311
- Print the full interaction graph as JSON on stdout.
499
+ Print the interaction graph as JSON on stdout, on one line. With
500
+ .B \-\-bfs
501
+ or
502
+ .B \-\-reach
503
+ it prints that result as JSON instead.
504
+ .TP
505
+ .B \-\-verbose
506
+ Indent the
507
+ .B \-\-json
508
+ output.
312
509
  .TP
313
510
  .B \-\-report
314
511
  Write
@@ -365,19 +562,45 @@ for a react-router app. Auto-detected by default.
365
562
  Emit the findings as JSON instead of a report.
366
563
  .SS "agent"
367
564
  .TP
565
+ .BI "\-\-topic " name
566
+ Print one on-request section:
567
+ .BR authoring ,
568
+ .B signed\-in
569
+ or
570
+ .BR schemas .
571
+ .TP
572
+ .B \-\-full
573
+ Print the reference with every on-request section included.
574
+ .TP
368
575
  .B \-\-json
369
576
  Emit JSON instead of Markdown.
370
577
  .TP
371
578
  .B \-\-skill
372
- Emit the reference as a Claude Code skill file (YAML frontmatter plus body)
579
+ Emit the reference as an agent skill file (YAML frontmatter plus body)
373
580
  rather than plain Markdown.
374
581
  .TP
375
- .B \-\-install
582
+ .BI "\-\-install " "\fR[\fPagent\fR]\fP"
376
583
  With
377
584
  .BR \-\-skill ,
378
- write it to
379
- .I .claude/skills/verirun/SKILL.md
380
- in the repo instead of standard output.
585
+ write it into the repo where the agent looks instead of standard output.
586
+ .I agent
587
+ is
588
+ .B claude
589
+ (the default):
590
+ .IR .claude/skills/verirun/SKILL.md ;
591
+ .BR cursor :
592
+ .IR .cursor/rules/verirun.mdc ;
593
+ .BR codex :
594
+ .I .agents/skills/verirun/SKILL.md
595
+ plus a section of
596
+ .I AGENTS.md
597
+ between
598
+ .B "<!\-\- verirun:start \-\->"
599
+ and
600
+ .B "<!\-\- verirun:end \-\->"
601
+ (the rest of that file is left alone, and a re-run replaces only that section); or
602
+ .B all
603
+ for every one.
381
604
  .\" -------------------------------------------------------------------
382
605
  .SH FILES
383
606
  .TP
@@ -492,23 +715,66 @@ verirun log # what is configured
492
715
  .fi
493
716
  .RE
494
717
  .PP
718
+ Scan a deployed site and paste the result into an issue:
719
+ .PP
720
+ .RS
721
+ .nf
722
+ verirun scan https://example.com \-\-md
723
+ .fi
724
+ .RE
725
+ .PP
726
+ Branch on a run in a script, reading the summary as JSON:
727
+ .PP
728
+ .RS
729
+ .nf
730
+ verirun run checkout \-\-json > run.json || echo "failed with $?"
731
+ .fi
732
+ .RE
733
+ .PP
495
734
  Hand your AI coding agent the full command + layout reference:
496
735
  .PP
497
736
  .RS
498
737
  .nf
499
- verirun agent > .verirun/AGENT.md
738
+ verirun agent \-\-full > .verirun/AGENT.md
500
739
  .fi
501
740
  .RE
502
741
  .\" -------------------------------------------------------------------
503
742
  .SH EXIT STATUS
504
743
  .TP
505
744
  .B 0
506
- Success.
745
+ The command did what it was asked and the check, if any, passed.
507
746
  .TP
508
747
  .B 1
509
- A replay step failed, a subscription check failed, or the command errored.
748
+ It ran, and what it checks failed: a replay step
749
+ .RB ( run ),
750
+ findings
751
+ .RB ( scan ),
752
+ errors in a workflow file
753
+ .RB ( "workflow check" ),
754
+ no usable license
755
+ .RB ( whoami ),
756
+ or a recording with no actions
757
+ .RB ( record ).
758
+ .TP
759
+ .B 2
760
+ It could not run: bad usage, missing setup (no such workflow, a log source
761
+ that failed to start), no license, or an unreachable target. With
762
+ .B \-\-json
763
+ the message is also printed on stdout as
764
+ .BR {"status":"error","error":{"message":...}} .
765
+ .PP
766
+ Before 0.3.0 every failure exited 1. A script that only tests for non-zero is
767
+ unaffected.
510
768
  .\" -------------------------------------------------------------------
511
769
  .SH NOTES
770
+ A workflow step can carry
771
+ .B \(dqdialog\(dq: { \(dqaction\(dq: \(dqaccept\(dq | \(dqdismiss\(dq, \(dqpromptText\(dq: \(dq...\(dq }
772
+ to fix how replay answers a dialog that step opens.
773
+ .B promptText
774
+ is what an accepted
775
+ .B prompt()
776
+ receives; without it, the prompt's default value is submitted.
777
+ .PP
512
778
  Native Windows (cmd, PowerShell) has no
513
779
  .BR man ;
514
780
  use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verirun/cli",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },