Pull public docs into a local Markdown folder for coding agents.
bunx docsnap https://react.dev/reference -m 8 --cleanThe CLI prints progress as it runs:
docsnap: discovering
docsnap: fetching 8 pages
docsnap: extracting 8 pages
docsnap: writing output
docsnap: 8 pages written to docsnap/react-dev-reference in 0.57s
docsnap: page limit reached; rerun with -m 16 for more
docsnap: summary docsnap/react-dev-reference/summary.json
docsnap: manifest docsnap/react-dev-reference/manifest.jsonl
docsnap: agent handoff docsnap/react-dev-reference/AGENT_README.md
It writes:
docsnap/react-dev-reference/
AGENT_README.md
manifest.jsonl
summary.json
tree.txt
...
docsnap works best on sites with readable HTML, llms.txt, sitemaps, or regular links.
bun add -g docsnapdocsnap <url> [options]
Options:
-o, --out <dir> output directory, default docsnap/<site>
-m, --max <count> max pages; default all llms.txt pages, otherwise 50
--concurrency <n> fetch concurrency, default 64
--clean remove output dir before writing
--dry-run run without writing files
--page capture only the given page
--agent-files update existing AGENTS.md/CLAUDE.md files
--json print one machine-readable result
--quiet suppress progress logs
--stdin read the URL from stdin
--fail-on-low-quality exit non-zero when low-quality pages are found
docsnap https://react.dev/reference
docsnap https://react.dev/reference/react/useEffect --page
docsnap https://docs.python.org -o ./python-docs -m 100
docsnap https://docs.djangoproject.com/en/stable/ --agent-filesAGENT_README.md: handoff for the captured docstree.txt: file tree for quick navigationmanifest.jsonl: one record per URLsummary.json: counts, failures, hashes, and timing- Markdown files: readable page captures with source metadata
Blocked, stale, and client-rendered pages are listed in summary.json and manifest.jsonl.
- Bun runtime
MIT