Docker-based visual regression testing with Playwright, a web UI, and optional AI analysis.
- Cross-browser capture (Chromium/WebKit) with multi-viewport baselines
- Fast review UI with diff overlays and bulk approvals
- Fullscreen viewer with multi-column mode for long pages
- Cross-compare reports (browser vs browser)
- Optional AI analysis for quick triage
- Capture consistent screenshots across browsers and viewports.
- Review diffs in a fast UI built for triage.
- Automate approvals and cross-browser comparisons.
- Built with AI assistance (Claude Opus 4.5 and Codex 5.2), reviewed and tested manually.
- Currently tested on macOS with Docker Desktop, should work elsewhere but feedback is welcome. Open issues or PRs.
- Thanks BackstopJS for the real project and inspiration!
git clone https://github.com/your-org/vrtini.git
cd vrtini
npm install
npm run build
npm linknpm install -g @your-org/vrtinicd /path/to/your/project
vrtini init
vrtini build
vrtini test
vrtini serveOpen the UI at http://127.0.0.1:4173 (or http://localhost:4173).
To expose on LAN (--host 0.0.0.0), set VRT_AUTH_TOKEN first.
If you intentionally want an unauthenticated remote bind (not recommended), set VRT_ALLOW_INSECURE_REMOTE=1.
- Minimal example:
vrt.config.minimal.json - Full reference:
vrt.config.full.json5
Key options:
browsers,viewportsscenarioDefaultsand per-scenario overridesenginesand thresholdscrossComparefor browser-to-browser diffs
| Command | Description |
|---|---|
vrtini init |
Create example config |
vrtini build |
Build Docker images for your config |
vrtini test |
Capture screenshots and compare |
vrtini test -s <name> |
Test specific scenario(s) |
vrtini test -q |
Quick mode (skip expensive engines) |
vrtini approve |
Approve scenario as baseline |
vrtini approve --all |
Approve all as baselines |
vrtini cross-compare |
Compare browser pairs |
vrtini report |
Regenerate HTML report |
vrtini serve |
Start the web UI |
- Project dashboard and image gallery
- Fullscreen viewer with compare modes
- Bulk approvals and filtering
- Cross-compare results with diff overlays
- Optional AI analysis panel
| Key | Action |
|---|---|
1 |
Baseline |
2 |
Test |
3 |
Diff |
← → |
Navigate |
+ - |
Zoom |
0 |
Fit to screen |
A |
Approve current |
R |
Reject current |
Esc |
Close |
Copy .env.example to .env and set one of:
ANTHROPIC_API_KEY=...
OPENAI_API_KEY=...
AI runs are optional and can be disabled per project.
vrtini build # Build for your config
vrtini build --playwright 1.40.0 # Specific version
vrtini build --all-versions # All supported versionsUse host.docker.internal instead of localhost in URLs.
Use the helper container to run an older Playwright/Chromium build with a VNC UI. Tested on macOS with Docker Desktop.
docker build --platform=linux/amd64 -f docker/vnc/Dockerfile -t vrt-pw110-vnc docker/vnc
docker run --rm --platform=linux/amd64 \
-p 6080:6080 \
-e TARGET_URL=http://host.docker.internal:3000 \
vrt-pw110-vncThen open http://localhost:6080/vnc.html in your browser.
Optional: set BROWSER=webkit to launch WebKit instead of Chromium.
npm run build
npm run lint
npm run format:check
npm run typecheck
npm run test:unit
npm run test:uiGit hooks enforce secret scanning with gitleaks on commit (.husky/pre-commit) and run quality checks on push (.husky/pre-push: lint, format, typecheck, unit tests).
The pre-commit hook also runs lint-staged (ESLint + Prettier on staged files).
Install either:
brew install gitleaksor use Docker (the hook falls back to Docker if available).
Local loop script:
scripts/codex-loop.sh
Apache-2.0