Export Sonjoo audit reports
Use --format for the output format and --output for a report file. Without an output file, an explicit --format json writes the live audit JSON to standard output. Audit history is controlled separately by --save, --no-save, and your configuration.
| Format | Use |
|---|---|
console |
Inspect the report in a terminal or plain text file. |
json |
Process findings, page coverage, and the gate result in scripts. |
html |
Open or share a report offline. |
markdown |
Paste findings into an issue or project document. |
llm |
Give a human or AI assistant focused findings and evidence in a text format. |
CSV is available for Crawl Explorer data in the dashboard and local API. For a full CLI audit use one of the formats in the table above.
Write an HTML report
Section titled “Write an HTML report”sonjoo audit https://example.com/ --no-save --format html --output reports/audit.htmlSpecify the output file whenever you set an explicit format and want a file. --output overrides the configured path. --format or --json without --output writes to stdout instead of using the configured path. When both format flags appear, --format takes precedence over --json. With neither format flag, [output] in sonjoo.toml can supply both the format and the path. Its text alias selects console and is available only in configuration.
Read live and saved JSON
Section titled “Read live and saved JSON”sonjoo audit <url> --format jsonreturns the live report directly. ReadcategoryResults,ruleCoverage,reportSummary, andgateat the top level. Crawl reports also contain pagecoverage.sonjoo analyze <crawl-id> --jsonreturns an analysis of stored pages. Its direct export leaves out the live run profile and live completion state. Use the detailed saved report if you need the persisted audit metadata.sonjoo report <audit-id> --format jsonreturns saved-audit metadata and an innerresultobject. Look for findings underresult.categoryResults.sonjoo report --list --format jsonreturns audit summaries. Use theirauditIdto load a detailed report.
When processing JSON, check for an error object before reading findings. Keep ruleId, status, message, and the URL from details.pageUrl when available. For aggregated crawl findings, inspect the coverage and drill-down evidence.
To see both shapes locally, start the fixture. Run these commands from an empty directory. They save one audit in an isolated history, read it back, and produce a separate HTML report.
target="${SONJOO_DOCS_TARGET:-http://127.0.0.1:18765}"( export SONJOO_HOME="$PWD/.sonjoo-docs-history" sonjoo audit "$target/healthy" --categories core --save --fail-under 0 \ --format json --output live.json audit_id=$(sonjoo report --list --format json | python3 -c 'import json, sys; print(json.load(sys.stdin)[0]["auditId"])') sonjoo report "$audit_id" --format json > saved.json sonjoo audit "$target/healthy" --categories core --no-save --fail-under 0 \ --format html --output audit.html)When you finish, remove .sonjoo-docs-history if you no longer need the example audit.
Export an AI-readable report
Section titled “Export an AI-readable report”sonjoo audit https://example.com/ --no-save --format llm --output audit.txtBefore sharing, review the export for sensitive URLs and page details. Ask the assistant to cite the rule ID and affected URL for each recommendation, and to identify partial or unmeasured coverage. See how to reproduce the title finding for an example of evidence you can cite.
