docs-agents-md
v0.1.7
Published
Download documentation from any GitHub repo and generate a compact index for AI coding agents
Maintainers
Readme
docs-agents-md
Give your AI coding agent the docs it needs — in one command.
npx docs-agents-mdDownloads docs from any GitHub repo and injects a compact, token-optimized index into your AGENTS.md or CLAUDE.md — so your AI agent uses real docs instead of hallucinating.
Get Started
# Pick from 20+ presets interactively
npx docs-agents-md
# Or one-liner
npx docs-agents-md --lib nextjs
# Any GitHub repo
npx docs-agents-md --repo vercel/next.js --name nextjs --docs-path docsPresets
20 frameworks built-in. Run npx docs-agents-md list to see all.
| | | | |
| -------------- | -------- | -------- | ---------------- |
| nextjs | react | vue | svelte |
| angular | nuxt | astro | tailwindcss |
| drizzle | prisma | nestjs | express |
| fastify | hono | trpc | tanstack-query |
| react-router | vite | bun | zustand |
Missing one? Use
--repofor any GitHub repo, or open an issue.
What It Does
- Downloads only the docs folder via
git sparse-checkout(fast, minimal) - Indexes all doc files into a single-line, pipe-separated format (minimal tokens)
- Injects into your agent file with namespaced markers (multiple libs coexist)
- Auto-detects your installed version to match the right docs tag
- Gitignores the cache directory automatically
Multiple Libraries
Each library gets its own marker block — they coexist and update independently:
npx docs-agents-md --lib react --output AGENTS.md
npx docs-agents-md --lib drizzle --output AGENTS.md
npx docs-agents-md --lib tailwindcss --output AGENTS.mdOptions
| Flag | Description | Default |
| --------------------- | ------------------------------------- | --------------- |
| --lib <name> | Built-in preset | — |
| --repo <owner/repo> | Any GitHub repository | — |
| --name <name> | Library name (required with --repo) | — |
| --tag <tag> | Git tag or branch | main / preset |
| --docs-path <path> | Docs folder in repo | docs |
| --output <file> | Target file | AGENTS.md |
| --extensions <exts> | File types to index | md,mdx |
Set GITHUB_TOKEN env var for higher API rate limits (5,000/hr vs 60/hr).
Inspiration
Inspired by Vercel's research on AGENTS.md, which showed that documentation context via AGENTS.md significantly outperforms other approaches in agent evaluations.
Contributing
- Add an entry to
src/lib/registry.ts - Run
npm test - Open a PR
License
MIT
