innoraft / ai-readme-generator
This package will generate a Readme.md file according to your codebase.
v1.1.0
2025-04-28 11:12 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.9
- nyholm/psr7: ^1.8
- openai-php/client: ^0.10.3
- symfony/console: ^6.3 || ^7.0
- symfony/http-client: ^6.3 || ^7.0
- symfony/yaml: ^6.3 || ^7.0
- vlucas/phpdotenv: ^5.6
README
Innoraft Readme Generator is a command-line PHP utility that generates a Drupal-style README.md
file for any Drupal module or PHP codebase using AI. It scans the provided module, extracts structured metadata, and produces a high-quality, standardized README automatically.
🚀 Features
- Generates a
README.md
file in the module folder - Supports
.env
-based configuration for flexible local/remote AI services - Can be executed from both the project root and within module folders
🧰 Requirements
- PHP 8.1 or higher
- Composer
- API key and endpoint for AI summarization (e.g., GroqCloud/OpenAI)
📦 Installation
Run this from the root of your Drupal project:
composer require innoraft/readme-generator --dev
⚙️ Setup
Copy the example environment file and update it with your actual credentials.
✅ Usage
📍 From Project Root
vendor/bin/readme-generator web/modules/contrib/MODULE_NAME
This command scans the specified module and writes README.md
inside it.
📂 Output
After running the command, you'll get a README.md
file with:
- Module name
- Description
- Key features and functionality
- Dependency info
- Usage instructions (if derivable)
- Auto-generated AI summary
🤖 Behind the Scenes
- Codebase is scanned and structured data is extracted.
- Data is sent to an AI service configured via
.env
. - AI returns a formatted README, which is saved in your module folder.
🛠 Development Notes
- If you are using this inside a Drupal module or sub-directory, ensure paths are resolved correctly.
- The binary path is defined in the
composer.json
under"bin": ["bin/readme-generator"]
.
📬 Contributing
Found a bug or want to enhance it? Feel free to open issues or submit PRs!
🧑💻 Authors
📄 License
MIT License