AI Lighthouse CLI - Audit websites for AI readiness
npm install @ai-lighthouse/cliCommand-line interface for auditing websites for AI readiness, SEO optimization, and content quality.
``bash`
pnpm install
pnpm build
The simplest way to audit a website:
`bashInteractive wizard (recommended for beginners)
ai-lighthouse audit https://example.com
Interactive Features
$3
The CLI features a beautiful interactive terminal UI built with React (Ink) that includes:
- Animated Score Display - Gradient text and grade badges
- Tab Navigation - Navigate through 6 analysis sections using arrow keys (1-6)
- Real-time Loading - Progress indicators for each analysis step
- Color-coded Data - All severity levels and scores are color-coded
- Progress Bars - Visual progress bars for dimension scores
$3
When you run
ai-lighthouse audit without flags, the interactive wizard appears:1. Feature Selection - Choose which analyses to run (AI Understanding, Chunking, etc.)
2. LLM Configuration - If AI features selected, configure your LLM provider
3. Confirmation - Review settings before starting the audit
4. Results - View results in the interactive terminal UI
The wizard mode makes it easy to configure audits without memorizing command-line flags.
Usage
$3
Presets provide pre-configured scanning profiles for common use cases:
`bash
Fast scan with core rules only (~5-10 seconds)
ai-lighthouse audit https://example.com --preset basicBalanced scan with AI insights (~30-60 seconds) - Recommended
ai-lighthouse audit https://example.com --preset ai-optimizedComprehensive scan with all features (~2-5 minutes)
ai-lighthouse audit https://example.com --preset fullQuick scan showing only critical issues (~3-5 seconds)
ai-lighthouse audit https://example.com --preset minimal
`$3
`bash
ai-lighthouse presets
`$3
`bash
Using Ollama (local, free)
ai-lighthouse audit https://example.com --preset ai-optimized \
--llm-provider ollama \
--llm-model qwen2.5:0.5bUsing OpenAI
ai-lighthouse audit https://example.com --preset ai-optimized \
--llm-provider openai \
--llm-model gpt-4o-mini \
--llm-api-key sk-...Using Anthropic
ai-lighthouse audit https://example.com --preset full \
--llm-provider anthropic \
--llm-model claude-3-5-sonnet-20241022 \
--llm-api-key sk-ant-...
`$3
`bash
Save as JSON
ai-lighthouse audit https://example.com --preset basic --output jsonGenerate HTML report
ai-lighthouse audit https://example.com --preset ai-optimized --output htmlGenerate PDF report
ai-lighthouse audit https://example.com --preset full --output pdfInteractive terminal UI (default)
ai-lighthouse audit https://example.com --preset ai-optimized
`$3
`bash
Exit with code 1 if score is below threshold
ai-lighthouse audit https://example.com --preset minimal --threshold 80
`$3
You can override any preset option:
`bash
Use ai-optimized preset but enable hallucination detection
ai-lighthouse audit https://example.com --preset ai-optimized \
--enable-hallucinationUse full preset but limit to 10 issues
ai-lighthouse audit https://example.com --preset full \
--max-issues 10
`Commands
$3
Audit a single webpage for AI readiness.
Primary Options:
-
-o, --output - Output format: json, html, pdf, interactive (default: interactive)
- -p, --preset - Preset configuration: basic, ai-optimized, full, minimalLLM Configuration (for AI-powered presets):
-
--llm-provider - LLM provider: openai, anthropic, ollama (default: ollama)
- --llm-model - LLM model name (e.g., qwen2.5:0.5b, gpt-4o-mini)
- --llm-api-key - LLM API key (for OpenAI, Anthropic, etc.)
- --llm-base-url - LLM API base URL (for custom endpoints)Advanced Overrides (for power users):
-
--enable-chunking - Override: Enable chunking analysis
- --enable-extractability - Override: Enable extractability mapping
- --enable-hallucination - Override: Enable hallucination detection
- --enable-llm - Override: Enable LLM comprehension
- --min-impact - Override: Minimum impact score to include
- --min-confidence - Override: Minimum confidence (0-1)
- --max-issues - Override: Maximum issues to show
- --max-chunk-tokens - Override: Max tokens per chunk
- --chunking-strategy - Override: Chunking strategy (auto, heading-based, paragraph-based)Utility Options:
-
--threshold - Exit with code 1 if score is below this threshold$3
List all available preset configurations with descriptions and estimated durations.
$3
Crawl and audit multiple pages from a website.
Options:
-
-d, --depth - Maximum crawl depth (default: 2)
- --sitemap - Parse sitemap.xml for URLs
- --max-pages - Maximum number of pages to crawl (default: 50)
- -o, --output - Output format: json, html (default: json)
- --follow-external - Follow external links
- --respect-robots - Respect robots.txt rules (default: true)Examples:
`bash
Crawl with sitemap
ai-lighthouse crawl https://example.com --sitemap --max-pages 100Deep crawl with custom depth
ai-lighthouse crawl https://example.com --depth 3 --output html
`$3
Generate and view reports from saved audit results.
Options:
-
--open - Open the report in browser
- -f, --format - Output format: html, json, csv (default: html)Examples:
`bash
Generate and open HTML report
ai-lighthouse report ./.ai-lighthouse/last_run.json --openExport to CSV
ai-lighthouse report ./.ai-lighthouse/crawl_*.json --format csv
`Output Formats
$3
Standard JSON format with all audit data, compatible with CI/CD pipelines.$3
Beautiful, interactive HTML report with charts and detailed issue breakdowns.$3
Lighthouse-compatible JSON format for integration with existing Lighthouse tooling.$3
Comma-separated values for spreadsheet analysis.CI/CD Integration
Use the
--threshold flag to fail builds when scores drop below a threshold:`yaml
GitHub Actions example
- name: Audit site
run: ai-lighthouse audit ${{ env.SITE_URL }} --threshold 80
`Configuration
Results are saved to
.ai-lighthouse/` directory in your project root.MIT