Unlighthouse CLI - Site-Wide Lighthouse
Stop checking pages one at a time. Run a single command and get Lighthouse scores for your entire site in minutes.
npx unlighthouse --site example.com
That's it. Unlighthouse will crawl your site, find every page, run Lighthouse on each one, and open a dashboard where you can watch results stream in live.
Quick Start
Pick your package manager:
npx unlighthouse --site https://mysite.com
pnpm dlx unlighthouse --site https://mysite.com
yarn dlx unlighthouse --site https://mysite.com
A browser window opens automatically showing your scan progress. Results appear as each page completes—no waiting for the full scan to finish.
What Happens Behind the Scenes
- Discovery — Unlighthouse reads your sitemap and crawls internal links to find every page
- Parallel scanning — Multiple Chrome instances run Lighthouse audits simultaneously
- Live results — Scores stream to your dashboard as each page completes
- Smart sampling — Similar pages (like blog posts) are sampled to avoid redundant scans
Requirements
- Node.js 20+
- Chrome — Uses your system Chrome. If missing, downloads Chromium automatically.
Install Globally (Optional)
If you scan sites frequently:
npm install -g @unlighthouse/cli
unlighthouse --site example.com
Common First Scan Issues
Nothing happening?
Add --debug to see what's going on:
npx unlighthouse --site example.com --debug
WSL Users
Chrome can be tricky in WSL. If you see connection errors, check the WSL troubleshooting guide.
Slow scans?
Your first scan downloads route data and warms up Chrome. Subsequent scans use caching and are much faster.
Configure Your Scan
Create unlighthouse.config.ts in your project root:
import { defineUnlighthouseConfig } from 'unlighthouse/config'
export default defineUnlighthouseConfig({
site: 'https://example.com',
scanner: {
samples: 3, // Run each page 3x and average (more accurate)
throttle: true, // Simulate real network conditions
exclude: ['/admin/*', '/api/*'], // Skip these paths
},
})
Now just run unlighthouse without flags—it reads your config automatically.
See all configuration options.
What's Next?
- CI Integration — Run scans on every deploy, fail builds on performance regressions
- Large Sites — Scanning thousands of pages efficiently
- Authentication — Scan pages behind login
Get Help
- Discord — Quick questions and community help
- GitHub Issues — Bug reports and feature requests