Command reference
The crawlforge CLI
Seven commands cover the whole pipeline: fetch one page, crawl a site, evaluate a recipe against a document, diff two revisions of a page, export the stored records, serve the Local Workbench and list the built-in recipes.
crawlforge --help
crawlforge fetch
Fetch a single Crawl Target, clean it into Clean Markdown and optionally evaluate an Extraction Recipe.
crawlforge fetch <url> [--mode auto|static|browser] [--recipe <id>] [--db <path>] [--json]
| Option | Meaning |
|---|---|
| --mode | Acquisition strategy: auto, static or browser. |
| --recipe | Built-in Extraction Recipe applied to the page. |
| --db | SQLite WAL database used for the Snapshot. |
| --json | Print the machine readable result. |
| --no-browser | Never escalate to headless Chromium. |
crawlforge crawl
Crawl a site with a bounded breadth-first queue, optionally seeded from the Sitemap of the site.
crawlforge crawl <seedUrl> [--max-pages N] [--max-depth D] [--prefix /docs] [--sitemap] [--mode auto|static|browser] [--recipe <id>] [--db <path>] [--json]
| Option | Meaning |
|---|---|
| --max-pages | Maximum number of pages fetched by the crawl. |
| --max-depth | Maximum link depth reached by the crawl. |
| --prefix | Restrict the crawl to the URLs under this path. |
| --sitemap | Seed the crawl with the Sitemap of the site. |
| --recipe | Built-in Extraction Recipe applied to every page. |
| --db | SQLite WAL database used for the Snapshots. |
| --json | Print the machine readable result. |
crawlforge extract
Evaluate an Extraction Recipe against a URL or a local file and print the Extracted Record.
crawlforge extract <urlOrFile> --recipe <id> [--file] [--json]
| Option | Meaning |
|---|---|
| --recipe | Built-in Extraction Recipe applied to the document. |
| --file | Read the input from a local file instead of the network. |
crawlforge diff
Compute the Content Diff between the two most recent Snapshots of a normalized URL.
crawlforge diff <url> [--db <path>] [--json]
| Option | Meaning |
|---|---|
| --db | SQLite WAL database holding the Snapshots. |
crawlforge export
Export the Snapshots and the Extracted Records of a crawl job as JSONL, JSON or Markdown.
crawlforge export --format <jsonl|json|markdown> [--job <id>] [--db <path>] [--out <dirOrFile>]
| Option | Meaning |
|---|---|
| --format | Export format: jsonl, json or markdown. |
| --job | Export a single crawl job. |
| --out | Write the export to a file or a directory. |
crawlforge serve
Start the Local Workbench on 127.0.0.1: a zero-auth 3-pane inspector bound to the loopback interface.
crawlforge serve [--port 4310] [--db <path>]
| Option | Meaning |
|---|---|
| --port | Port of the Local Workbench (default: 4310). |
| --db | SQLite WAL database backing the Workbench. |
crawlforge recipes
List the five built-in Extraction Recipes and their fields.
crawlforge recipes [--json]
| Option | Meaning |
|---|---|
| --json | Print the machine readable list. |
Exit codes
What the exit code means
The exit code tells a script whether the run succeeded, was refused, or was asked for something impossible.
| Code | Name | Meaning |
|---|---|---|
| 0 | ok | The command completed successfully. |
| 1 | error | A runtime failure: network, robots policy or browser error. |
| 2 | usage | The arguments are missing, unknown or invalid. |
| 3 | ssrf | The SSRF Guard blocked the target or a redirect hop. |
| 4 | unknown-recipe | The requested Extraction Recipe does not exist. |
| 5 | validation | The Extracted Record did not satisfy the Zod schema. |
Recipes
crawlforge recipes --json
The same list is served as JSON at /api/recipes.json.