Getting Started
Unlighthouse CLI
Last updated by
Harlan Wilton
in doc: clean up. Introduction
The Unlighthouse CLI provides the quickest way to scan your website's Google Lighthouse performance. It requires minimal setup and provides instant feedback through a local development interface.
New to Lighthouse? Check out Google's guide on Lighthouse performance scoring.
Setup
Requirements
- Node.js 20.x or higher
- Chrome or Chromium browser (will be auto-installed if missing)
Quick Start
npx unlighthouse --site <your-site>
pnpm dlx unlighthouse --site <your-site>
yarn dlx unlighthouse --site <your-site>
Unlighthouse automatically detects and uses your system Chrome or Chromium installation. If neither is found, it will download a compatible Chromium binary.
How It Works
When you run the CLI command:
- Unlighthouse crawls your site starting from the provided URL
- Discovers all internal pages automatically
- Runs Google Lighthouse audits on each page
- Opens a local UI to view results in real-time
For detailed CLI options and configuration, see the CLI Integration guide.
Platform-Specific Notes
Windows WSL
Windows Subsystem for Linux users may encounter connection issues with the Chrome instance.
For WSL-specific solutions, see Common Errors Guide.
Next Steps
Integrations
Unlighthouse can be integrated into your development workflow:
- Build Tools: Vite, Webpack, Nuxt
- CI/CD: GitHub Actions, GitLab CI, and more
Explore all available integrations.
Configuration
Customize Unlighthouse behavior with a configuration file:
// unlighthouse.config.ts
import { defineUnlighthouseConfig } from 'unlighthouse/config'
export default defineUnlighthouseConfig({
site: 'https://example.com',
scanner: {
samples: 3,
throttle: true,
},
})
Learn more in the Configuration Guide.
Getting Help
Need assistance? Join our community:
Did this page help you?