VT commands are exposed through rtgl vt.
Use the official Docker image for browsers and the project's pinned rtgl dependency for the CLI. After npm install --save-dev --save-exact [email protected], this alias uses the installed project version:
alias rtgl='docker run --rm -v "$(pwd):/workspace" han4wluc/rtgl:playwright-v1.57.0-rtgl-v1.1.0 node /workspace/node_modules/rtgl/cli.js'
The image default working directory is /workspace.
Use -w /workspace/<subdir> only when you need to run commands from a nested project path.
Commands
| Command | Purpose |
|---|---|
rtgl vt generate |
Build candidate pages only (no screenshot capture) |
rtgl vt screenshot |
Build candidate pages and capture candidate screenshots (can auto-start vt.service.start) |
rtgl vt report |
Compare candidate vs reference and generate report output |
rtgl vt accept |
Accept report differences as new reference images |
rtgl vt generate
rtgl vt generate [options]
Options:
| Option | Type | Description |
|---|---|---|
--concurrency <number> |
integer | Number of parallel capture workers (reserved for screenshot capture phase) |
--timeout <ms> |
integer | Global timeout used by capture runtime settings |
--wait-event <name> |
string | Set default custom browser readiness event |
--folder <path> |
repeatable string | Scope to specs under a folder prefix |
--group <section-key> |
repeatable string | Scope to one or more section keys from vt.sections |
--item <spec-path> |
repeatable string | Scope to one or more spec paths under vt/specs |
--headed |
boolean | Kept for parity; has no effect when screenshots are not captured |
Examples:
rtgl vt generate
rtgl vt generate --folder components/forms --group pages --item components/forms/login
rtgl vt screenshot
rtgl vt screenshot [options]
Options:
| Option | Type | Description |
|---|---|---|
--concurrency <number> |
integer | Number of parallel capture workers |
--timeout <ms> |
integer | Global timeout used for navigation/ready/screenshot |
--wait-event <name> |
string | Wait for a custom browser event before capture |
| `--isolation <fast | strict>` | string |
--folder <path> |
repeatable string | Scope to specs under a folder prefix |
--group <section-key> |
repeatable string | Scope to one or more section keys from vt.sections |
--item <spec-path> |
repeatable string | Scope to one or more spec paths under vt/specs |
--headed |
boolean | Run browser in headed mode (debugging) |
If vt.service.start is configured, screenshot manages the service lifecycle automatically.
Use --isolation strict for real app routes or apps that persist test state in IndexedDB.
Examples:
rtgl vt screenshot
rtgl vt screenshot --concurrency 4 --timeout 45000
rtgl vt screenshot --isolation strict
rtgl vt screenshot --wait-event app:ready
rtgl vt screenshot --folder components/forms --group pages --item components/forms/login
rtgl vt screenshot --headed
rtgl vt report
rtgl vt report [options]
Options:
| Option | Type | Description |
|---|---|---|
--compare-method <method> |
pixelmatch or md5 |
Comparison algorithm |
--color-threshold <number> |
number (0-1) | Pixel sensitivity for pixelmatch |
--diff-threshold <number> |
number (0-100) | Max diff percent to still pass |
--folder <path> |
repeatable string | Scope to screenshots under folder prefix |
--group <section-key> |
repeatable string | Scope to one or more section keys from vt.sections |
--item <spec-path> |
repeatable string | Scope to one or more spec paths under vt/specs |
report only compares existing artifacts and does not run generate or screenshot.
Examples:
rtgl vt report
rtgl vt report --compare-method md5
rtgl vt report --color-threshold 0.2 --diff-threshold 0.5
rtgl vt report --folder components/forms
rtgl vt accept
rtgl vt accept
accept uses .rettangoli/vt/report.json and copies changed candidate files into vt/reference.
Typical Pipeline
rtgl vt screenshot
rtgl vt report
# if expected changes:
rtgl vt accept