Skip to content

Quick start: a local review in five minutes

This guide uses a clone of the repository and its sample shop, whose pull requests have known outcomes. To use Yomorai on your own site, start with the tutorial instead. Everything here runs on your machine; nothing is deployed and no account is needed. Every output below was copied from a real session (paths shortened).

You need Node 26 (the repository’s .nvmrc) and pnpm 10.

Terminal window
git clone https://github.com/shashikanth-a/yomorai.git && cd yomorai
pnpm install
pnpm exec playwright install chromium

From the clone the CLI runs as node apps/cli/src/bin.ts, which loads the TypeScript sources and works from any directory. Below, yomorai means that command; an alias saves typing (the published package, npx yomorai, works the same for every command except the sample-shop scripts):

Terminal window
alias yomorai="node $PWD/apps/cli/src/bin.ts"

The repository contains a small storefront (apps/sample-app) and nine variants of it in fixtures/variants/, each a pull request with a known outcome. This builds the baseline and one variant, serves both locally and reviews one against the other:

Terminal window
pnpm tsx scripts/review-variant.ts functional-regression
functional-regression succeeded 14.0s
conclusion failure partial false [] cost 0.00035
intent routes /products:direct | uncertainty medium
scenarios sc-visit-products-desktop-1440[compared] sc-control-products-open-filters-desktop-1440[compared] sc-select-products-sort-by-desktop-1440[compared]
4x accessibility | focus_stop_removed | /products | inconclusive | info |
4x dom | missing_control | /products | inconclusive | info |
1x dom | missing_heading | /products | inconclusive | info |
2x dom | structure_change | /products | inconclusive | info |
5x dom | text_change | /products | environmental_difference | info | masked_dynamic
2x functional | broken_modal | /products | confirmed_regression | high |
1x visual | missing_element | /products | inconclusive | info |
gaps 0 []
expected [{"category":"functional","kinds":["broken_modal"],"route":"/products","classification":"confirmed_regression"}]
prod mutating 0

What this says: the “Open filters” dialog no longer opens in the preview, a deterministic failure observed with complete evidence in both environments, so the gate classifies it as a confirmed regression of severity high. The clock in the footer differs between the two loads; it is recognised as dynamic content and classified as an environmental difference. The missing dialog’s contents are reported as inconclusive consequences of the failed interaction. prod mutating 0: no request that could change data reached the production server. cost is the metered cost in US dollars at the built-in price table.

The other variants are intended-visual, visual-regression, a11y-regression, form-regression, perf-regression, runtime-error and noise-only.

Point the CLI at any two deployments: https, or http on localhost / 127.0.0.1. To try it without deployments, serve two builds of the sample application:

Terminal window
node apps/sample-app/scripts/build-variant.mjs baseline --out /tmp/yq/baseline
node apps/sample-app/scripts/build-variant.mjs functional-regression --out /tmp/yq/preview
node apps/sample-app/server/serve.mjs --dir /tmp/yq/baseline --port 4173 &
node apps/sample-app/server/serve.mjs --dir /tmp/yq/preview --port 4174 &

Then, from an empty directory:

Terminal window
yomorai review --production http://127.0.0.1:4173 --preview http://127.0.0.1:4174 --routes /products --no-models

Progress goes to stderr, one line per stage:

[discover_deployments] running
[discover_deployments] succeeded
...
[measure_performance] skipped - no routes are configured for performance measurement
[describe_visual] skipped - no visual model is configured
...
[publish] succeeded
note: No configuration file was found; a minimal built-in configuration was used (routes: /products).
note: Added http://127.0.0.1:4173 to the production origin allowlist for this run.
note: Added http://127.0.0.1:4174 to the preview origin allowlist for this run.
note: The intent of this change is unknown: no pull request was read. Differences cannot be matched to an intended change.
note: Models were not used (--no-models): findings rest on deterministic analysis only.

The report goes to stdout:

