A CLI tool that compares two websites and generates comprehensive migration validation reports. Detects visual regressions, content changes, SEO issues, and performance differences.
- Visual Regression Testing: Screenshot comparison with pixel-level diff using Playwright + pixelmatch
- Content Comparison: HTML structure, text content, links, and images diff
- SEO Validation: Meta tags, Open Graph, canonical URLs, structured data
- Performance Metrics: Load time, TTFB, LCP, CLS, FCP comparisons
- AI Analysis: Optional OpenRouter integration for semantic visual diff analysis
- Scalable: Handles 1000+ URLs with configurable concurrency
- HTML Reports: Interactive dashboard to browse comparison results
# Install dependencies
npm install
# Install Playwright browser
npx playwright install chromium
# Setup environment (copy and edit with your API key)
cp .env.example .env- Copy
.env.exampleto.env - Add your OpenRouter API key (get one at https://openrouter.ai/)
# .env
OPENROUTER_API_KEY=sk-or-v1-your-key-here# Basic comparison using sitemap
npm run dev -- compare -s https://old-site.com -t https://new-site.com
# With options
npm run dev -- compare \
-s https://old-site.com \
-t https://new-site.com \
--concurrency 20 \
--viewports desktop mobile \
--output ./reports/migration-2024 \
--ai --ai-key YOUR_OPENROUTER_KEY
# Crawl mode (if no sitemap available)
npm run dev -- compare \
-s https://old-site.com \
-t https://new-site.com \
--crawl \
--max-urls 500# Generate HTML report from existing data
npm run dev -- report -d ./reports -f html
# Generate JSON report
npm run dev -- report -d ./reports -f json -o ./results.jsonnpm run dev -- serve -p 3000 -d ./reports| Option | Description | Default |
|---|---|---|
-s, --source <url> |
Source website URL (required) | - |
-t, --target <url> |
Target website URL (required) | - |
-c, --concurrency <n> |
Concurrent comparisons | 10 |
-v, --viewports <list> |
Viewports: desktop, tablet, mobile, or WxH | desktop |
-o, --output <dir> |
Output directory | ./reports |
--threshold <n> |
Visual diff threshold % | 0.1 |
--ai |
Enable AI analysis | false |
--ai-key <key> |
OpenRouter API key | $OPENROUTER_API_KEY |
--skip-visual |
Skip visual comparison | false |
--skip-content |
Skip content comparison | false |
--skip-performance |
Skip performance comparison | false |
--skip-seo |
Skip SEO comparison | false |
--crawl |
Crawl instead of using sitemap | false |
--max-urls <n> |
Max URLs to compare | 1000 |
Reports are saved to the output directory:
reports/
├── comparison.db # SQLite database with all results
├── report.html # Interactive HTML report
└── screenshots/ # Screenshot files
└── [url-slug]/
├── source-desktop.png
├── target-desktop.png
└── diff-desktop.png
| Variable | Description |
|---|---|
OPENROUTER_API_KEY |
API key for AI analysis via OpenRouter |
# Run in development mode
npm run dev -- compare -s https://example.com -t https://example.org
# Build for production
npm run build
# Run built version
npm start -- compare -s https://example.com -t https://example.orgMIT