Download the PHP package rdcstarr/docs-generator without Composer
On this page you can find all versions of the php package rdcstarr/docs-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package docs-generator
docs-generator
Generate AI-optimized Markdown documentation from Laravel-ecosystem docs sites (Laravel, Flux UI, Livewire) for Claude Code, Cursor, and GitHub Copilot.
Why
When you work with AI coding assistants in Laravel projects, the model answers better when it has the official docs close at hand — sliced into small Markdown files you can load on demand. This package fetches the public docs, asks an LLM to rewrite each page as a clean, AI-friendly Markdown file, and writes it into the right folder for your IDE (.claude/, .cursor/rules/, or .github/instructions/).
Features
- Three built-in sources: Laravel, Flux UI (with authentication for Flux Pro), and Livewire
- Three IDE targets: Claude (with auto-sync of
CLAUDE.mdindex), Cursor (.mdcwith frontmatter), Copilot (.instructions.md) - Uses the native Laravel AI SDK (
laravel/ai) — 10+ providers out of the box: DeepSeek, OpenAI, Anthropic, Gemini, Groq, xAI, Mistral, Ollama, Cohere, and more - Configurable per-project: enable only the sources you use
- Smart retry with rate-limit backoff
- Skip-existing with
--forceto regenerate - Filter with
--only=routing,eloquentduring development
Installation
Publish the Laravel AI SDK config and run its migrations (used internally by laravel/ai):
Then publish this package's config:
Setup
Add the credentials for whichever AI provider and sources you use in .env. API keys are read by the Laravel AI SDK, so you can use any provider it supports:
In config/docs-generator.php, keep only the sources you want to generate. For a plain Laravel project without Flux/Livewire:
Usage
Generate docs for all enabled sources, for Claude (the default target):
Generate only one source:
Target Cursor or Copilot instead of Claude:
Force regeneration of already-generated files:
Generate only specific pages (matches by slug, case-insensitive, substring):
Use a different AI provider for this run (any key from config/docs-generator.php):
Re-sync the CLAUDE.md index without generating any files:
Output
Claude target (default)
Each source gets its own index.md listing every generated file with its H1 title. Your root CLAUDE.md is touched only between markers:
Anything outside <!-- docs-generator:start --> … <!-- docs-generator:end --> is preserved untouched, so it's safe to keep your own project instructions in the same file.
Cursor target
Copilot target
Extending
Add a new AI provider entry
Most providers you'd want are already available natively through the Laravel AI SDK (OpenAI, Anthropic, Gemini, Groq, xAI, Mistral, Ollama, Cohere, DeepSeek, …). To add another entry to config/docs-generator.php, point class at LaravelAiProvider and set the SDK provider key plus the model you want:
Then add GROQ_API_KEY=... to .env and run php artisan docs:generate --provider=groq.
Add a fully custom AI provider
If you need a service not supported by the Laravel AI SDK, implement Rdcstarr\DocsGenerator\Contracts\AIProvider:
Register it under providers and use it via --provider=mycustom.
Add a custom documentation source
Implement Rdcstarr\DocsGenerator\Contracts\DocsDriver — five methods:
Register it under sources in the config. Helpers Rdcstarr\DocsGenerator\Support\HtmlExtractor and SidebarDiscovery are available to keep your driver small.
Add a custom IDE target
Implement Rdcstarr\DocsGenerator\Contracts\Target and register under targets.
Requirements
- PHP 8.3+
- Laravel 13+
laravel/ai(installed automatically as a dependency)
License
MIT © rdcstarr
All versions of docs-generator with dependencies
guzzlehttp/guzzle Version ^7.0
illuminate/console Version ^13.0
illuminate/http Version ^13.0
illuminate/support Version ^13.0
laravel/ai Version >=0.9 <1.0