marceloxp/iartisan

IArtisan β€” Craft Artisan commands with AI-powered ease

0.1.3 2025-09-21 01:38 UTC

This package is auto-updated.

Last update: 2025-09-21 01:38:26 UTC


README

Craft Artisan commands with AI-powered ease

screenshot

Packagist Version License

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.) via config: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

  1. Install via Composer:

    composer global require marceloxp/iartisan
  2. Set up your Gemini API key:

    export GEMINI_API_KEY=your-api-key

    or:

    export IARTISAN_GEMINI_KEY=your-api-key
  3. 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.