Local documentation capture

Turn any docs site into context your agent can use.

DocHarvest reads a documentation site and writes it to disk as Markdown: one file per page, a combined book, an llms.txt manifest, and a searchable index. Everything happens on your machine, and the files are yours to feed to an agent.

docharvest capture https://docs.example.com

The CLI is installed by pip, uv, Docker, or the Windows installer — no account.

Read the source

Capture specimen

251 indexed lines
FILTER:

14 of 14 rows · 4 captures · 23 pages

14 of 14 rows · 4 captures · 23 pages

  • 10book.md:10 3. [Providers](pages/docs/latest/providers.md) pi.dev
  • 20book.md:20 Guides and references for configuring and extending Pi. pi.dev
  • 28book.md:28 Search documentation pi.dev
  • 72book.md:72 Authenticate with `/login` for subscription providers, or set an API key such as `ANTHROPIC_API_KEY` before starting pi. pi.dev
  • 82book.md:82 * [Providers](latest/providers) - subscription and API-key setup for built-in providers. pi.dev
  • 100book.md:100 * [Custom models](latest/models) - add model entries for supported provider APIs. pi.dev
  • 101book.md:101 * [Custom providers](latest/custom-provider) - implement custom APIs and OAuth flows. pi.dev
  • 116book.md:116 * [Environment variables](latest/environment-variables) - Pi process configuration and session metadata available to bash tools. pi.dev
  • 141book.md:141 Guides and references for configuring and extending Pi. pi.dev
  • 149book.md:149 Search documentation pi.dev
  • 184book.md:184 Configure via `package.json`: pi.dev
  • 195book.md:195 Change `name`, `configDir`, and `bin` field for your fork. Affects CLI banner, config paths, and environment variable names. pi.dev
  • 203book.md:203 **Always use `src/config.ts`** for package assets: pi.dev
  • 248book.md:248 Guides and references for configuring and extending Pi. pi.dev

Rows are read from committed capture data, not a mock terminal.

01 — How it works

One capture, three steps.

Capture once. The same directory serves a person reading a page, a search query, and an agent asking for context.

  1. 01

    Capture

    Give DocHarvest a documentation URL. It identifies the framework, stays inside the docs path, and follows same-domain links. Client-rendered pages are a flag away.

    docharvest capture https://docs.example.com --scope /docs

    Fetches each page and keeps its source URL.

  2. 02

    Compile

    Every page is written as Markdown with its source URL and a content hash. The capture then assembles the book, the llms.txt manifest, and the search index.

    pages/ book.md llms.txt search.db

    The page tree, one combined file, and a SQLite FTS5 index.

  3. 03

    Use it

    Read the files, search the corpus, export a PDF or RAG JSONL, or hand the same library to an agent over MCP. One capture feeds all four.

    docharvest search "token refresh"

    Ranked hits with the file and line each answer came from.

02 — Workflows

The same corpus, four ways in.

Pick the surface that matches the task. Whichever you choose, the files and the library stay in one place.

Repeatable captures

Flags, presets, path scopes, and output modes for scripts and local development. This is the surface the other three call.

docharvest capture https://docs.example.com --output bothSee what it writes

03 — In the app

The capture, shown as it ran.

Real output from DocHarvest 11.6.0 on 2026-11-13. Current screenshots are not available in this environment, so the section shows the run itself and the files it wrote. Both are copyable, and the same command reproduces them.

$ docharvest capture https://docusaurus.io/docs --max-pages 10 --output local -o ./docusaurus-docs
Capturing https://docusaurus.io/docs
Output mode: local   Workers: 5
Max pages:   10

Discovered 1361 pages...
Introduction (12.8 KB)
Plugins (5.3 KB)
Routing (15.4 KB)
Architecture (1.7 KB)
Client architecture (9.1 KB)
`docusaurus.config.js` (16.0 KB)

Provider:      docusaurus
Pages:         10   (skipped: 0)
Local output:  ./docusaurus-docs
Book file:     ./docusaurus-docs/book.md
Manifest:      ./docusaurus-docs/llms.txt
A ten-page local capture: provider detection, pages written, and the files it reports.

Capture

The tool tells you what it found.

Provider detection, page counts, skipped URLs and warnings stay visible while the capture runs — nothing is inferred after the fact.

  • 01

    Paste a docs URL

  • 02

    Confirm scope and provider

  • 03

    Open the local corpus

Inspect and export

The library keeps the work reusable.

Every page keeps its source URL and a SHA-256 content hash, so a citation can be checked later. The same files feed the search index, a RAG pipeline or a PDF reader.

~/.docharvest/docs/<domain>/
output tree, 20-page capture
docusaurus-docs/
  pages/docs/2.x/advanced/plugins.md
  pages/docs/2.x/advanced/routing.md
  pages/docs/2.x/api/docusaurus-config.md
  book.md            119,107 B
  llms.txt             5,327 B
  llms-full.txt      120,753 B
  docusaurus.io_handbook.pdf  139,536 B / 82 pages
one page's frontmatter
---
source_url: "https://docusaurus.io/docs/2.x/advanced/plugins"
title: "Plugins"
crawl_date: "2026-11-13T17:49:45Z"
content_hash: "7d601dcec6a44076edab523816c6ff7b4a7a8308b2f5435ea9fbfc93035dce81"
site_version: ""
---
The five frontmatter fields are source URL, title, crawl date, content hash and site version.

