定制 marceloxp/iartisan 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marceloxp/iartisan

最新稳定版本:0.1.3

Composer 安装命令:

composer require marceloxp/iartisan

包简介

IArtisan — Craft Artisan commands with AI-powered ease

README 文档

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.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-21