Welcome to the command-line interface (CLI) and reporting reference for SEO Lens!
Whether you're running audits locally from your terminal, integrating SEO checks into your CI/CD pipelines, or exporting data for spreadsheets and dashboards, this guide covers every subcommand, option, exit code, and export format.
SEO Lens provides 10 purpose-built subcommands via the seolens binary:
seolens
├── audit <url> # Run a full website crawl & technical audit
├── inspect <url> # Instant X-ray for a single webpage (headers, DOM, schema)
├── mcp # Start native Model Context Protocol server (stdio)
├── report <session> # Re-export or inspect a past audit without recrawling
├── list # List all historical audit sessions stored in SQLite
├── issues <session> # Filter and drill down into findings for an audit
├── check-ai <url> # Audit AI search readiness (/llms.txt, AI bot policies)
├── schema <url> # Validate JSON-LD structured data against Google Rich Results
├── delete <session> # Delete a specific crawl session and its records
└── clean # Reclaim disk space by cleaning old crawl sessionsTip
Run seolens <subcommand> --help anytime to view the built-in documentation and default values directly in your terminal.
The primary command for technical SEO auditing. It discovers URLs, parses pages with a zero-copy streaming parser, applies AIMD adaptive rate limiting, runs 120 SEO rules, and exports reports.
# Basic crawl (defaults: 500 pages, max depth 5, concurrency 10)
seolens audit https://example.com
# High-depth crawl with HTML, CSV, and Markdown exports
seolens audit https://example.com -p 2000 -d 8 -f html,csv,md -o ./my-reports
# High-speed local audit with AIMD throttling disabled
seolens audit http://localhost:3000 --no-aimd -p 100
# CI/CD check: fail pipeline if any Critical issues are detected
seolens audit https://staging.example.com --fail-on critical| Flag / Option | Short | Type | Default | What It Does |
|---|---|---|---|---|
<url> |
String |
(Required) | Root URL to crawl (e.g. https://example.com). |
|
--max-pages |
-p |
u32 |
500 |
Maximum pages to crawl (0 = unlimited). |
--max-depth |
-d |
u16 |
5 |
Maximum click depth from start URL. |
--concurrency |
-c |
usize |
10 |
Number of concurrent network requests. |
--delay |
u64 |
0 |
Delay between requests in ms (0 = auto-AIMD). |
|
--no-aimd |
bool |
false |
Disable adaptive AIMD throttling (ideal for local staging tests). | |
--render-js |
bool |
false |
Enable Headless Chrome CDP for JavaScript SPAs. | |
--chrome-ws |
String |
"auto" |
Custom Chrome WebSocket URL (e.g. ws://127.0.0.1:9222). |
|
--user-agent |
-u |
String |
"SEOLens/1.0" |
Custom User-Agent header string. |
--format |
-f |
String |
"terminal,json,md" |
Outputs: terminal, json, md, html, csv, or all. |
--output-dir |
-o |
Path |
"./reports" |
Directory where export files will be saved. |
--fail-on |
String |
"none" |
CI/CD gate: critical, alert, or warning. |
|
--no-robots |
bool |
false |
Ignore /robots.txt disallow rules. |
|
--ephemeral |
bool |
false |
Ephemeral run: auto-cleans SQLite state on finish. | |
--max-query-params |
usize |
2 |
Max query parameters allowed before pruning spider traps. | |
--ignore-sorting-facets |
bool |
true |
Prunes faceted sorting parameters (sort, order, etc.). |
|
--db-path |
Path |
(System default) | Custom path to SQLite persistence database. | |
--local |
-L |
bool |
false |
Persist database locally to ./.seolens/seolens.db. |
Need to quickly inspect a single page without running a site crawl? inspect fetches the URL, runs document-level SEO checks, and outputs a complete technical X-ray in under 500 milliseconds.
# Inspect a live page
seolens inspect https://example.com/about
# Output as structured JSON for piping into jq
seolens inspect https://example.com/about -f json | jq '.headings'Launches the native Model Context Protocol (MCP) server over stdio. This allows AI coding agents like Claude Desktop, Cursor, and Windsurf to communicate directly with SEO Lens.
# Start MCP server over stdio
seolens mcp(See mcp.md for tool definitions and agent configuration guides).
Every crawl is saved in your local SQLite database. If you ran an audit yesterday and now want to generate an interactive HTML report or CSV files, report does this instantly without touching the network:
# Generate HTML and CSV reports for session crawl_1788718395
seolens report crawl_1788718395 -f html,csv -o ./exportsLists all audit sessions stored in your local database with target URLs, page counts, durations, and health scores.
# List recent sessions
seolens list
# Show up to 50 sessions in JSON format
seolens list -n 50 -f jsonAllows you to filter and inspect issues discovered during a crawl directly in your terminal.
# View only Critical issues for an audit
seolens issues crawl_1788718395 -s critical
# View Security category issues
seolens issues crawl_1788718395 -c securityAudits whether a website is ready for Generative Engine Optimization (GEO) and AI search engines:
- Checks presence and structure of
/llms.txtand/llms-full.txt. - Inspects
/robots.txtto see if AI Retrieval/Search Bots (e.g.PerplexityBot,OAI-SearchBot) or AI Training Crawlers (e.g.GPTBot,ClaudeBot) are blocked.
seolens check-ai https://example.comExtracts all JSON-LD scripts from a URL and validates them against Google Rich Results specifications (Product, Article, FAQ, LocalBusiness, Breadcrumbs, etc.).
seolens schema https://example.com/products/headphonesManage your local SQLite storage footprint:
# Delete a specific crawl session
seolens delete crawl_1788718395 -y
# Preview what sessions would be cleaned (dry run)
seolens clean --keep 5 --dry-run
# Reclaim space: keep only the 5 most recent crawls and delete the rest
seolens clean --keep 5 -ySEO Lens uses standard UNIX exit codes so you can plug audits directly into GitHub Actions, GitLab CI, or pre-deployment hooks:
| Exit Code | Meaning | Condition |
|---|---|---|
0 |
Clean / Success | Audit finished successfully and no issues violated the --fail-on threshold. |
1 |
Threshold Violation | Found one or more issues matching or exceeding --fail-on (e.g. --fail-on critical). |
2 |
Runtime / Network Error | Target URL unreachable, DNS failure, invalid arguments, or disk error. |
130 |
Interrupted (Ctrl+C) |
User cancelled the crawl gracefully. Partial results remain saved in SQLite. |
SEO Lens supports 5 complementary export formats:
- Self-Contained: 100% offline. CSS, SVG icons, and JavaScript are bundled directly into the single file. No external CDNs or Google Fonts.
- Authentic Workstation Aesthetic: Features an ASCII branding banner, high-contrast monospace typography, and retro CRT workstation styling.
- Interactive Filtering:
- Real-time search bar filtering across URLs, titles, error codes, and issue descriptions.
- Severity filter tabs (All, Critical, Alerts, Warnings, Notices).
- Expandable issue drawers with direct remediation advice.
- Dynamic ASCII-style progress bars and telemetry indicators.
Designed for agency teams and SEO consultants who work with spreadsheets:
internal_all.csv: Full crawl inventory matching Screaming Frog columns (URL, Status, Title, Description, H1, Canonical, Inlinks, Outlinks, TTFB, Word Count).issues_all.csv: Complete list of triggered audit findings with severity, categories, affected URLs, and remediation steps.response_codes.csv: HTTP routing breakdown and redirect targets.external_all.csv: External links found, anchor texts, andrel="nofollow"attributes.
Formatted using clean GitHub-Flavored Markdown. Perfect for:
- Pasting directly into client audit summaries or PR descriptions.
- Providing context directly to LLM prompt windows without token bloat.
Lossless structured dump of the entire audit: crawl summary, timing percentiles, every PageReport, triggered issues, and site link graph edges.
During execution, seolens audit renders a live colored ANSI dashboard showing:
- Real-time crawl rate (pages/sec) and progress bar.
- Dynamic AIMD delay and p95 server TTFB.
- Live issue counters (🚨 Critical,
⚠️ Alerts, ⚡ Warnings). - Post-crawl executive scorecard with health score (0–100) and status breakdown.