04 — What lands on disk

A capture is a folder, not a black box.

Every artifact has a filename, a consumer, and enough provenance to check what happened. This is the list you get on disk.

DocHarvest output artifacts
ArtifactUseEvidence inside
pages/One Markdown file per captured pagesource_url + content_hash frontmatter
book.md / docs.mdOne combined handbook with a table of contentslocal output / global library
llms.txtA compact index for AI discoverycaptured titles, paths, and source URLs
search.dbSQLite FTS5 BM25 search indexpage and heading records
exports/*_rag.jsonlChunked records for vector storesmetadata, headings, and hashes
exports/*_handbook.pdfPrintable offline handbookpure-Python fpdf2 export
versions/v*.mdSemver snapshots for change reviewunified diff and changelog inputs

05 — Integrations

Three ways to hand an agent the corpus.

The same corpus serves an MCP client, a skill-reading agent, or a plain script. Nothing is uploaded: every route reads the folder under ~/.docharvest.

12 MCP tools

  • download_docs
  • search_docs
  • find_docs
  • read_doc
  • get_doc
  • list_domains
  • list_versions
  • diff_versions
  • get_changelog
  • export_docs
  • query_doc_graph
  • get_related_concepts

2 resources · 2 prompts

Point an MCP client at the local server

docharvest mcp speaks MCP over stdio. Add one entry to the client config; the 12 tools and 2 resources below appear as soon as it connects.

{
  "mcpServers": {
    "docharvest": {
      "command": "uvx",
      "args": ["docharvest", "mcp"]
    }
  }
}

The same JSON works for the 14 clients listed below; only the file path changes.

06 — Supported sites

Eight readers, one fallback.

Each dedicated reader knows where that generator keeps its content and navigation, so it can skip the rendered page and read the source. Everything else goes through the generic crawler, which follows same-domain links and extracts the main content of each page.

Dedicated readers and the checked-in sample URL for each
GeneratorWhat the reader doesSample site
GitBookReads the GitBook content API and its version list.docs.openalgo.in
MintlifyReads the MDX source behind each page.mintlify.com/docs
DocusaurusReads docs routes and the sidebar ordering.reactnative.dev/docs/getting-started
NextraFollows the `_meta` navigation to each page.nextra.site/docs
VitePressReads the Markdown source and sidebar config.vitepress.dev/guide/what-is-vitepress
MkDocsFollows `mkdocs.yml` navigation and Markdown sources.squidfunk.github.io/mkdocs-material/
ReadMe.ioReads the documentation JSON payload per page.docs.readme.com/reference
ReadTheDocsReads the `_sources` tree and version selector.docs.readthedocs.io/en/stable/
Anything elseGeneric crawler: same-domain links, main content per page. Client-rendered pages need the optional--render flag.any URL you are allowed to read

Priorities and reader code live in src/docharvest/providers/.

07 — Checked values

Two checks you can rerun yourself.

Neither number is a projection. The retrieval figure comes from the checked-in fixture corpus, and the test figure comes from the repository suite at 2026-11-27.

Fixture retrieval
1.00hit@5

2 questions over fixture-v1; mean reciprocal rank 1.00. Corpus hash f6ea24a7b9ea…

Repository suite
1009tests

passing, 0 failing, 5 skipped on 2026-11-27.

Agent surface
12MCP tools

Plus 2 resource templates and 2 prompts over stdio, with no network hop of its own.

Account required
None

No login, no quota, no telemetry. Output stays under ~/.docharvest.

Retrieval: uv run python benchmarks/run.py --dataset fixtures --k 5, 2026-10-27. Tests: node docs/scripts/sync-stats.mjs --run, which runs the suite and writes this page’s number.

09 — Questions

Things people ask first.

What does DocHarvest actually do?

It captures one documentation site into a local directory: a Markdown file per page, a combined book, an llms.txt manifest, a SQLite full-text index, and optional JSONL and PDF exports. It runs on your machine and writes nothing anywhere else.

How is this different from a cloud reader API?

A hosted reader charges per page and holds your content on its servers. DocHarvest fetches the pages itself, and the output stays in ~/.docharvest/docs/<domain>/. There is no account, no quota, and no upload step.

Which sites are supported?

Eight dedicated readers cover GitBook, Mintlify, Docusaurus, Nextra, VitePress, MkDocs, ReadMe.io, and ReadTheDocs. Any other site falls back to the generic crawler, which follows same-domain links and extracts the main content. Client-rendered pages need the optional --render flag (Playwright); without it you get the server-rendered HTML.

How do coding agents use the captured docs?

Run docharvest mcp and the agent gets 12 tools (capture, search, read, diff, export, graph queries), 2 resources, and 2 prompts over stdio. The README documents config paths for 14 clients. Or install the bundled skill file instead of an MCP server.

Does it send telemetry, or get past logins and CAPTCHAs?

No. There is no telemetry and no login, paywall, or CAPTCHA bypass: it fetches pages the same way a browser would without credentials. Captures are subject to the source site’s terms and robots rules, which is why the tool is meant for documentation you are allowed to read and keep.