marceloxp / iartisan
IArtisan β Craft Artisan commands with AI-powered ease
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.5
- symfony/console: ^6.4 || ^7.0
- symfony/process: ^6.4 || ^7.0
- ulrichsg/getopt-php: ^4.0
README
Craft Artisan commands with AI-powered ease
IArtisan is a command-line tool that uses the Google Gemini API to suggest php artisan
commands for Laravel 12 or PHP Filament projects from natural language prompts. Whether youβre a beginner or an experienced developer, IArtisan translates your intent into ready-to-run commands.
β¨ Features
- Natural language prompts: describe what you want in plain English and get the equivalent
php artisan
command. - Filament support: use
--filament3
or--filament4
to generate Filament-specific commands. - Optional execution: if you are inside a Laravel project (with an
artisan
file present), you can confirm and execute the generated command directly. - Configurable AI model: choose which Gemini model to use (
gemini-2.5-flash
,gemini-pro
, etc.) viaconfig:set
. - Secure configuration: API keys are managed via environment variables or persisted settings.
- Clean CLI: no irrelevant Symfony commands or options, just the essentials.
π Installation
-
Install via Composer:
composer global require marceloxp/iartisan
-
Set up your Gemini API key:
export GEMINI_API_KEY=your-api-key
or:
export IARTISAN_GEMINI_KEY=your-api-key
-
Verify:
iartisan --help
π Usage
Basic prompt
iartisan create a model Post with migration and controller
Output:
Generated Command:
php artisan make:model Post -m -c
Filament support
iartisan --filament4 make a filament page for dashboard
Output:
Generated Command:
php artisan make:filament-page Dashboard
Configuration
Set a custom Gemini model:
iartisan config:set GEMINI_MODEL=gemini-pro
Clear a configuration:
iartisan config:clear gemini_model
π Examples
-
Create a migration:
iartisan create a migration to add status column to users table
-
Generate a Filament resource:
iartisan --filament3 make a filament resource for User
-
Run migrations (with confirmation inside a Laravel project):
iartisan run database migrations
π¦ Requirements
- PHP 8.1+
- Composer
- Laravel 12 (for command execution)
- Google Gemini API key
π€ Contributing
Contributions are welcome! Please fork the repository and submit a pull request. Follow PSR-12 standards and include relevant tests.
π License
MIT β see LICENSE.
π¬ Support
For issues or feature requests, please open an issue on the GitHub repository. For questions, contact Marcelo at marceloxp@gmail.com.