Fetch documentation for Rails, Turbo, and Stimulus and inject compact indexes into your `CLAUDE.md` or `AGENTS.md` for AI coding agents.
npm install @drew-goddyn/agentdocsFetch documentation for Rails, Turbo, and Stimulus and inject compact indexes into your CLAUDE.md or AGENTS.md for AI coding agents.
Inspired by Vercel's AGENTS.md approach.
``bash`
npx @drew-goddyn/agentdocs
Or install globally:
`bash`
npm install -g @drew-goddyn/agentdocs
Auto-detects Rails version from Gemfile.lock:
`bash`
npx @drew-goddyn/agentdocs rails
Or specify a version:
`bash`
npx @drew-goddyn/agentdocs rails --rails-version 7.1.3
`bash`
npx @drew-goddyn/agentdocs turbo
`bash`
npx @drew-goddyn/agentdocs stimulus
1. Downloads documentation from the official GitHub repos
2. Builds a compact pipe-delimited index of available docs
3. Injects the index into your CLAUDE.md (or AGENTS.md) with unique markers.gitignore
4. Adds the docs cache directory to
Each source uses unique markers, so you can use all three in the same project:
`markdown
[Rails 7.1.3 Docs]|root:.rails-docs/rails-7.1.3/guides/source|...
[Turbo Docs]|root:.turbo-docs/_source|...
[Stimulus Docs]|root:.stimulus-docs/_source|...
`
| Flag | Description |
|------|-------------|
| -o, --output | Output file (default: auto-detect CLAUDE.md or AGENTS.md) |-y, --yes
| | Skip confirmation prompts |-f, --force
| | Force re-download even if cached |-r, --rails-version
| | Rails version (rails command only) |
When an AI agent reads your CLAUDE.md, it sees:.rails-docs/rails-7.1.3/guides/source`)
- The root path to the docs (e.g.,
- A categorized index of available documentation
- A reminder to search docs before relying on training data
The agent can then read specific docs as needed rather than hallucinating outdated information.
MIT