Skip to content

Sonjoo CLI command reference

View as Markdown

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.

Terminal window
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.

  • sonjoo crawl <url> [--max-pages N] [--output DIRECTORY] fetches and stores snapshots for up to 10,000 pages. --output selects 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> or sonjoo analyze --latest evaluates saved snapshots from the working directory. Use --json for machine output, --save or --no-save to override history, --categories and --config to select checks, or --fail-under and --staging to configure the score gate and staging caps. See snapshot limitations.

Follow Resume a crawl for a complete example with a custom output directory.

  • sonjoo init --yes creates sonjoo.toml with defaults. Use --name for a project name or --preset to choose default, blog, ecommerce, or ci.
  • sonjoo config show --json prints the effective configuration.
  • sonjoo config validate --config ./sonjoo.toml checks a configuration file.
  • sonjoo config --list lists effective settings. sonjoo config path shows candidate files. Use sonjoo config <key> to read one dotted setting, or add a value and use --local (the default) or --global to set an override.

See Configure Sonjoo for precedence and a validated configuration example.

  • sonjoo report --list --format json returns up to 100 saved audit summaries, newest first. Use --project or --since (a date such as 2026-01-01 or an RFC 3339 timestamp) to filter the list.
  • sonjoo report <audit-id> --format json returns a saved report envelope with the audit under result. The default table format displays a table for the list and a console report for a single audit.
  • sonjoo compare <domain> --json compares the latest completed saved audit with its predecessor. Use --against <audit-id> to name the baseline or --trend to view up to 20 saved scores.
  • sonjoo compare <domain> --fail-on-regression exits 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.

Terminal window
sonjoo explain core-title-present
sonjoo explain core-title-present --json
sonjoo explain --list core

The 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.

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.