Posted on October 15, 2026
AI coding assistants are confident, but they answer from what they saw in training. For APIs that change quickly, that is often out of date. I kept getting Next.js caching answers that were wrong because the API had changed. When I asked where an answer came from, the assistant had no source to show me.
The usual fixes didn't suit me. Web search is fine for broad questions, but it can't see private wikis or runbooks, and it doesn't know which version you're on. Pasting docs into the prompt works for a few pages, but the Next.js docs have 845. Full RAG setups need an embedding API, a vector database, and usually an API key.
I wanted something simpler: index the docs I care about, search them on my own machine, and get back the exact sections with links. So I built Citepath.
Citepath gives your assistant the current docs instead of its memory. Each search returns a few ranked passages, and each one links to the page section or file lines it came from. Your assistant writes the answer from those passages and cites them, so you can check every claim.
Citepath never writes answers itself. It only finds the relevant passages.
It also cuts down how much the assistant has to read. On the Next.js docs, the top 5 passages for "how do I set the cache lifetime" come to about 4,200 characters. The five pages they come from have about 51,000 characters of text.
It works with:
docs/ folder.There are three steps.
citepath add nextjs --url https://nextjs.org/docs/app --sync fetches the pages and splits them by heading. Each passage keeps its heading, so every citation points to the right section.getUserName, --dry-run, and "how do I configure caching" all find what you'd expect. Searches take milliseconds.Here's a real exchange:
Me: Using citepath, how do I set how long cached data lives in Next.js?
Claude: Add'use cache'to the function and callcacheLife('hours'), or pass{ stale, revalidate, expire }. This requirescacheComponents: trueinnext.config.ts. Sources: cacheLife, use cache, cacheComponents
Citepath matches words, not meaning, so "sign in" won't find a page that only says "authentication". In exchange, you get exact matches on identifiers, the same results every time for the same query, and nothing to pay for. Semantic search with an optional local model is something I plan to look at after 1.0.
Citepath is at version 0.1 and needs Node.js 22.16 or later. Install it, add a docs folder, and search:
npm install -g citepathcitepath add my-docs --path ~/work/project/docs --synccitepath search "how do I configure authentication"Then connect it to Claude Code:
claude mcp add citepath -s user -- citepath mcpIt's MIT licensed and open to contributions. If there's a docs site you want it to handle better, open an issue.