Command line

The complete reference of node src/cli.mjs - every option with its default, outputs (NDJSON, CSV, HTML report), comparison, segments, resume, sitemap and extraction.

Usage

node src/cli.mjs <url> [options]
node src/cli.mjs --list urls.txt [options]

The CLI prints the score and the issues in your language, saves the crawl as gzipped NDJSON (which the interface opens with Import or from the history), and with --csv exports pages.csv and issues.csv, with --report writes a branded HTML audit report that you can print to PDF. JSON, CSV and report are each written as a stream and independently: one failure does not block the others, and the exit code is 1 if any failed.

Examples

node src/cli.mjs https://www.example.com --max 2000 --csv --report --lang en
node src/cli.mjs https://www.example.com --render --ua googlebotMobile --report --client "ACME" --author "Your name"
node src/cli.mjs --list urls.txt --lang de --csv
node src/cli.mjs --sitemap https://www.example.com/sitemap.xml --extract "price=.price" --extract "sku=xpath://meta[@itemprop='sku']/@content" --csv
node src/cli.mjs https://www.example.com --report --compare crawls/previous.jsonl.gz
node src/cli.mjs --resume crawls/.en-cours/www.example.com_2026-10-21T09-00-00.ndjson --csv
node src/cli.mjs https://www.example.com --max 20000 --segments segments.json --csv --report
node src/cli.mjs https://www.example.com --ga4-key ga4-key.json --ga4-property 123456789 --csv
node src/cli.mjs https://staging.example.com --auth user:pass --rate 2 --robots report --path-limit "/blog/=200" --extract "price=.price" --remove-params "utm_*,gclid"
node src/cli.mjs --help

Options

Generated from node src/cli.mjs --help in the repository (3.21.0); defaults come from the code.

OptionDescriptionDefault
--max NMax URLs (500)500
--depth NMax depth (20)20
--concurrency NConcurrent requests (5)5
--delay MSDelay between requests per worker (0)0
--ua NAMEarachnide | googlebot | googlebotMobile | chromearachnide
--renderJavaScript rendering with Chrome / Edge (installed browser)
--list FILEList mode: crawl only the URLs of a text file (one per line)
--externalCheck external links
--imagesCheck image size and status
--rate NMax URLs per second (global cap)
--robots MODErespect | report (ignore but report) | ignorerespect
--custom-robots FUse this robots.txt file instead of the site's one
--per-depth NMax URLs per crawl depth
--folder-depth NMax folder depth
--max-params NMax number of query strings
--max-redirects NMax redirects to follow (10)10
--path-limit P=NLimit by URL path, e.g. "/blog/=200" (repeatable)
--remove-params LRemove URL parameters, e.g. "utm_*,gclid"
--auth USER:PASSHTTP authentication (staging sites)
--header "K: V"Custom HTTP header (repeatable)
--extract N=SELCustom extraction (repeatable): N=SEL (CSS, text), N=/regex/, N=xpath:EXPR, N=attr:href:SEL, N=html:SEL, N=count:SEL — one column per rule in pages.csv
--sitemap URLList mode from a sitemap or sitemap index: crawl exactly the URLs it lists
--keep-paramsKeep URL parameters as they are (by default: sorted, tracking params utm_*/gclid/fbclid… removed)
--robots-unavailable allow|disallowrobots.txt in 5xx or unreachable: disallow all (RFC 9309, default) or allowdisallow
--psi NPageSpeed Insights + Core Web Vitals (CrUX) for the N most important pages
--psi-key KEYGoogle API key (or env ARACHNIDE_PSI_KEY) --psi-strategy mobile|desktop
--gsc-key FILESearch Console: service account JSON key file
--gsc-property PSearch Console property (sc-domain:example.com), auto-detected if omitted
--gsc-days NSearch Console period in days (90)90
--gsc-csv FILEImport a Search Console "Pages" CSV export instead of the API
--ga4-key FILEGoogle Analytics 4: service account JSON key file (the Search Console one works if it has access)
--ga4-property IDGA4 property ID (123456789), auto-detected from the domain if omitted
--ga4-days NGA4 period in days (90)90
--ga4-csv FILEImport a GA4 "Pages and screens" (or "Landing page") CSV export instead of the API
--alert-email A,BEmail an alert if the crawl got worse than the previous one (for cron jobs)
--alert-score-drop NAlert threshold in score points (5)5
--ignore-robotsIgnore robots.txt (same as --robots ignore)
--subdomainsCrawl subdomains too
--no-sitemapDo not read XML sitemaps
--include REGEXOnly crawl matching URLs (repeatable: one regex per flag)
--exclude REGEXSkip matching URLs (repeatable)
--stay-in-folderDo not crawl outside the start URL's folder (https://x.com/blog/ → /blog/… only)
--search TEXTCustom search in the source code (/regex/ supported)
--segments FILESegments (JSON exported from the app, or [{ "name", "match", "rules": [{ "field", "op", "value" }] }]): score, errors and averages per site section, a segment column in the CSV, a section in the report
--segment-foldersOne segment per top-level directory (automatic)
--segment IDReport and CSV on this segment only (e.g. --segment blog)
--lang CODEen | fr | de | es | it | pt (labels, CSV, report)
--csvAlso export pages.csv and issues.csv
--reportAlso generate a professional HTML audit report (print to PDF) · --report-title, --client, --author, --company, --contact, --website, --color "#5b8c1e"
--compare FILEPrevious crawl .json to show the evolution in the report
--out DIROutput folder (./crawls)./crawls
--resume FILEResume an interrupted crawl from its journal (<out>/.en-cours/*.ndjson)
--no-journalDo not write the resume journal during the crawl

Extraction rules

--extract NAME=RULE, repeatable, one column per rule in pages.csv:

RuleMeaning
price=.priceCSS selector, text content
author=attr:content:meta[name=author]CSS selector, attribute value
menu=html:nav.mainCSS selector, inner HTML
links=count:a[href]CSS selector, number of matches
sku=xpath://meta[@itemprop='sku']/@contentXPath (Chrome in rendering mode, jsdom otherwise)
phone=/\+34 \d{3} \d{3} \d{3}/Regular expression (2-second timeout per page)

Outputs

Files are written in --out (default ./crawls), named <host>_<date>:

  • <host>_<date>.jsonl.gz: the full crawl (NDJSON, one JSON object per line, gzipped);
  • <host>_<date>_pages.csv and _issues.csv with --csv (semicolon separated, UTF-8 with BOM, one column per extraction, a Segment column when segments are defined);
  • <host>_<date>_report_<lang>.html with --report;
  • crawls/.en-cours/<host>_<date>.ndjson: the resume journal while a crawl runs (kept after Ctrl+C, deleted on completion).

Press Ctrl+C to stop a crawl cleanly; the CLI then prints the --resume command to pick it up later.

Cron and alerts

--alert-email you@example.com --alert-score-drop 5 compares the crawl with the previous crawl of the same host in the output folder and e-mails you only when something got worse (SMTP settings from the app, or ARACHNIDE_SMTP_URL). See Google data, scheduled crawls and alerts.

Other commands

CommandPurpose
npm startThe web interface on http://localhost:4000 (PORT and HOST to change; ARACHNIDE_NO_SCHEDULER=1 disables scheduled crawls)
npm run mcpThe MCP server over stdio (also arachnide-mcp as a bin)
npm run schedulerScheduled crawls without the interface
npm run bench -- --pages 200000The synthetic-site benchmark
npm testThe test suite (Node 18, 20 and 22)
Version 3.21.0 Reference tables and the changelog are generated from the Arachnide repository (commit f287355). Edit this page on GitHub