■ Changes need attention - 2 confirmed regressions and 0 unintended changes were found; at least one is at or above the failing threshold.
Findings (19)
ID SEVERITY CLASSIFICATION CATEGORY ROUTE VIEWPORT OBSERVED
F-016 high ■ Confirmed regression functional /products desktop-1440 step 1 (click role=button[name="Open filters"]) leaves a dialog open in production and no…
F-017 high ■ Confirmed regression functional /products desktop-1440 step 2 (checkpoint) leaves a dialog open in production and no dialog in preview
F-002 info ◌ Inconclusive visual /products desktop-1440 After the failed interaction: <div> is visible in production and absent in preview
...
F-001 info ≈ Environmental difference dom /products desktop-1440 Text of [data-testid="now"] changed from "06:17:03" to "06:16:59"
...
Ignored runtime events: 0 Masked regions: 1 Test candidates: 0
Cost: $0.0003
Exit code: 1 (findings at or above the failing threshold)

The run took 15 seconds. Without --pr the intent is unknown, so nothing can be classified as an intended change; with --pr <n> --repo owner/name and GITHUB_TOKEN set, the CLI reads the pull request’s title, description and diff from GitHub.

Reviews are stored in .yomorai/data of the working directory (SQLite and an evidence folder):

Terminal window
yomorai status rev_1m8nhjy2ydhb3v493a6
yomorai findings rev_1m8nhjy2ydhb3v493a6 --severity high
yomorai evidence export rev_1m8nhjy2ydhb3v493a6 --out review.tar
yomorai audit verify
Review rev_1m8nhjy2ydhb3v493a6 · local/review#0 @ b54fd73a6534
State: succeeded
Conclusion: failure
Findings: 5 environmental_difference, 12 inconclusive, 2 confirmed_regression
...
Wrote review.tar (2296832 bytes, 100 manifest entries).
Verified: every file matches the hash in the manifest.
Audit log intact: 4 record(s) verified.
Code review means
0 Completed; no confirmed regression or unintended change at or above report.failOn (default high)
1 Completed, and at least one such finding exists
2 Configuration, input or authorization error (bad flag, invalid configuration, unknown review)
3 Incomplete: the review failed, was cancelled, ran out of budget, or (remote) waits for approval

Exit 0 is not “nothing changed”: inconclusive findings and a partial review still exit 0. Read the conclusion (success, neutral, failure) and the partial flag in the report or in --json output. All commands: CLI reference.

Without a file the CLI uses a minimal built-in configuration: the two origins you passed, the routes you named and the desktop-1440 viewport. To control more, create one:

Terminal window
yomorai init
Wrote .../yomorai.config.yaml
Wrote .../.yomorai/project.json
Edit the origins in yomorai.config.yaml, then run `yomorai doctor`.

The starter file, shortened:

version: 1
environments:
production:
origins: [https://app.example.com] # the only origins a review may open
discovery:
- type: static
url: https://app.example.com
preview:
origins: [https://preview.example.com]
discovery:
- type: github-deployments # how a deployment finds the preview
routes:
include:
- path: /
critical: true # always visited
defaultViewports: [desktop-1440, mobile-390]
report:
failOn: high # what fails the check
budgets:
perReviewUsd: 1
  • environments.*.origins is the allowlist. For a local review the origins of --production and --preview are added for that run, and the output says so.
  • discovery matters for a deployment; the CLI is given its URLs directly.
  • routes.include lists routes that are always visited. Others are visited when the change is known to affect them.
  • report.failOn is the severity at which a regression fails the review.

Check it:

Terminal window
yomorai doctor
PASS node Node 26.12.0
WARN config .../yomorai.config.yaml is valid (version f1dfebe8db0c0a64) but still has placeholder origins (example.com); edit them
PASS chromium Chromium 159.0.8154.6 launches
PASS lighthouse performance measurement is available (provider lighthouse-local-chromium)
WARN model:visual no visual model is configured; visual differences are reported without a description
WARN model:reasoning no reasoning model is configured; findings rest on deterministic analysis only
PASS tracing no trace destination is configured; tracing is off
PASS deployment no deployment is linked; reviews run locally
...
No check failed.

Every key is described in the configuration reference; complete examples are in examples/.