# docspack — Version-locked documentation for AI agents > Local, version-locked documentation packages for AI agents, indexed in SQLite and served over MCP. > docspack is a CLI, not a service: it reads `node_modules` and a local SQLite index, and > `sync`, `ask`, `search` and `list` make no network requests at all. Version 0.1.1, > MIT, requires Node >=22.5.0. ## Install ```sh npm i -D docspack # or: pnpm add -D docspack npx docspack sync # index the docs packages this project depends on npx docspack ask "how do I verify a webhook signature" ``` A documentation package is an ordinary npm package named `@vendor/docspack` or `@docspack-community/`. Add it to `package.json`, run `docspack sync`, and its chunks are indexed into a shared SQLite database with FTS5. ## Giving an agent access Any agent with a shell can run `docspack ask`, so one line in AGENTS.md or CLAUDE.md is the whole setup — no server, no per-client configuration, nothing resident when nobody is asking: ``` Run `docspack ask ""` for documentation on this project's dependencies. It answers from the installed versions. ``` ## Closed sets A name that is not in these lists does not exist. Do not invent one — a plausible-looking command or kind fails at the CLI, and an invented manifest field is accepted and ignored. ### Commands (12) - `docspack sync` — Index the docs packages this project depends on - `docspack ask` — Answer from the local index — the command to give an agent - `docspack search` — Same index, formatted for a human reading the terminal - `docspack list` — Show this project's docs packages and their index state - `docspack verify` — Check the docs still describe the code you installed - `docspack feedback` — Record documentation problems: add, list, submit, remove - `docspack mcp` — Serve the index over MCP instead, as a long-lived process - `docspack sources` — List curated sources that `docspack build` can fetch - `docspack init` — Scaffold a documentation package, then build and check it - `docspack build` — Generate the .llms/ payload for publishing - `docspack doctor` — Check a package the way the indexer and a reviewer would - `docspack preview` — Answer a query from the local package, as an agent would ### Feedback kinds (3) - `drift` — a name the docs use that the library does not declare. Must name the identifier. - `incorrect` — documented behaviour that differs from actual. Must carry --expected, --actual and --repro. - `missing` — behaviour the docs do not cover. Must carry --expected, --actual and --repro. There is deliberately no kind for "this page is confusing": an unfalsifiable claim is infinitely generatable and of no use to a maintainer. ### Response limits - Chunks per answer: 3 by default (`--limit`) - Tokens per answer: 3000 by default (`--max-tokens`), counted from the manifest before content is returned ### Manifest schema The `.llms/manifest.json` of a docs package validates against https://docspack.dev/schema/v1.json. The package format — naming, layout, every manifest field and the rules a consumer enforces — is specified at https://docspack.dev/spec. ## Published packages - [docspack](https://www.npmjs.com/package/docspack) — The CLI and MCP server: build, sync, search and ask. - [@docspack/registry](https://www.npmjs.com/package/@docspack/registry) — Curated llms.txt sources for bootstrapping docs packages. - [@docspack/docspack](https://www.npmjs.com/package/@docspack/docspack) — docspack's own documentation, shipped as a docs package. ## Rules to install in a host project Copy-paste blocks for an adopter's AGENTS.md / CLAUDE.md / .cursor/rules, including which source wins when a retrieved chunk disagrees with recalled knowledge: https://docspack.dev/ai-rules.md ## Curated sources (27) Projects whose published llms.txt `docspack build ` can turn into a docs package. The id is the first column. Any llms.txt URL also works without being listed. - `anthropic` — Anthropic / Claude: Claude API, Agent SDK and Claude Code documentation. (publishes llms-full.txt) - `better-auth` — Better Auth: Framework-agnostic authentication library for TypeScript. - `bun` — Bun: JavaScript runtime, bundler, test runner and package manager. (publishes llms-full.txt) - `clerk` — Clerk: User management, authentication and session handling. (publishes llms-full.txt) - `cloudflare` — Cloudflare Developers: Workers, Pages, R2, D1, KV and the rest of the developer platform. (publishes llms-full.txt) - `convex` — Convex: Reactive backend-as-a-service with a TypeScript function model. (publishes llms-full.txt) - `drizzle` — Drizzle ORM: TypeScript ORM with a SQL-like query builder. (publishes llms-full.txt) - `elysia` — Elysia: Ergonomic TypeScript web framework for Bun. (publishes llms-full.txt) - `expo` — Expo: Framework and platform for universal React Native apps. (publishes llms-full.txt) - `hono` — Hono: Small, fast web framework built on Web Standards. (publishes llms-full.txt) - `nextjs` — Next.js: React framework with file-system routing and server rendering. (publishes llms-full.txt) - `nuxt` — Nuxt: Vue framework for server-rendered and static applications. (publishes llms-full.txt) - `prisma` — Prisma: Type-safe database toolkit, schema and migrations. (publishes llms-full.txt) - `pydantic-ai` — Pydantic AI: Agent framework for building applications with generative models. (publishes llms-full.txt) - `resend` — Resend: Email API for developers. (publishes llms-full.txt) - `sentry` — Sentry: Error monitoring, tracing and performance tooling. - `shadcn-ui` — shadcn/ui: Copy-and-paste React component collection built on Radix and Tailwind. - `stripe` — Stripe: Payments, billing, checkout and financial APIs. - `supabase` — Supabase: Postgres platform with auth, storage, realtime and edge functions. (publishes llms-full.txt) - `svelte` — Svelte: Svelte and SvelteKit documentation. (publishes llms-full.txt) - `tanstack` — TanStack: Query, Router, Table, Form and the rest of the TanStack libraries. (publishes llms-full.txt) - `trigger-dev` — Trigger.dev: Background jobs and durable workflows for TypeScript. (publishes llms-full.txt) - `turborepo` — Turborepo: Build system for JavaScript and TypeScript monorepos. (publishes llms-full.txt) - `vercel` — Vercel: Deployment platform, edge network and build system. (publishes llms-full.txt) - `vite` — Vite: Build tool and dev server for modern web projects. (publishes llms-full.txt) - `vitest` — Vitest: Vite-native test runner. (publishes llms-full.txt) - `zod` — Zod: TypeScript-first schema validation with static type inference. (publishes llms-full.txt) ## Documentation - [docspack overview](https://docspack.dev/docs/overview.md) — docspack gives AI coding agents the documentation of the dependencies a project actually installed. Documentation is distributed as npm packages, indexed locally into SQLite, and served to agents over the Model Context Protocol. - [Installing and syncing](https://docspack.dev/docs/install-and-sync.md) — docspack is a CLI. Run it with `npx docspack `, or install it as a dev dependency to pin the version your team uses. - [Connecting an agent](https://docspack.dev/docs/agents-and-mcp.md) — There are two ways to give an agent the documentation. The command line is the simpler one and works everywhere; MCP is there for clients that prefer a declared tool. - [Searching from the command line](https://docspack.dev/docs/searching.md) — `docspack search` runs the same query an agent would, and prints the results. Use it to check that a package is indexed, to see what an agent will receive, or to find something yourself. - [Authoring a documentation package](https://docspack.dev/docs/authoring-a-package.md) — A documentation package is a normal npm package whose payload is Markdown rather than code. `docspack init` scaffolds one, `docspack build` regenerates it, `docspack doctor` checks it and `docspack preview` shows what an agent would get back. - [Trust and safety](https://docspack.dev/docs/trust-and-safety.md) — Documentation packages are third-party input that ends up in a model's context. docspack treats them accordingly. - [How docspack compares](https://docspack.dev/docs/how-it-compares.md) — docspack overlaps with several things an agent can already do. The differences are worth being precise about, because most of them are not about capability but about which version of the truth reaches the model, and how much of it. - [Writing documentation for agents](https://docspack.dev/docs/writing-for-agents.md) — A documentation package is read by a model, not a person browsing a website. That changes what belongs in it. `docspack doctor` enforces most of this, so the rules below are what the warnings mean. ## Everything in one file - [llms-full.txt](https://docspack.dev/llms-full.txt) — this file with every page above inlined, for a single fetch - Offline, no web access: `npm i -D @docspack/docspack` installs the same documentation as a docs package ## Links - Site: https://docspack.dev - Source (MIT): https://github.com/docspack/docspack - npm: https://www.npmjs.com/package/docspack - Releases: https://github.com/docspack/docspack/releases