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 and Filament projects from natural language prompts.
✨ Features
- Natural language prompts: Describe what you want in plain English and get the exact
php artisancommand. - Smart version detection: Automatically detects Laravel and Filament versions from your
composer.json. - Filament support: Use
--f3,--f4,--f5or--f=Xto force a specific Filament version. - Automatic execution: If you're inside a Laravel project, you can confirm and run the command directly.
- Configurable AI model: Change Gemini model via
config:set. - Clean and simple CLI.
🚀 Installation
-
Install via Composer (recommended globally):
composer global require marceloxp/iartisan
-
Set up your Gemini API key:
export GEMINI_API_KEY=your-api-key-hereOr alternatively:
export IARTISAN_GEMINI_KEY=your-api-key-here -
Verify installation:
iartisan --help
🛠 Usage
Basic usage
iartisan create a model Post with migration and controller
Forcing Filament version
iartisan --f5 make a filament resource for User iartisan --f4 create a filament page for dashboard iartisan --f6 make a filament widget # future versions supported
Inside a Laravel project (auto-detection)
When a composer.json exists in the current directory, IArtisan automatically detects:
- Laravel version
- Filament version (if installed)
You can still override with --fX if needed.
Configuration
# Set custom Gemini model iartisan config:set GEMINI_MODEL=gemini-2.5-flash # Clear configuration iartisan config:clear gemini_model
📚 Examples
-
Basic Laravel
iartisan create a migration to add status column to users table
-
Filament 5
iartisan --f5 make a filament resource for Product -
Run migrations
iartisan run all pending migrations
📦 Requirements
- PHP 8.1+
- Composer
- Google Gemini API key
- (Optional) Laravel project for auto-detection and execution
🤝 Contributing
Contributions are welcome! Feel free to fork the repository and submit a pull request. Please follow PSR-12 coding standards.
📄 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.
