enasellithy / smart-ai-docs
Advanced AI tool for Laravel (8-11) to generate Docs and Unit Tests using Ollama, Gemini, and Groq.
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.2
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0
This package is auto-updated.
Last update: 2026-04-27 18:27:36 UTC
README
Smart AIDocs is an intelligent Laravel package that automates the creation of Markdown documentation and PHPUnit tests for your code using AI (Kimi & Groq). Perfect for developers who want to maintain high-quality docs and testing suites without the manual overhead.
✨ Features
- AI Documentation: Generates clear, structured Markdown files for your classes.
- Smart Unit Testing: Auto-generates PHPUnit tests using modern Laravel syntax.
- Dual Provider Support: Seamlessly switch between Kimi AI and Groq Cloud.
- Automatic Fallback: Intelligent error handling if an AI provider is unavailable.
🛠 Installation
1. Add Repository
Since the package is currently in development, add the GitHub repository to your project's composer.json:
composer config repositories.smart_ai_docs vcs https://github.com/enasellithy/SmartAIDocs composer require enasellithy/smart-ai-docs:dev-master --no-audit
2. KIMI_API_KEY=your_kimi_api_key_here
KIMI_API_KEY=your_kimi_api_key_here GROQ_API_KEY=your_groq_api_key_here
3. Publish Configuration
php artisan vendor:publish --provider="SmartAIDocs\SmartAIDocsServiceProvider"
Emample
Generate Documentation only
php artisan ai:generate app/Models/User.php --docs php artisan ai:generate app/Http/Controllers/UserController.php --test php artisan ai:generate app/Services/PaymentService.php --docs --test php artisan ai:generate app/Http/Controllers --docs --test
Ollama Support (Local AI)
ollama pull deepseek-coder:6.7b ollama pull qwen2.5-coder:1.5b
composer require enasellithy/smart-ai-docs:v1.1.0 or composer require enasellithy/smart-ai-docs:^2.0 --no-audit
Configuration
in env
OLLAMA_BASE_URL=http://localhost:11434 SMART_AI_PROVIDER=ollama OLLAMA_DOC_MODEL=deepseek-coder:6.7b OLLAMA_TEST_MODEL=qwen2.5-coder:1.5b SMART_AI_DOCS_PATH=docs