Repository navigation
CLI Reference
Harsimran Sidhu edited this page Jul 15, 2026
·
1 revision
Every command-line flag, grouped by purpose. Run website-downloader --help to see the same list in your terminal.
Only --url is required. On invalid input the tool logs the problem and exits with code 2.
| Flag | Default | Description |
|---|---|---|
--url URL |
(required) | Starting URL to crawl. |
--destination DIR |
derived from hostname | Output folder for the mirror. |
--max-pages N |
50 |
Maximum number of HTML pages to crawl. Must be ≥ 1. |
--sitemap [URL_OR_FILE] |
off | Seed the crawl from sitemap.xml. Omit the value to use /sitemap.xml; or pass a URL or local file. Nested sitemap indexes are followed. |
--respect-robots |
off | Respect robots.txt rules for HTML page crawling. |
| Flag | Default | Description |
|---|---|---|
--page-threads N |
1 |
Concurrent HTML page fetch workers. Default 1 stays polite; raise it to speed up large mirrors. Forced to 1 when --render-js is on. |
--threads N |
6 |
Concurrent asset download workers. Must be ≥ 1. |
--delay SECONDS |
0.0 |
Delay between page fetches. Applies per page worker, so effective rate scales with --page-threads. |
--max-asset-bytes N |
unlimited | Skip assets larger than this many bytes. |
💡 Install the
[fast]extra (lxml) for faster HTML parsing — it is detected and used automatically when present.
| Flag | Default | Description |
|---|---|---|
--download-external-assets |
off | Download external CDN/static assets and rewrite the allowed ones locally. |
--external-domains D [D ...] |
none | Allowlist of external domains to download from. Implies --download-external-assets. |
See External Assets and CDN for details.
| Flag | Default | Description |
|---|---|---|
--cookie NAME=VALUE |
none | Send a cookie with every request. Repeatable. |
--cookie-file FILE |
none | Read cookies from a file using cookie-header syntax (a=1; b=2). Repeatable. |
--header "Name: Value" |
none | Add a custom request header, e.g. --header "Authorization: Bearer …". Repeatable. |
--user-agent STRING |
browser-like UA | Override the default User-Agent. |
Requires the [render] extra. See JavaScript Rendering.
| Flag | Default | Description |
|---|---|---|
--render-js |
off | Render pages with Playwright before parsing. |
--headless |
off | Alias for --render-js. |
--render-wait-until MODE |
networkidle |
Playwright wait condition: commit, domcontentloaded, load, or networkidle. |
--render-timeout-ms N |
30000 |
Navigation timeout in milliseconds. Must be ≥ 1. |
See Incremental Updates.
| Flag | Default | Description |
|---|---|---|
--update |
off | Reuse ETag / Last-Modified cache metadata to skip unchanged resources. |
--cache-file FILE |
DEST/.website-downloader-cache.json |
Path to the update cache. Requires --update. |
| Flag | Default | Description |
|---|---|---|
--progress |
off | Show a Rich progress dashboard (needs the [ux] extra). |
--zip-output FILE |
off | Write the finished mirror to a zip archive. |
--warc-output FILE |
off | Write downloaded resources to a WARC 1.1 response archive. |
See Exports Zip and WARC.
The tool rejects invalid combinations with exit code 2:
-
--max-pages,--threads,--page-threadsmust be ≥ 1 -
--delaymust be ≥ 0 -
--max-asset-bytesmust be ≥ 1 (when set) -
--render-timeout-msmust be ≥ 1 -
--cache-filerequires--update