Sonjoo CLI command reference
Run sonjoo --help to list commands and sonjoo <command> --help to check the flags supported by your installed version. Install Sonjoo to get the CLI.
sonjoo audit [options] <url> fetches the starting page and evaluates audit rules. Use an absolute http:// or https:// URL without embedded credentials.
sonjoo audit https://example.com/ --categories core --no-save --format json| Option | Behavior |
|---|---|
--crawl, --max-pages N |
Follow internal links. The flag accepts 1–1,000 pages. With the flag omitted, crawler.max_pages can set up to 10,000 pages and defaults to 10. |
--concurrency N, --timeout MS |
Set crawler concurrency (default 3, range 1–20) and request timeout (default 30,000 ms, flag range 1,000–120,000 ms). Without --timeout, the TOML setting crawler.timeout_ms can be as high as 300,000 ms. |
--max-duration SECONDS |
Set a crawl collection budget of 1–86,400 seconds. The default CLI configuration has no duration limit. |
--categories ID,ID |
Select categories by comma-separated ID. If omitted, select all categories, subject to the effective rule configuration. |
--render, --cwv |
Use Chromium for rendering and lab measurements. |
--mobile, --simulate-interaction |
Enable rendering. The mobile profile and interaction simulation apply to single-page audits. |
--question TEXT |
Look for an answer passage on the entry page with local text matching. The CLI trims leading and trailing whitespace and requires 1–500 characters. |
--format FORMAT, --json, --output FILE |
Select and write an export. |
--no-save, --save |
Override the effective [output].save setting. The default saves completed audits, including reports that fail a gate. --no-save takes precedence if you pass both flags. |
--config FILE |
Load a specific TOML configuration. |
--fail-under N, --min-coverage N |
Set CI thresholds between 0 and 100. The coverage flag requires --crawl. |
--verbose |
Show additional progress and diagnostics. |
--refresh bypasses the outgoing link cache where supported. Use --staging on an authorized staging site to skip robots restrictions and crawl delays in link discovery and waive the entry-page robots and noindex score caps. Sonjoo still checks and reports the observed directives. --ignore-crawl-delay skips the delay directive while retaining the configured access and pacing settings.
Crawl and analyze
Section titled “Crawl and analyze”sonjoo crawl <url> [--max-pages N] [--output DIRECTORY]fetches and stores snapshots for up to 10,000 pages.--outputselects a directory, and the command prints a crawl ID.sonjoo crawl --resume <crawl-id> [--max-pages N] [--output DIRECTORY]continues fetching with the saved settings. The optional page limit can stay the same or increase.sonjoo analyze <crawl-id>orsonjoo analyze --latestevaluates saved snapshots from the working directory. Use--jsonfor machine output,--saveor--no-saveto override history,--categoriesand--configto select checks, or--fail-underand--stagingto configure the score gate and staging caps. See snapshot limitations.
Follow Resume a crawl for a complete example with a custom output directory.
Init and config
Section titled “Init and config”sonjoo init --yescreatessonjoo.tomlwith defaults. Use--namefor a project name or--presetto choosedefault,blog,ecommerce, orci.sonjoo config show --jsonprints the effective configuration.sonjoo config validate --config ./sonjoo.tomlchecks a configuration file.sonjoo config --listlists effective settings.sonjoo config pathshows candidate files. Usesonjoo config <key>to read one dotted setting, or add a value and use--local(the default) or--globalto set an override.
See Configure Sonjoo for precedence and a validated configuration example.
Report and compare
Section titled “Report and compare”sonjoo report --list --format jsonreturns up to 100 saved audit summaries, newest first. Use--projector--since(a date such as2026-01-01or an RFC 3339 timestamp) to filter the list.sonjoo report <audit-id> --format jsonreturns a saved report envelope with the audit underresult. The defaulttableformat displays a table for the list and a console report for a single audit.sonjoo compare <domain> --jsoncompares the latest completed saved audit with its predecessor. Use--against <audit-id>to name the baseline or--trendto view up to 20 saved scores.sonjoo compare <domain> --fail-on-regressionexits 1 on a comparable score drop or rule regression. Inspect result comparability before attributing a change to the site.
See report formats and JSON shapes and how to read a comparison.
Explain rules
Section titled “Explain rules”sonjoo explain core-title-presentsonjoo explain core-title-present --jsonsonjoo explain --list coreThe rule detail includes its stable ID, category, weight, description and fix guidance. Use --list by itself to list the catalog, or add a category ID to narrow it.
Serve, MCP, and diagnostics
Section titled “Serve, MCP, and diagnostics”| Command | Purpose |
|---|---|
sonjoo serve --no-open --port 7360 |
Start the local dashboard and API on loopback. The default port is 7360. Use --port 0 to select a free port. |
sonjoo serve --audit URL |
Start the server with a website audit. Combine with --crawl, --max-pages, --categories, --cwv, --mobile, or --simulate-interaction as needed. These flags require --audit. |
sonjoo desktop, sonjoo desktop status, sonjoo desktop stop |
Open the dashboard in the default browser, show the desktop server’s URL, or stop the server started by the desktop launcher. |
sonjoo mcp |
Run the MCP server as a subprocess started by a local agent client over standard input and output. |
sonjoo self doctor |
Check the engine, local history database, and Chromium availability. |
sonjoo db stats --verbose |
Inspect local data location, database size, and available history counts. |
sonjoo donate |
View optional project support instructions. |
