audit
Run an audit on a website
The audit command crawls a website and runs SEO rules to generate a report.
Usage
squirrel audit <url> [options]
squirrel audit --urls-file <file> --out-dir <dir> [options]Arguments
| Argument | Description |
|---|---|
url | The URL to audit (required unless you use --urls-file). Without a scheme, https:// is assumed, or http:// for a local or private host such as localhost:3000, 192.168.1.10 or myapp.test (see local audits) |
Options
| Option | Alias | Description | Default |
|---|---|---|---|
--max-pages | -m | Maximum pages to crawl | the level’s page budget |
--max-depth | Maximum crawl depth from the seed (start page = 0) | unlimited | |
--max-duration | Wall-clock budget for the whole audit, in seconds. At the limit the audit stops launching new work and writes a partial report (see Time limit) | no limit | |
--urls-file | Batch mode: audit every URL in this file, one per line (- reads stdin) | ||
--out-dir | Batch mode: directory for the reports and results.jsonl (required with --urls-file) | ||
--concurrency | With --urls-file: audits run at once (1 to 16). Without it, the crawl worker pool size | batch: up to 4, at most half the cores | |
--retry-failed | Batch mode: run the URLs that failed earlier again | off | |
--restart | Batch mode: move the old results file aside and audit every URL again | off | |
--url-timeout | Batch mode: hard time limit per URL, in seconds | --max-duration x 1.5 + 60, else none | |
--max-urls | Batch mode: most URLs in the file | 100000 | |
--allow-private-hosts | Batch mode: audit loopback and private hosts, which are refused by default | off | |
--crawl-timeout | Wall-clock backstop for the crawl phase alone, in seconds (max 21600). A long value weakens the wedge backstop. At the limit the crawl stops and the audit writes a partial report with reason code crawl_timeout and a crawlPhase object. See crawl_timeout | derived from pages and per-host rate, at most 60 min | |
--concurrency | Global crawl worker pool size (overrides [crawler] concurrency) | 5 | |
--per-host | Max concurrent requests per host (overrides [crawler] per_host_concurrency) | 5 | |
--level | Audit level: quick, surface, full | auth-aware (see below) | |
--coverage | -C | Older name for --level, still accepted (fast means quick) | |
--format | -f | Output format: console, text, json, html, markdown, xml, llm | console |
--output | -o | Output file path | auto |
--refresh | -r | Ignore cache, fetch all pages fresh (full re-scan) | false |
--bypass-cache | Send Cache-Control: no-cache on page fetches so a CDN revalidates; the report notes pages that still look cached (see no_cache) | false | |
--store-scripts | Keep every fetched first-party script in the content store for this run, for corpus and research runs (see store_scripts) | false | |
--no-store-scripts | Turn [storage] store_scripts off for this run | config | |
--fresh-ua | Re-roll the project’s pinned random user-agent (the new one is pinned for later runs) | false | |
--incremental | Re-scan only changed pages via conditional GET (the default; overrides [crawler] incremental = false) | true | |
--no-incremental | Fetch every page in full, disabling conditional GET | false | |
--content-store | Use this file as the content store for the run (same as SQUIRREL_CONTENT_STORE_PATH). Point it at a new path for a cold run, see Storage | ~/.squirrel/content-store.db | |
--resume | Resume interrupted crawl for this domain | false | |
--verbose | -v | Verbose output | false |
--debug | Enable debug logging | false | |
--trace | Enable performance tracing | false | |
--project-name | -n | Project name (overrides config and prompts) | auto |
--publish | -p | Force publish (now the default when logged in) | auto |
--no-publish | Skip auto-publishing this run (stay online, just don’t publish) | false | |
--ephemeral | Use cloud features for this run only: don’t add the site to your dashboard, don’t schedule it, and don’t publish the report. Charged like any signed-in audit. Overrides [cloud] ephemeral. Add --publish to publish an unlisted report that is attached to no dashboard site. See Ephemeral runs | false | |
--no-ignore | Run without applying the [[ignore]] entries in squirrel.toml, to see what they waive. The report says they were not applied. See Ignore | false | |
--no-ephemeral | Turn [cloud] ephemeral = true off for this run | false | |
--visibility | Visibility: public, unlisted, private | unlisted | |
--follow-redirect | Audit where the start URL redirects when that is another site (a link shortener, a launch domain forwarding to the product). Without it a terminal asks, and anything else exits 4. Overrides [crawler] follow_redirect; --no-follow-redirect turns the config off for one run. -y does not imply it. See Start URLs that redirect | false | |
--yes | -y | Skip confirmation prompts (e.g. cloud credit spend). Does not follow a redirect to another site: use --follow-redirect | false |
--render | Force cloud browser rendering for this run: alias of --render-mode all (uses credits; requires login). Only rendering runs in the cloud: your machine still fetches the site | auto | |
--render-mode | Render strategy: off (HTTP only) · auto (render only client-rendered pages) · all (render every page). Only rendering runs in the cloud: your machine still fetches the site. Overrides [cloud].render | the level’s: auto for quick, all for surface and full | |
--http | Force plain HTTP for this run: alias of --render-mode off (never render in the cloud; pages cost the same either way) | auto | |
--offline | Run offline: skip cloud features, publishing, and telemetry. No request goes to a host outside the audited site (its host, its www or apex twin, [project] domains and their subdomains): external links, third-party scripts, stylesheets and fonts, sitemaps on another site, and redirects to another site are not requested. Internal link targets still are checked. It does not change probing: -C surface --offline still sends the site probes unless you add --passive. See Offline and passive are separate | false | |
--external-links | Check links to other sites this run, even where [external_links] enabled = false turns them off. Cannot be combined with --offline or --no-external-links | the level’s: on at every level | |
--no-external-links | Do not check links to other sites this run. The report shows them as Not checked | the level’s | |
--no-internal-links | Do not status-check internal link targets the crawl did not fetch (one HEAD request each, on by default at every level). See Link checking defaults | checked | |
--no-classifier | Do not run the bundled page classifier: link sections in findings come from page markup only. Same as [classifier] enabled = false. See Page Classifier | on | |
--header | -H | Custom HTTP header on every crawl request, Name: Value (repeatable). Merges over [crawler] headers; values are redacted in output. See Web Bot Auth | none |
--fail-on | Exit 2 when a threshold trips, for CI gating (repeatable / comma-separated) | none | |
--compare-url | With --target-url: also fetch this URL (repeatable) as the comparison set, so site rules that judge only the pages fetched can run. See Comparison set | none | |
--target-url | Audit exactly this URL and nothing else (repeatable), absolute or a path on the audited site such as /pricing. No sitemap, probes or link following. See Targeted audits | none | |
--rule-include | Only run these rule categories or rules, e.g. ax,perf, core/meta-title or a rule group such as group:security (repeatable / comma-separated). Replaces [rules] enable for this run | none | |
--rule-exclude | Skip these rule categories or rules, e.g. images,social or group:performance (repeatable / comma-separated). Adds to [rules] disable for this run | none | |
--wcag-level | Only run the accessibility rules mapped to a WCAG success criterion at or below this level: A, AA or AAA (AA keeps Level A and AA). These automated checks cover part of WCAG; passing them does not mean a site conforms. Rules with no WCAG criterion are not run under it, at any level including AAA. The report is marked as a partial audit and is not auto-published (only an explicit --publish sends it). Overrides [rules] wcag_level for this run | all levels | |
--disable-discovery-probes | Skip the pre-crawl discovery probes (llms.txt, /.well-known/*, /swagger.json and the rest) for this run. Overrides [crawler] disable_discovery_probes; =false sends them even when the config turns them off, and a space before the value (--disable-discovery-probes false) is refused. See Discovery probes | false | |
--discovery-probe-path | Only send the discovery probe for this path (repeatable / comma-separated), e.g. /llms.txt or /AGENTS.md. A probe for any other path is not sent and reports not checked, and a redirect from it may not change the path. Replaces [crawler] discovery_probe_paths. See discovery_probe_paths | none | |
--probe | -P | Probing intensity: passive, active or aggressive. Overrides [security] probe. See Probing intensity | the level’s: passive for quick, active for surface and full |
--passive | Shortcut for --probe passive | false | |
--aggressive | Shortcut for --probe aggressive | false | |
--probe-budget | Wall-clock cap for all probing in this run, such as 30s or 2m (max 1h). Overrides [security] budget | 30s active, 2m aggressive | |
--pentest | Shortcut for --level full --probe aggressive | false | |
--summary | Print only the score, category breakdown, and issue counts — no per-issue detail. Console format only | false | |
--include-passed | Also list the rules that passed, with how many pages each passed on | false | |
--include-info | Also list info checks (notes that are not findings) in the llm format. The json format always has them under infoChecks. See Info checks | false | |
--full-report | Build the whole report body for a very large crawl instead of a sampled one. See Large crawls | false | |
--include-pages | JSON only: list every crawled page with its HTTP status and how many rules reported on it. See Pages list | false |
Audit levels
| Level | Pages | What it does |
|---|---|---|
quick | 25 | The URL and its sitemaps, no link following, no cloud checks, internal links checked |
surface | 100 | Follows links, one page per URL pattern first, with the cloud checks and the editor’s summary |
full | 500 | Every page it can reach up to the budget, with the cloud checks and the editor’s summary |
A level also sets rendering, external link checks and probing. Every flag that
changes one of those settings (--max-pages, --render-mode, --http,
--probe and the rest) still works, and makes the audit custom. The banner
says what changed:
Level custom (surface + max_pages 200)The default level is auth-aware. Any signed-in account (free or Pro) defaults
to surface, so the cloud checks and the editor’s summary run and a free report
demos the full product. Signed-out and --offline runs default to quick. Pass
--level (or set [crawler] coverage in config) to choose either way.
quick skips the cloud checks, and nothing else changes about billing: signed
in, a quick audit is a cloud audit like any other level, at 50 credits plus 2
per audited page (up to 100 for 25 pages), and it renders the pages that need
JavaScript in the cloud browser. --http skips the browser, not the page
charge. Free and Pro run the same checks: Pro just grants more monthly credits
and lets you top up.
See Audit levels for every setting of every level, custom levels, and the plan and credit limits.
Offline and passive are separate
Two settings control what an audit sends, and they are independent:
- Offline or online is the network scope: does the audit use the cloud and
other sites?
--offlinesays no. It means no cloud analysis, rendering or publishing, no telemetry, and no check of links, scripts or sitemaps on other sites. The one request that can leave the audited site is a start URL redirect hop, which is how the audit finds where it starts (see Start URLs that redirect). - Passive or active is how hard the audited site is poked: the
probing intensity.
--passive(or--probe passive) turns the probe rules off. The probe level comes from--probeor its shortcuts (--passive,--aggressive), then[security] probein the config, then the audit level, and--offlinedoes not change it. The run banner’sProbingline shows the level in effect.
| Passive | Active (the default at surface and full) | |
|---|---|---|
Offline (--offline) | The crawl of the audited site, no cloud, no other host. No probe rules, but the 28 discovery probes still run unless disabled | The same, plus the probe rules: GraphQL and open redirect GET requests and, for form actions, HEAD then GET, all to the audited site |
| Online (signed in or out) | The crawl, plus other sites (external link checks) and, signed in, the cloud: rendering, cloud checks and publishing. No probe rules, discovery probes still run unless disabled | Everything above, plus the probe rules |
So squirrel audit <url> -C surface --offline is offline and active: it keeps
off the cloud and off other sites, and it still sends the probe rules (for example
GET /graphql?query={__schema{types{name}}}) to the audited site. Add --passive
to stop them.
The discovery probes (llms.txt,
/.well-known/* and so on, 28 requests) are a third dial, and it only goes one
way. A passive run still sends them unless you also pass
--disable-discovery-probes; but --disable-discovery-probes does force probing
to passive, so -C surface --offline --disable-discovery-probes runs passive.
To keep the traffic to the crawl itself, with no probes and no cloud:
squirrel audit https://nutshop.squirrelscan.com --offline --passive --disable-discovery-probesThat still sends the crawl’s own requests: the pages and their scripts,
robots.txt, the sitemap path guesses, a HEAD for each internal link target
the crawl did not fetch, the soft-404 re-check where it applies, and start URL
redirect hops. On a small test site it was 17
requests, all of them pages, robots.txt, sitemap paths and scripts.
The banner’s Probing line (for example Probing active · budget 30s) shows
what the run will do before it starts.
robots.txt, sitemaps, the pages themselves and the checks of internal link
targets are the crawl, and still run.
Probing intensity
Probing intensity says how hard each page is poked beyond what the crawl fetched. It is one of the audit level’s settings, with the page budget and rendering.
| Level | What it sends |
|---|---|
passive | No probe rules, and nothing beyond the crawl itself except the 28 discovery probes, which --disable-discovery-probes turns off |
active | Quiet probes: a handful of requests that look like normal traffic |
aggressive | Loud probes: many requests and many 404s, which can trip a WAF |
The audit level picks the default: passive for quick, active for surface and
full. aggressive is never a default. The audit prints the level and its budget
in the run banner:
Level surface · max 100 pages
Probing active · budget 30s--passive and --aggressive are shortcuts for --probe. Using both is refused,
as is a shortcut that contradicts --probe, the same way --render and --http
are. An unknown level or budget fails before the crawl starts.
--probe-budget caps the wall-clock time of all probing together, not each
probe. Once it runs out, no new probe starts.
The rules that probe, and exactly what each one sends, are listed in Security configuration.
--disable-discovery-probes (or [crawler] disable_discovery_probes = true)
keeps probing passive, and no probe sends a request.
squirrel audit https://nutshop.squirrelscan.com --aggressive --probe-budget 1m
squirrel audit https://nutshop.squirrelscan.com --pentestTo pick which rule families run, use --rule-include and --rule-exclude. See
Security configuration for [security] probe and
budget, and the defaults for cloud audits.
Examples
Basic audit
squirrel audit https://nutshop.squirrelscan.comQuick health check
squirrel audit https://nutshop.squirrelscan.com --level quickFull comprehensive audit
squirrel audit https://nutshop.squirrelscan.com --level fullCrawl more pages
squirrel audit https://nutshop.squirrelscan.com -m 200Cap the run time
squirrel audit https://nutshop.squirrelscan.com --max-duration 240Export to JSON
squirrel audit https://nutshop.squirrelscan.com -f json -o report.jsonGenerate HTML report
squirrel audit https://nutshop.squirrelscan.com -f html -o report.htmlFresh crawl (ignore cache)
squirrel audit https://nutshop.squirrelscan.com --refreshResume an interrupted crawl
squirrel audit https://nutshop.squirrelscan.com --resumeResume continues the latest crawl of the site only when it can: the crawl must still be unfinished (running, paused or stopped), the include, exclude and URL settings must match the crawl’s, --refresh must not be set, its data must not have been reclaimed, and this process must be able to claim it. When any of these fails, the audit starts a new crawl and says why on stderr, for example --resume requested but not resuming (crawl-finished): previous crawl 3f2a finished (analyzed), nothing left to resume; starting a new crawl. The reason is one of no-prior-crawl, refresh-requested, reclaimed, crawl-finished, crawl-failed, config-changed, lease-held or lease-unavailable. With --format json the report carries meta.resume: requested (always true when present), resumed, and, when resumed is false, the reason code and the message printed on stderr. meta.resume is absent when --resume was not passed. squirrel crawl --resume makes the same decision and prints the same line.
Resume only continues a crawl when this process can claim it. If another live
process already owns that crawl, the command names its PID and host and starts a
new crawl instead. A lease becomes stale after 5 minutes without a heartbeat;
a live same-host PID remains protected longer. Stop the other process (Ctrl-C
releases its lease immediately), wait 5 minutes for a silent remote owner to go
stale, or use --refresh for a fresh crawl. See crawl leases.
Publishing to the dashboard
When you’re logged in and online, every audit auto-publishes to your dashboard as unlisted, independent of cloud rendering or enrichment. You get a shareable link plus issue history with no extra flags. Not logged in (or --offline)? Nothing publishes.
Publishing is included in the audit base charge, whatever the visibility. The auto-publish default is unlisted.
Publishing and tracking the run in the dashboard need a role that runs audits in the organization you are signed in to: owner, admin or editor. As a viewer or billing member the audit still runs locally and its results are complete, but the run is not tracked and the report is not published: the CLI prints the reason (forbidden_role). Run with --no-publish to skip the publish attempt.
# logged in → auto-publishes (unlisted) and prints the URL
squirrel audit https://nutshop.squirrelscan.comOverride the visibility for a run:
squirrel audit https://nutshop.squirrelscan.com --visibility publicOnce a website has been audited successfully, squirrelscan re-audits it on a weekly schedule by itself. From then on every publish prints one more line saying so, with the link that turns it off:
https://acme.squirrel.report/XVv4NO7aPr
Scheduled audits: every week, and each run costs credits. Turn it off: https://app.squirrelscan.com/acme/website/web_1/settings/scheduleThe cadence it names is the one your plan actually funds.
A site that asked for a schedule your plan has no slot left for is capped, and the line says so instead:
Scheduled audits: this site is not scheduled, your plan schedules <n> website(s). Upgrade: <upgrade-url>Every other state prints nothing, and so does a run that published nothing.
Skip publishing for a single run (still runs online):
squirrel audit https://nutshop.squirrelscan.com --no-publishTurn auto-publish off for the project in squirrel.toml:
[cloud]
publish = false--publish is still accepted (now redundant when logged in) and forces a publish even if [cloud] publish = false. --publish and --no-publish cannot be combined.
Browser rendering
When you’re logged in, audits render every page in a cloud browser by default, so JavaScript-heavy sites are audited against their fully rendered HTML. A signed-in audit costs 50 credits plus 2 per audited page whether a page is rendered or fetched over plain HTTP, so rendering never changes the bill. At the levels that check external links it also pays 1 credit per external link the cloud verifies, at most 1 per page; links the cloud cannot answer in time are checked on your machine for free. The first time an audit would spend credits the CLI asks once and remembers your answer, and if your balance can’t cover the page limit the CLI lowers the limit to what it covers and tells you. See Credits and pricing.
Force plain HTTP for a run (no cloud browser):
squirrel audit https://nutshop.squirrelscan.com --httpForce rendering for a run even if your config disables it:
squirrel audit https://nutshop.squirrelscan.com --renderRendering is the only part that runs in the cloud: with --render or any --render-mode other than off, your machine still fetches the site (the pages, robots.txt, sitemaps, scripts and assets, link checks), so the site still sees your IP address. See what still comes from your machine.
For finer control, --render-mode auto renders only pages that need it (client-side-rendered shells) and uses fast plain HTTP for the rest. To set the behavior permanently, use render in [cloud] - see the browser rendering guide.
When rendering falls back
Rendering can stop partway: you ran out of credits, the render service kept failing, the run ended, you are signed out, or the cloud was unreachable. The pages after that are fetched over plain HTTP, and the audit carries on. The audit says so instead of leaving you to find out from the log:
- A line after the scan summary, for example
Cloud rendering fell back to plain HTTP (out of credits): 12 of 40 pages were rendered, the rest fetched as plain HTML. - A
renderblock in the JSON report, and a<render>element in the LLM report:
{
"render": {
"requested": true,
"mode": "all",
"fallbackReason": "out of credits",
"pagesRendered": 12,
"pagesFetchedPlain": 28
}
}requested is whether cloud rendering was asked for (a flag, the config or the level). mode is what the crawl did: all (every page rendered), auto (HTTP first, rendered only for client-rendered shells) or http (nothing rendered, including when rendering was asked for and could not run). pagesRendered and pagesFetchedPlain count the pages this audit fetched, by whether a browser rendered them; a page reused unchanged from an earlier audit is in neither. fallbackReason appears only when rendering was asked for and did not carry the crawl: out of credits, not authenticated, run no longer active, N consecutive cloud failures, not logged in, or cloud unavailable (signed out or unreachable). The LLM report has the same facts as <render requested="true" mode="all" pages-rendered="12" pages-fetched-plain="28" fallback-reason="out of credits"/>. A single page the render could not reach (a site that walls the renderer) is fetched directly and counted as plain, without a fallbackReason.
Start URL rules
The start URL must be http:// or https:// with a host. A bare domain gets https:// (http:// for a local name), and localhost:3000 or example.com:8080 keep their port. Credentials (user:password@) and the #fragment are dropped before anything is crawled, logged, registered or sent to the cloud, with a note on stderr; the query string is kept. Use --header "Authorization: Basic ..." to crawl a site behind basic auth. A URL longer than 2048 characters is audited but not registered as a dashboard run.
Start URLs that redirect
A start URL is resolved before anything else: its redirect chain is followed, one request per hop, and the end of the chain is what gets audited. A link shortener is the usual case. squirrel audit https://bit.ly/abc audits the site it points to, not bit.ly.
| The chain | What happens |
|---|---|
Stays on one site: http to https, apex to www, a path change | Followed silently. The report’s base URL is where it ended. |
| Ends on another registrable domain or port | Needs your consent, because it changes which site is crawled. |
| Loops, passes 5 hops, or reaches a hop that is refused | Never followed. The run exits 4 with the chain so far. |
On a terminal, a cross-domain redirect asks first:
bit.ly/abc redirects to https://example.com/pricing. Audit example.com instead? [Y/n]Accepting audits the destination. Declining exits 4 and prints the destination. Anywhere else (an agent, CI, a piped report) there is nobody to ask, so give the consent up front:
squirrel audit https://bit.ly/abc --follow-redirector set it for a project:
[crawler]
follow_redirect = true-y is not that consent. It approves credit spend, agents pass it routinely, and the redirect may land on a site that is not yours. Without --follow-redirect a non-interactive run does not crawl the redirector and does not score it. It exits 4 and prints a redirected report that names the destination and the command to run again:
{
"status": "redirected",
"reason": "cross-domain",
"originalUrl": "https://bit.ly/abc",
"finalUrl": "https://example.com/pricing",
"redirectChain": [
{ "url": "https://bit.ly/abc", "status": 301 },
{ "url": "https://example.com/pricing", "status": 200 }
],
"rerunCommand": "squirrel audit https://bit.ly/abc --follow-redirect",
"message": "https://bit.ly/abc redirects to https://example.com/pricing, a different site, so nothing was audited."
}Only the scheme, host, port and path of each URL are printed or recorded, and only the destination’s origin and path are audited: userinfo, query and fragment are dropped, because a redirect’s query often carries a token. The destination’s query, fragment and credentials are not carried to the audit. Shortener destinations are mostly tracking parameters, and the query is where tokens live. A destination that needs a query or credentials has to be audited by typing it directly. rerunCommand uses the start URL exactly as you typed it. The same facts come out in every output format. reason is cross-domain, loop, too-many or refused. rerunCommand is null for a loop or a refused hop, where there is nothing to run again.
When a cross-domain redirect is followed, the report records where the audit began. The JSON report has meta.originalUrl and meta.redirectChain (every URL requested, each with the status it answered; the last is the destination), the text, markdown, LLM, XML and HTML reports say so in their scan notes, and the project, the cloud credit estimate and the crawl scope are the destination’s. A same-site redirect leaves no record.
The hops are requested before the credit check and before the run is registered: a balance that is too low, or a shutdown, still leaves those requests sent, but nothing is registered or charged. Every hop goes through the same egress guard as the crawl. A redirect into a private network, a link-local address or a cloud metadata address is refused and never requested, unless the start URL itself is on that private network. The hops are resolved even under --offline: that is the one request per hop that reaches another site, and what it finds is audited offline. Redirects that a page, rather than the start URL, answers with (a meta refresh or a script) are not part of this chain.
Deep start URLs
squirrel audit https://nutshop.squirrelscan.com/blog/raw-vs-roasted-nuts audits the whole site at
https://nutshop.squirrelscan.com, not only /blog/. Before crawling, the CLI names both
the requested page and the site-wide origin. The requested page is placed first
in the crawl frontier, ahead of sitemap pages, so it is included even with a
small --max-pages value. JSON reports keep the distinction as
meta.requestedUrl alongside meta.baseUrl. If the requested URL redirects,
its resolved destination receives that frontier priority. A root URL that
redirects to a deep page keeps root-start reporting and frontier order: the order follows the URL you typed, not where it redirects. An origin-only start URL
such as https://nutshop.squirrelscan.com/ has the existing behavior and prints no notice.
Fully offline audit
Run an audit with no cloud and no requests to other sites: no cloud analysis, no
publishing, no update checks, no telemetry. The site’s own hosts are the audited
host, its www or apex twin, the domains in [project] domains and the
subdomains of all of them. Nothing goes to any other host:
- External links are not checked, and neither are the third-party scripts,
stylesheets and fonts the pages load.
reliability/broken-resourcesreports them as not measured. - A page that redirects to another host is recorded as the redirect it answered with, and the other host is not requested.
- A sitemap that robots.txt lists on another host is not requested.
crawl/sitemap-existsandcrawl/sitemap-validsay it was skipped, not missing, andcrawl/sitemap-4xxsays how many sitemap URLs on another site it skipped. - A stylesheet, script, image, font or PDF on the site that redirects to
another host is not followed there;
reliability/broken-resourcesreports it as not requested. One on thewwwor apex twin, or on a[project] domainshost, is checked like the site’s own. - The soft-404 confirmation, the cloaking probe and the AI agent access probe stay on the site: a redirect off it is not followed.
Results are stored in the local database as usual:
squirrel audit https://nutshop.squirrelscan.com --offline--offline cannot be combined with --publish or --render (both require
cloud access and login).
--offline does not imply --passive: see
Offline and passive are separate.
Ephemeral runs
A signed-in squirrel audit does more than use the cloud. It adds the site to your dashboard (or reuses it), turns on recurring audits after the site’s first successful audit, and publishes the report. --ephemeral keeps the cloud features and drops all of that:
squirrel audit https://nutshop.squirrelscan.com --ephemeralAn ephemeral run:
- does not add the site to your dashboard, so it never counts toward your plan’s website limit and never fails with
WEBSITE_LIMIT - does not schedule the site, and never turns a schedule on later
- does not publish a report unless you pass
--publishtoo. An explicit--publishwins, also over[cloud] ephemeral = true, and publishes an unlisted report that is attached to no dashboard site (the CLI prints its URL and says so). Without--publish, the summary says the run was not published - is charged exactly like the same audit without it: 50 credits plus 2 per audited page, plus any external link checks. Your credit history and usage list it as “Ephemeral CLI run” with the domain, so nothing is invisible to you or your organization owner
- prints a line at the end of the summary saying the run was ephemeral, and prints the Ephemeral mode in the header when the run uses your account
Use it for sites you do not own or manage (prospects, clients, competitors), one-off checks, and CI jobs against preview URLs. Set [cloud] ephemeral = true in squirrel.toml to make it the default for a project, and pass --no-ephemeral to run one audit the normal way.
--ephemeral --offline is accepted. An offline run saves nothing anyway, so the CLI prints one line saying the flag has no effect.
The server has to support the option. If it does not confirm the run as ephemeral (an older server that ignores the field), the CLI prints a warning that the site may have been added and scheduled, so you can remove it from the dashboard, and it publishes nothing, even with --publish.
Batch audits
--urls-file audits a list of sites in one command. Each URL runs as its own squirrel audit process, so one site that hangs or crashes cannot take the batch down.
squirrel audit --urls-file urls.txt --out-dir reports/ --concurrency 4 --max-pages 25 --offlineThe file has one URL per line. Blank lines and lines that start with # are ignored, and a URL without a scheme is read as https://. Only http and https URLs are accepted, a URL with a username or password is refused, and so is a host on a private network, loopback or link-local address unless you pass --allow-private-hosts. The file may be 64 MB, each line 2048 characters, and list up to --max-urls URLs (100000 by default). The file is treated as untrusted: a refused line is recorded with its reason, with any password and query values masked.
Every other audit option is passed to each audit. -o/--output, --resume, --project-name and --summary are refused with --urls-file: a batch writes one report per URL, and resumes on its own. -f/--format applies to every report and defaults to json. --concurrency sets how many audits run at once, not the crawl worker pool of each one (use --per-host or [crawler] concurrency for that). Two URLs on the same host never run at the same time. Batch mode is local only for now: signed-in runs must pass --offline.
Each URL’s report is <out-dir>/<key>.<ext>, where key is the first 16 hex characters of the SHA-256 of the URL, so a name never comes from a path or query. A lock file <out-dir>/.batch.lock stops two batches on one directory; it is taken over when its process is gone.
Results file
<out-dir>/results.jsonl has one JSON object per line, appended as each URL starts and finishes. A later line for the same key replaces an earlier one. Treat every field as data: URLs and messages come from the list and the sites.
| Field | Meaning |
|---|---|
v | Record format, 1 |
url | The URL as audited |
key | Stable name of the URL’s report and record |
status | running, completed, partial, blocked, unreachable, redirected, failed, timeout, crashed, rejected or skipped-budget |
reason | Why: the audit’s reason code (dns, max_duration, …), url_timeout, signal_<name> or the refusal for a rejected line |
exitCode | The audit’s exit code; absent when it was killed by a signal |
attempt | 1, plus one for each --retry-failed run |
startedAt, finishedAt, durationMs | Timings |
report | The report file, relative to --out-dir |
score, pages | Overall score and pages crawled |
finalUrl | The site that was audited |
error | A short one-line message for a failed URL |
blocked, unreachable and redirected come from exit codes 3, 5 and 4. A running line with nothing after it means the batch died while auditing that URL, and it is read as crashed.
Resume and retry
Run the same command again to resume, after a crash, a reboot or Ctrl-C. URLs that are completed or partial are skipped, and new URLs in the file run. URLs that failed are skipped too, so a resume does not hammer a dead site: add --retry-failed to run them again (attempt goes up). A URL the batch itself stopped (crashed with reason interrupted) is not a failure of the site: it runs again on a plain resume, as the next attempt. --restart moves results.jsonl to results.<timestamp>.jsonl and starts over. Changing --max-pages or --level does not invalidate completed URLs: use --restart. A SIGINT, SIGTERM or SIGHUP stops starting new audits, asks the running ones to stop, and exits 130. A second one kills the running audits, still recording each as interrupted, and a third exits at once.
--max-duration applies to each URL, not to the batch, so 500 URLs with --max-duration 60 can still take hours. --url-timeout is the hard kill per URL and defaults to --max-duration x 1.5 + 60 when --max-duration is set.
Batch exit codes
| Code | Meaning |
|---|---|
0 | Every URL ended completed or partial and no --fail-on gate tripped |
1 | The batch could not run: bad arguments, an unreadable or oversized file, an out-dir that cannot be written, or another batch holds the lock |
2 | No URL failed, but a --fail-on gate tripped for at least one |
6 | At least one URL ended failed, blocked, unreachable, redirected, timeout, crashed, rejected or skipped-budget (outranks 2). --retry-failed runs exactly these again |
130 | Stopped by SIGINT or SIGTERM; run it again to resume |
A summary with the count per status goes to stderr in every case, so -f json leaves stdout alone.
Batch and corpus retention
The defaults are tuned for one site: a project keeps keep_audits = 3 audits and the content store is capped at 1 GB (least recently used pages go first). Hundreds of sites in one batch change the picture:
[storage]
keep_audits = 1 # 0 for report-only corpora: nothing to resume or diff from
content_store_max_bytes = 21474836480 # 20 GB, sized to the corpus if you analyse stored HTML laterSQUIRREL_CONTENT_STORE_MAX_BYTES sets the cap for a single run. Fetched HTML lives only in the content store, so once it is evicted it is gone: keep the JSON reports, which hold the findings. Every audit in a batch is a normal audit, so squirrel report <domain> works for the kept audits afterwards.
Plan roughly 600 MB of memory per concurrent audit, and prefer a lower --concurrency on a laptop.
Gate CI on audit results
Use --fail-on to fail a CI build when an audit crosses a threshold you set.
Thresholds are absolute, not a comparison with an earlier audit. The command exits
with code 2 when any threshold trips (vs 1 for operational errors and
0 when everything passes), and prints a summary of what tripped:
# Fail if the overall score drops below 90, or any error-severity issue is found.
# Quote each expression — shells treat bare < and > as redirection.
squirrel audit https://nutshop.squirrelscan.com --fail-on 'score<90' --fail-on 'severity>=error'
# Comma-separated form, plus a per-category threshold
squirrel audit https://nutshop.squirrelscan.com --fail-on 'score<90,score:perf<80,warnings>0'Supported metrics:
| Expression | Trips when |
|---|---|
score<N | overall health score is below N |
score:<category><N | a category score (e.g. score:perf<80) is below N |
severity>=error | any error-severity finding exists (also >=warning) |
errors>0 | there is at least one error-severity finding |
warnings>0 | there is at least one warning-severity finding |
Operators: <, <=, >, >=, =; all five work on the numeric metrics
(score, score:<category>, errors, warnings). For severity, = means
the exact rank (e.g. severity=warning trips on warnings but not errors);
use >= for “at least” (e.g. severity>=warning trips on warnings or errors).
A security rule that ran past its time budget did not check some pages, so an empty result there is not a clean one. It stays out of the score, and the gate counts each such rule as one warning-severity finding: warnings>0 and severity>=warning trip on it, errors and score do not. A gate that only uses errors or score therefore passes when a security rule timed out: add a warnings or severity>=warning gate, or raise [rules] time_budget_ms and run again. The count appears only in the gate summary (+1 timed-out security rule), never as a finding in the report. The summary says which rule timed out and on how many pages. Other rules that time out are not counted.
The gate summary is written to stderr, so machine formats like --format json
keep a clean stdout for piping. A malformed expression fails fast (exit 1)
before any crawl runs.
Time limit
--max-duration <seconds> (or [crawler] max_duration) puts a wall-clock budget on the whole audit. A slow or throttling site can otherwise keep a run going for minutes, and a batch or CI job that kills the process at its own timeout gets no report at all. With the limit set, the audit stops launching new work when the budget is reached and writes the report from what it has.
What happens at the limit:
- The crawl stops launching requests. Pages already in flight get a few seconds to finish. Discovery (robots.txt, the sitemaps and the other root files) may use at most 30% of the budget before the first page, so a site whose
robots.txtor sitemaps never answer cannot use the whole limit before a page is fetched; whatever it did not reach is reported as not checked. - Rules run on the pages that were fetched, and the report is written as usual.
- The report has
status: "partial"andstatusReasonCode: "max_duration", and amaxDurationobject counting what was left:unfetchedPages(discovered, never fetched),pagesNotEvaluated(fetched, rules never ran),siteChecksCut(the site-wide checks did not finish) and, when the resource checks ran out of time,resourceChecksCut(some size and script findings may be incomplete) and, when a probe before the page checks hit its own deadline,probesSkipped(which) and, when a page was over 5 MiB,pagesTooLargewithtooLargePages(see Limits below). The score covers the audited pages only. The JSON, text, Markdown and LLM reports and the console name the cut; the XML and HTML reports carry the coverage notice only and do not name the time limit.
{
"status": "partial",
"statusReason": "Stopped at the 240 s time limit (--max-duration): 38 discovered pages were not fetched",
"statusReasonCode": "max_duration",
"maxDuration": { "seconds": 240, "unfetchedPages": 38, "pagesNotEvaluated": 0, "siteChecksCut": false }
}Exit margin. The process stops its own work within max(10% of the budget, 15 seconds) after the limit: a 60 s budget ends by 75 s, a 600 s budget by 660 s, counted from when the command starts, so the start URL’s redirect check, the reachability check and the discovery requests before the first page are inside it. The redirect check normally allows each hop 10 seconds; under --max-duration it is cut to what is left of the budget, so a start host that never answers does not run past the limit. Slow link and resource checks are cut inside that margin, and the rules phase is cut at its end. The requests made before the page checks (the soft-404 re-fetch of suspect pages and the cloaking probe, when enabled) have their own deadline, 30% of the way through the margin: a probe still going then is stopped (no further request is sent and the one in flight is aborted), the page checks run on the pages that were fetched, and maxDuration.probesSkipped lists the probes that were skipped (soft-404-confirmation, cloaking-probe). A skipped soft-404 confirmation leaves its suspect pages marked unconfirmed, still reported, never dropped. A rules phase that has to be cut at the end of the margin loses the site-wide checks, and siteChecksCut says so; it is true only when they really did not finish. The cloud steps before the probes (the cloud prefetch and technology detection) do not start after 20% of the margin and are abandoned at that point if they are still running: their result is dropped, and credits already spent are not refunded. The cloud editor summary and domain statistics steps run after the rules and are not bounded by the limit, so a signed-in run can take longer than the margin while they finish. The page checks keep at least 3 seconds after the probes before no further page starts. Writing the report takes a moment more, and publishing to the dashboard is not counted.
Exit code. A partial report exits 0 like any finished audit, so a --fail-on gate still decides pass or fail. Read status and statusReasonCode to tell a cut-short run from a complete one. A site that never answers the first request fails at the limit as an unreachable start URL: exit 5 and an unreachable report of class timeout whose reason reads no response from the site within the request timeout (the Ns --max-duration time limit was reached). A site that answered but had no page fetched by the limit fails with exit 1, because there is nothing to report on.
Limits. The margin covers waiting, not computation, and parsing a page cannot be interrupted partway. So a run with --max-duration does not parse a page whose HTML is over 5 MiB once decoded (the size of the text the parser would read, not the compressed size on the wire, so a small gzip response that inflates past it counts), whatever time is left: during the crawl it is stored but yields no links (so pages only reachable through it are not found), and the rules do not evaluate it. The cap is a flat size, not an estimate of the parse time against the remaining budget, so a smaller page of dense markup can still take seconds to parse. Each page left out is counted in pagesTooLarge and the first 20 are listed in tooLargePages; the report’s reason says they were too large to parse within the time limit. A run without --max-duration has no such cap. The limit also has a ceiling of 604800 seconds (7 days); a larger value, in the flag or in squirrel.toml, is refused.
A run that finishes before the limit, or that the limit did not cut, is a normal completed report and has no maxDuration. Unset means no limit. squirrel report shows a stored partial audit the same way.
Filtering rules
Use --rule-include / --rule-exclude to run only some rule categories, for
a faster pass or to focus on one area. Bare tokens expand to the whole
category (ax → ax/*); exact rules also work (core/meta-title):
# Only run agent-experience and performance rules
squirrel audit https://nutshop.squirrelscan.com --rule-include ax,perf
# Run everything except images and social
squirrel audit https://nutshop.squirrelscan.com --rule-exclude images,social
# Repeatable or comma-separated, same as --fail-on
squirrel audit https://nutshop.squirrelscan.com --rule-include ax --rule-include perf--rule-include replaces the categories that run for this audit;
Excluding rules also skips the pre-crawl requests that only those rules read:
--rule-exclude ax sends none of the
discovery probes.
--rule-exclude skips categories on top of whatever would normally run. When
either flag is set, the report is partial: the health score is recomputed
from only the included categories and the console output prints a
partial audit: ... notice in its Report detail section at the end.
The json, html, text, markdown, xml and llm formats carry the same marker
(meta.partialAudit in json, with the included categories). The marker is saved
with the audit, so squirrel report rebuilding it later prints it too, and the
payload of squirrel audit --publish or squirrel report --publish carries it. A
filtered run, or one narrowed by --wcag-level or [rules] wcag_level, is still
not auto-published: only an explicit --publish sends it, on either command. An unfiltered run carries no marker. A Pro-gated rule you excluded with --rule-exclude is
not listed as a locked rule. An unknown category
errors before crawling, listing the valid category codes. --fail-on score:<category>
referencing an excluded category also errors up front, since it could never
trip.
Targeted audits
Use --target-url to audit exactly the pages you name, for a quick re-check of the pages a change touched. Repeat the flag for each URL. A URL is absolute, or a path on the site you are auditing:
squirrel audit https://nutshop.squirrelscan.com --target-url /shop --target-url https://nutshop.squirrelscan.com/blog/raw-vs-roasted-nutsA targeted audit fetches robots.txt (and honours it) and then those URLs, and no other page: no sitemap, no discovery probes, no link following, and no request for the start URL itself unless you list it. The links on the listed pages are status-checked as in any audit, and only those: each link target is checked once, internal ones with a status-only request (the [internal_links] check, its HEAD control sent to a listed page) and external ones when external link checks are on for the run (the level’s setting, or --external-links and --no-external-links). A link that only appears on a page you did not list is never requested. The report’s audit level records the run as targeted (targeted: true). Pass the site’s final host as the start URL, because its redirect is not resolved, and the first listed URL stands in for it in the reachability check. Each listed URL goes through the same scope, robots and length checks as any page, and --max-pages caps the list. A list is cut at 1,000 URLs: the rest are counted in overLimit and not audited.
How a targeted audit differs from a full one:
- Site rules run when the listed pages are enough to judge them. These run on a targeted audit, over the listed pages only:
crawl/robots-txt, because the file is always fetched.links/broken-links,links/broken-anchorsandlinks/broken-external-links: broken links and anchors on the listed pages. A link target that was not checked (over the check’s limit, or link checks turned off) is reported as not checked, never as fine, and an anchor into a page you did not list is not judged.security/leaked-secrets: the listed pages and the scripts they load.security/csp,security/hstsandsecurity/x-frame-options: each listed page that answered is judged on its own response headers, and each finding names the pages it was read from. A full audit reads them from the entry page.
- Rules that need the whole site do not run, unless they have a comparison set. Every other site rule (orphan pages, inbound links, sitemap coverage, duplicate content and titles across pages, discovery probes) is skipped with the reason
targeted-run: it reports Not checked, never a pass or a finding. A finding from an earlier audit that depends on a skipped rule is not resolved by the targeted run, andsquirrel report --diffnever counts a site finding that names no page (such as a header the full audit read from the home page) as fixed by a targeted run. - It is not published on its own. A signed-in targeted audit does not auto-publish, because a report of a few pages would replace the site’s latest audit (and the baseline a CI gate compares against). Pass
--publishto publish it anyway. The outcome’spublish.reasonistargeted. - The score covers what ran. Without smart audits, the health score is computed from the listed pages and the rules that ran, so it is not comparable with a full audit’s score. With smart audits on, the run is merged over the union of the pages known from earlier audits, so the score covers that union: the listed pages are fresh, the rest keep their earlier findings, carried and marked as such, and nothing is resolved by a rule that did not run.
- Every URL is accounted for. The report’s
scanScope.targetedsays how many URLs were requested and audited, and lists each one that was not, with its reason, up to 100:robots_disallowed,over_max_pages(past the--max-pagescap),url_too_long,invalid_url,email_protection(a Cloudflare email-protection link is an address, not a page),failed, a scope reason for a URL on another site, orredirected. A URL over 2,048 characters is stored cut short withurl_too_long. - A redirecting URL is recorded as a redirect. Its destination is audited only when you list it too. When you do not, the report names it as the
destinationof the redirected URL.
{
"scanScope": {
"targeted": {
"requested": 3,
"audited": 2,
"unaudited": [{ "url": "https://example.com/old", "reason": "redirected", "destination": "https://example.com/new" }]
}
}
}The JSON report carries the same as meta.targeted (schema 1.16), and the console scan line adds Targeted run: 2 of 3 URLs given were audited; rules that need the whole site were not run.
Comparison set
A site rule such as content/duplicate-description compares pages with each other, so on its own a targeted audit has nothing to compare. Add --compare-url (repeatable, same URL forms as --target-url) to hand it the other pages:
squirrel audit https://nutshop.squirrelscan.com --target-url /shop --compare-url /shop/almonds --compare-url /shop/cashewsComparison URLs are fetched once each, like targets, through the same scope, robots and length checks, and count against --max-pages together with the targets (they appear in scanScope.targeted as requested and audited URLs, and page rules run on them). --compare-url without --target-url is an error.
Two rules declare a bounded comparison set (comparisonSet: "listed-pages": their verdict depends only on the pages fetched) and run over the targets plus the comparison set:
content/duplicate-descriptioncrawl/schema-noindex-conflict
Every other site rule judges the whole site or a probe a targeted audit never sends, so it stays Not checked with the reason targeted-run, never a pass. A rule with a comparison set but no --compare-url is Not checked too. To verify a fix for a duplicate cluster, pass every URL of the cluster from the earlier report as a --compare-url.
A finding from an earlier audit counts as fixed only when its pages were fetched again: squirrel report diff lists a finding whose pages were not among the targets and the comparison set as not compared, never as fixed.
Summary output
Use --summary for a quick score check without the per-issue detail — useful
in CI logs or a fast re-check:
squirrel audit https://nutshop.squirrelscan.com --summaryThis prints the header, health score, category breakdown, editor’s summary
(when present), and per-category issue counts, but skips individual rule
findings and affected-page lists. Console format only — combine with a
non-console --format and the command errors up front.
Passed rules
Use --include-passed to list the rules that passed after the issues, with how many pages each passed on:
squirrel audit https://nutshop.squirrelscan.com --include-passedIt works with every --format. To list them for an audit you already ran, use squirrel report --include-passed.
Pages list
--include-pages adds the crawled pages to the JSON report, for a pipeline that tracks which pages a run actually covered:
squirrel audit https://nutshop.squirrelscan.com -f json --include-pagesIt is off by default, so the report and its size are unchanged unless you ask. Each entry is { "url", "finalUrl", "status", "outcome", "ruleCount" } (plus reason on a URL with no stored page, see below): the URL the crawl requested, where it was served from (url again when it did not redirect, which is the case for every listed page: a URL that redirected is recorded as a redirect, not a page, and is listed in redirects instead, see below), the HTTP status it answered with, how it answered (outcome: ok for any status under 400, redirects included; rate-limited for 429; http-error for any other 4xx or 5xx; error without a usable status). rate-limited is rare in this list: a request the host rate-limited usually stores no response and is counted in rateLimited instead, so a row carries it only when a 429 response was stored. ruleCount is how many distinct rules reported on the page (a skipped check does not count, and neither do site-wide rules). url and finalUrl are written as the crawl stored them: a URL that carries credentials appears with them, so treat the file as you would the crawl. The list is cut at 2,000 pages; pagesTotal is the real count and pagesTruncated is true when entries were dropped. A URL the crawl requested but stored no page for (a connection error, a server error that survived retries, a rate-limited request, an excluded or out-of-scope URL, one robots.txt blocks) is listed after the crawled pages with status 0, ruleCount 0, an outcome of error (the request failed) or skipped (the crawl chose not to request it) and a reason: rate-limited, excluded, not-included, other-site, robots-disallowed, url-too-long, or a short code from a fixed list that never carries a URL, query string, token or response text: http-<status> for an HTTP error status (http-500 for a server error that survived retries), blocked (a WAF or bot refusal), timeout, dns, tls, connection-refused, connection-reset, too-many-redirects, off-site-redirect, unreadable-body, or request-failed for a failure no other code names; a skipped URL whose recorded reason is none of the listed ones is skipped. Failed requests are listed before skipped URLs, so the 2,000-entry cut never drops an error to keep a skipped URL, and a listed url is cut at 2,048 characters. Those rows count toward pagesTotal and the 2,000-entry cut; rate-limited pages are also counted in rateLimited. To get the list for an audit you already ran, use squirrel report --include-pages. In any other format the flag does nothing and the command says so on stderr. See the JSON output schema.
A URL that redirected to another page is not a page (see redirecting URLs are not pages), so it is not in pages. It is in a sibling redirects list, each entry { "url", "finalUrl", "status", "hops" }: the URL the crawl requested, where it landed, the 3xx status it answered with and how many redirect responses came before the landing page. redirectsTotal is the real count, and the list is cut at the same limit as pages. The key is absent when nothing redirected. A consumer that read finalUrl from a page row of a redirecting URL finds it here (JSON schema 1.15).
Verbose output
squirrel audit https://nutshop.squirrelscan.com -vOutput formats
console (default)
Human-readable output with colored issue severity:
Account not signed in: run squirrel auth login to unlock cloud features
Dashboard https://app.squirrelscan.com
Auditing https://nutshop.squirrelscan.com/
Level quick · max 25 pages
Probing passive · no probe rules
Config defaults
...
✓ Audited 25 pages in 8.7s
──────────────────────────────────────────────────
SQUIRRELSCAN REPORT
https://nutshop.squirrelscan.com • 25 pages • 94/100 (A)
──────────────────────────────────────────────────
...
ISSUES
┌ Security (1 warning)
│
│ security/csp Content Security Policy (warning)
│ ⚠ csp-unsafe-scripts: CSP allows 'unsafe-inline'
│ → /
│
└────────────────────────────────────────────────
...
──────────────────────────────────────────────────json
Machine-readable JSON for CI/CD pipelines and AI processing:
squirrel audit https://nutshop.squirrelscan.com -f json -o report.json{
"url": "https://example.com",
"crawledAt": "2025-01-08T00:00:00Z",
"pages": [...],
"issues": [...],
"stats": {
"totalPages": 12,
"issueCount": { "high": 2, "medium": 3, "low": 5 }
}
}html
Visual report you can open in a browser:
squirrel audit https://nutshop.squirrelscan.com -f html -o report.html
open report.htmlProgress without a terminal
With no terminal on stdout (a CI job, a pipe, a supervisor), the audit has no spinner. The step after the crawl walks every crawled page before the rules run, and on a big site that takes minutes, so it writes a progress line to stderr about every 15 seconds while it runs. The line is written between batches of pages (a batch is sized by bytes, so on any site one ends every few seconds), which means a single batch that takes longer than 15 seconds shows no line until it ends:
Walking pages: 40/104It goes to stderr, so --format json and piped stdout stay clean, and it stops when the walk ends. A terminal keeps its spinner and prints no extra lines. There is no --quiet flag; redirect stderr (2>/dev/null) to drop the line. Set SQUIRREL_WALK_HEARTBEAT_MS to a number of milliseconds to change the 15 seconds, for a supervisor with a shorter watchdog.
Crawl behavior
The audit command manages crawl sessions intelligently:
| Scenario | Behavior |
|---|---|
| First run | Creates new crawl |
| Re-run (completed) | New crawl, uses cache for 304s |
| Re-run (interrupted) | Resumes from where it left off |
| Config changed | New crawl with fresh scope |
Empty successful pages
A successful HTML response that permits a body counts as an audited page even when its body is zero bytes. squirrel treats it as an empty document, so checks such as missing title and missing H1 apply, and the page is included in the report’s page count, coverage and score. Responses without an HTML content type, responses whose body was not captured, and no-content statuses such as 204 are not treated as empty documents.
Query-string variants
A page and a query-string copy of it (/contact and /contact?subject=Billing) are two URLs the crawl fetches and checks, but they are one page to the reader. A crawled page whose rel=canonical points at another crawled page of the same path is counted with that page: a finding on both lists one affected page, the page total and the scan line count the pages once, and the report says how many variants were folded (Scan: 5 pages crawled ... 1 query-string variant counted with its canonical., meta.canonicalVariants in JSON).
Each folded variant is listed with the page it is counted with in meta.canonicalVariantPages (the first 100) in the JSON report, so no URL is lost. Only a declared canonical folds a page. A variant with no canonical, with a canonical of its own (a paginated listing, a search or filter page), or whose canonical is another path, another host or a page the crawl did not fetch stays a page of its own and is listed separately. Every variant is still fetched and checked, so scores and issue counts do not change, and a finding on a variant stays in the tallies; only how many pages are counted does. One caveat: a page whose canonical points at another page is folded even when its content differs, for example /blog?page=2 declaring /blog as its canonical (a common pagination mistake). squirrel counts it with /blog because that is what the site told search engines; give such a page its own canonical to have it listed separately. The entity map, which describes every crawled URL, still lists them. A smart audit’s union of carried pages is not folded.
Caching
squirrelscan caches page content locally. On subsequent audits:
- 304 Not Modified: Uses cached content (fast)
- 200 OK: Fetches fresh content (slower)
Use --refresh to bypass the cache entirely.
The scripts an audit fetches are cached for 24 hours, so a re-audit within a day reads them from the cache instead of requesting them again. Each cached script keeps its content type, compression, caching headers and response time, so the caching, compression and render-blocking checks judge it as they did on the run that fetched it. --refresh (or --no-incremental) turns this cache off for the run: every script is requested and nothing is cached. A script that redirects or sends a SourceMap header is never cached, so its redirect and source map findings stay accurate on every run.
Rule results
Skipping the fetch only saves the download. squirrelscan also caches the rule results for each page, so a re-audit of a page nothing has touched replays its findings instead of parsing the page and running its rules again. On a site that has not changed, this is most of the audit.
A page replays only when every input its rules read is unchanged:
- the page’s exact HTML, byte for byte
- its status, headers, redirect chain and response timings
- the version of squirrel that produced the results
- the rules’ own code, so a rule fix that ships without a version change (or one you make in a source checkout) still re-runs the rules on unchanged pages
- which rules are enabled, and the options they run with
Change any of them and that page is audited again. Rules that read the whole site rather than one page always run.
Every report says what happened, so you never have to guess whether you are reading a fresh measurement:
"rulesCache": { "pagesReplayed": 2480, "pagesEvaluated": 20 }--refresh turns it off along with the page cache. To turn off only the rule
cache, set SQUIRREL_RULE_CACHE=0.
The rule cache and template fan-out run together. A page’s cached results also record the template cluster it belonged to and the page whose template-shared verdicts it holds, so when the first page of a cluster changes, the pages that inherited its verdict are checked again instead of replaying a stale one. A fully replayed audit reports what a fresh audit of the same content reports.
Cached results live in the project database and are removed with the audit they
belong to, so squirrel self disk --prune reclaims them along
with everything else that audit is holding.
Audit history
A successful audit retires the audits older than the newest 3 for that project,
so re-auditing does not grow project.db without bound. Retired audits stay
listed and can no longer be opened; the page cache the next audit reads is never
part of what goes. A run that ends failed or blocked neither retires
anything nor counts towards the window. The audit says so on stderr whenever it
retires something:
Retired 1 older audit and freed 95.2 MB inside project.db for the next audit; keep more with [storage] keep_audits (now 3)Change the window, or turn it off, with
[storage] keep_audits.
Exit codes
| Code | Meaning |
|---|---|
0 | Success, including a partial report cut short by --max-duration (check status) |
1 | Error (invalid URL, crawl failed, a site that answered with an error, no page fetched before the --max-duration limit although the site answered, etc.). A start URL that is not http:// or https:// with a host (ftp://, file://, mailto:, javascript:) is refused first, before any request: no run is registered and nothing is charged |
2 | A --fail-on threshold tripped (CI gate) |
3 | The audited page was blocked, so nothing was audited: a WAF or bot manager challenge or block page, or a bare 403 or 429 from the server (see blocked by a WAF or bot manager). Every report with status: "blocked" exits 3 |
4 | The start URL redirected to another site and the run was not told to follow it (or the chain looped, passed 5 hops, or reached a refused hop), so nothing was audited. See Start URLs that redirect |
5 | The start URL could not be reached (DNS failure, connect timeout, connection reset or refused, a TLS error), so nothing was audited. With -f json, -f xml or -f llm the run still writes a report with status: "unreachable" (see Unreachable start URLs) |
6 | Batch mode only (--urls-file): at least one URL failed. See batch exit codes |
Which code wins
The code is computed once, at the end of the run, from what happened. The first row that applies decides it:
| Order | What happened | Code |
|---|---|---|
| 1 | The start URL could not be reached | 5 |
| 2 | The start URL redirected to another site and was not followed | 4 |
| 3 | The run stopped before a report: bad flags, a refused start URL, a store problem, a plugin that would not load, an audit error | 1 |
| 4 | The report is blocked | 3 |
| 5 | The report is failed | 1 |
| 6 | An explicit --publish failed | 1; the --fail-on gate is not evaluated |
| 7 | A --fail-on threshold tripped | 2 |
| 8 | Anything else, including a partial report | 0 |
An automatic publish that fails (a signed-in audit publishes on its own) does not change the code: the audit itself succeeded, so the run exits 0 unless a row above applies, the failure is printed on stderr, and the run is recorded as an error in your dashboard history. A script that must know reads outcome.publish in the report. A blocked site with an explicit --publish that fails exits 3, not 1: the audit’s own outcome outranks the publish.
--format json and --format llm carry the answer in the report itself, so a CI step or an agent does not have to wait for the process to end:
{
"status": "completed",
"outcome": {
"exit_code": 0,
"status": "completed",
"publish": { "status": "skipped", "reason": "offline" }
}
}publish.status is published, skipped or failed. publish.reason is why publishing was skipped (offline, no-publish, config-off, signed-out, rule-filter, targeted, ephemeral, non-public-host, server-ignored-ephemeral) or the error code of a failed publish (for example PAYLOAD_TOO_LARGE). The LLM report has the same facts as <outcome exit-code="0" status="completed" publish="skipped" publish-reason="offline"/>. The JSON and LLM reports are written after publishing finishes, so they can include its result.
Unreachable start URLs
When the start URL cannot be reached, the audit stops before it crawls and exits 5. The format you asked for still gets a report, to --output or stdout, so a batch job can tell a site that is down from a crash without reading stderr:
{
"status": "unreachable",
"url": "https://example.com/",
"statusReasonCode": "dns",
"statusReason": "getaddrinfo ENOTFOUND",
"message": "Cannot reach https://example.com/: getaddrinfo ENOTFOUND. No audit ran and there is no score."
}statusReasonCode is one of dns, tls, connection (refused, reset, or a connection that timed out), timeout or unknown, the same codes a failed audit uses. statusReason is the probe’s own error text, so its wording follows the runtime (for example ECONNREFUSED: Unable to connect... or Connection timed out). The URL is printed without its query, fragment and credentials. console and text formats print the same facts as text, and a ✗ Cannot reach ... line goes to stderr in every format.
Configuration
The audit command respects settings from squirrel.toml:
[crawler]
max_pages = 100
delay_ms = 200
timeout_ms = 30000
include = ["/blog/*"]
exclude = ["/admin/*"]
[rules]
enable = ["*"]
disable = ["ai/*"]
[storage]
keep_audits = 3See Configuration for all options.
Using with AI
Pipe JSON output to your LLM:
squirrel audit https://nutshop.squirrelscan.com -f json | claude "analyze this SEO report"Or use with Claude Code’s MCP integration for interactive auditing.
Related
- Crawling - How the crawler works
- Configuration - Config file options
- squirrel report - View stored audit reports
Large crawls
A crawl with more than 250,000 stored checks (about 1,200 pages) gets a sampled report body, so the report phase does not hold every check of the crawl in memory at once. The score, the passed, warning and failed totals, and every issue class are the same as the full body. What is left out is stated in the JSON report under reportBody (mode, totalChecks, keptChecks, rulesFolded, pageChecksOmitted, reason): per-page check lists are empty, and a rule with more than 500 checks keeps one folded entry per issue class with its page count. A crawl under the limit, and any smart audit, is unchanged. Pass --full-report to build the whole body whatever its size, at the cost of memory.