SEO command line toolkit

The spiderhead command exposes every core tool for scripts, CI and terminal work. Commands shown in the docs are checked in CI.

What it does

Scriptable

Output is JSON on stdout, so you can pipe it into jq, a script or a CI step. Exit code 0 means the command completed and 1 means it could not finish, with the reason in the JSON. Inputs can be flags, a JSON object with --input, or JSON on stdin. Most commands that write files need an explicit path or flag such as --out or --apply.

  • Explicit budgets: crawl-site takes --max-urls, --max-depth and --max-urls-per-second
  • Exit code 2 is used only by log-scan, for a run whose own numbers disagree
  • Commands shown in the docs are run against fixtures in CI

Tool catalogue

tool-catalog searches what each command does, whether it uses the network, writes files or can spend money. It filters before paging, so a query like redirect returns a short list. Add --include-arguments when you need the argument shapes. It works offline and writes nothing.

  • Effects are marked as offline, network, writes or paid
  • Paid provider commands show an offline estimate and need explicit confirmation
  • spiderhead doctor checks browser, MCP and SQLite prerequisites without writing

One handler, two faces

Every public capability is one handler. It is exposed as a spiderhead command and as an MCP tool with the same name, so crawl-site becomes seo_crawl_site. What you test in a terminal is what an agent calls. Grouped forms are aliases: scan list is scan-list.

  • spiderhead mcp starts the local stdio server
  • The sf commands are the entry points for the external crawler audit workflow
  • The CLI runs on macOS and Linux; Windows is planned for 0.10

Three steps, one saved scan

  1. Pick a command

    Run spiderhead --help or search with tool-catalog. Each command has one job and a single entry in the catalog.

  2. Read JSON and the exit code

    Output is always JSON on stdout. Exit code 0 means the command completed. Exit code 1 means it could not finish, and the reason is in the JSON.

  3. Same commands for AI agents

    spiderhead mcp starts a local MCP server. Every command is also a tool named seo_<command>, for example seo_crawl_site.

Checks in this feature

CheckWhat it meansSeverityEvidence
BROKEN_PAGE_4XXThe page returns a 4xx response.CriticalResponse code per URL from crawl-site
SERVER_ERROR_5XXThe page returns a 5xx response.CriticalResponse code per URL from crawl-site
BLOCKED_BY_ROBOTSrobots.txt blocks the URL.Importantrobots.txt rule matched for the URL from crawl-site
SITEMAP_URL_4XX_5XXThe sitemap lists a URL that returns 4xx or 5xx.CriticalSitemap entries from sitemap-crawl
SITEMAP_DESYNCThe sitemap URL set and the crawled URL set do not match.ImportantSitemap from sitemap-crawl compared with crawl-site
URL_NOT_IN_SITEMAPAn indexable page is missing from the sitemap.TipCrawl result compared with the sitemap URL set

One command

bash
spiderhead tool-catalog --query redirect --limit 5

Install first: installation guide. Every command also runs as an MCP tool for AI agents.

What you need

  • The Rust toolchain to build it; no Python and no virtual environment
  • A URL, a saved scan file or a project folder, depending on the command
  • Optional: a local Chrome for rendering and PDF
  • Provider keys only for paid or account-based commands

Limits

  • Commands marked network send requests. Run tool-catalog to see which ones
  • Output is for machines first. There is no interactive prompt flow, apart from the terminal observer
  • The native crawl is not full parity with the external crawler. Some checks come back skipped, never falsely clean
  • Paid and account-based sources need your own keys, which the toolkit does not provide

Questions

Does the CLI need an account or a hosted service?
No. The CLI runs on your machine. Offline commands, such as tool-catalog and the saved-scan commands, read local data only. Commands marked network send requests to the site or to a data provider.
How do I know if a command costs money?
Run tool-catalog. Each entry shows whether the command uses the network, writes files or costs money. Paid semantic commands need explicit confirmation, and the MCP version refuses to run without confirm_paid=true.
Will a crawl change my site?
No. Crawls send read-only requests. Files are written only to the path you give, such as --scan-out or --out-dir. By default a crawl saves its scan under ./scans/.
What does a non-zero exit code mean?
Exit code 1 means the command could not complete. Its JSON has ok set to false, or an error line goes to stderr if the process crashed. Exit code 2 is used only by log-scan.
Can I pass complex input without many flags?
Yes. Most commands accept --input with a JSON object that maps to the handler arguments, and some read JSON from stdin.
Which operating systems are supported?
macOS and Linux today; Windows support is planned for 0.10. The CLI is built from source with cargo.

Try it on your own site