Getting Started
Prerequisites
Section titled “Prerequisites”- Node.js 20+ —
node --versionto check. That’s the whole list. - The first run downloads Chromium (~130MB, one-time, cached in
~/.cache/ms-playwright).
Install the CLI
Section titled “Install the CLI”npm install -g verfixOr use it without installing globally:
npx verfix initVerify the installation:
verfix --versionInit your project
Section titled “Init your project”Run this inside your web app’s directory:
cd your-react-appnpx verfix initThe interactive wizard will:
- Detect your app’s base URL (e.g.
http://localhost:3000) - Ask which mode to use — default
strict(fully deterministic, no AI key needed) - Ask for an AI key only if you picked
assisted/exploratory - Make sure Chromium is available (downloads it once if missing)
- Write an empty
verfix.config.json(flows: []) in your project root - Generate or update
AGENTS.md(plus a.verfix/INSTRUCTIONS.mdreference file) so coding agents know how to use Verfix
There is no runtime to start and nothing to keep running — verfix run executes the browser
engine in-process and exits when it’s done.
Write your first flow
Section titled “Write your first flow”verfix.config.json starts with an empty flows: [] — Verfix doesn’t know your app’s routes or
components, so it doesn’t guess at them. This is normally the agent’s job (read the source, find
the real selector, write the flow — see Config-First Verification),
but for a first run by hand, add one directly:
{ "baseUrl": "http://localhost:3000", "mode": "strict", "flows": [ { "id": "login", "steps": [ { "action": "navigate", "url": "/login" }, { "action": "type", "selector": "[data-testid=email]", "value": "test@example.com" }, { "action": "type", "selector": "[data-testid=password]", "value": "password123" }, { "action": "click", "selector": "[data-testid=submit]" } ], "assertions": [ { "type": "url_contains", "value": "/dashboard" }, { "type": "no_console_errors" } ] } ]}Run it
Section titled “Run it”verfix run --flow login --output jsonExample output on pass:
{ "passed": true, "failures": [], "timeline_url": null, "trace_path": ".verfix/runs/exec_abc123_trace.zip", "show_command": "verfix show exec_abc123", "duration_ms": 3120, "retry_count": 0, "exit_code": 0, "execution_id": "exec_abc123"}Example output on failure:
{ "passed": false, "failures": [ { "type": "selector_not_found", "flow": "login", "assertion": "selector_visible", "selector": "[data-testid=submit]", "detail": "Selector not found after 15000ms", "fix_hint": "Selector \"[data-testid=submit]\" not found in DOM. Add a stable data-testid or update the selector." } ], "timeline_url": null, "trace_path": ".verfix/runs/exec_xyz789_trace.zip", "show_command": "verfix show exec_xyz789", "exit_code": 1, "execution_id": "exec_xyz789"}The CLI exits 0 on pass, 1 on a verification failure, and 2 on a setup error (bad config,
missing flow, etc.) — predictable exit codes for CI and agent loops.
Inspect the recorded trace
Section titled “Inspect the recorded trace”Every run persists a full Playwright trace (screenshots, network requests, console output) plus a
JSON summary under .verfix/runs/ (newest 20 runs kept). Open the newest one:
verfix showOr a specific run by its execution id:
verfix show exec_abc123Print a run’s console log or network requests straight to the terminal instead of opening the trace viewer:
verfix show --consoleverfix show exec_abc123 --network --output jsonWhen a selector fails, dry-run replacement selectors against that run’s saved DOM snapshot in about a second — instead of paying for a full re-run per guess:
verfix probe --selector "[data-testid=submit]" --text "Welcome back"List all flows
Section titled “List all flows”verfix flowsRun all flows at once:
verfix run --output jsonCheck your setup
Section titled “Check your setup”verfix doctorChecks Node version, verfix.config.json validity, AGENTS.md, Chromium install status, and app
reachability. Docker is only checked (and only matters) if you’re using --server.
Validate your config without running anything:
verfix validateNext steps
Section titled “Next steps”- CLI Reference — all commands and flags
- Config Reference — every field in
verfix.config.json - Config-First Verification — why agents should fix flows, not source
- Agent Integration — wiring Verfix into agent workflows
- Execution Modes — when to use strict vs. assisted vs. exploratory