An open API service indexing awesome lists of open source software.

https://github.com/marceloxp/iartisan

Craft Artisan commands with AI-powered ease
https://github.com/marceloxp/iartisan

artisan artisan-command filament filamentphp gemini-ai ia laravel

Last synced: 2 months ago
JSON representation

Craft Artisan commands with AI-powered ease

Awesome Lists containing this project

README

          

# IArtisan

> Craft Artisan commands with AI-powered ease

![screenshot](https://raw.githubusercontent.com/marceloxp/iartisan/refs/heads/main/images/illustration.png)

![Packagist Version](https://img.shields.io/packagist/v/marceloxp/iartisan)
![License](https://img.shields.io/github/license/marceloxp/iartisan)

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 artisan` command.
* **Smart version detection**: Automatically detects Laravel and Filament versions from your `composer.json`.
* **Filament support**: Use `--f3`, `--f4`, `--f5` or `--f=X` to 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

1. **Install via Composer** (recommended globally):

```bash
composer global require marceloxp/iartisan
```

2. **Set up your Gemini API key**:

```bash
export GEMINI_API_KEY=your-api-key-here
```

Or alternatively:

```bash
export IARTISAN_GEMINI_KEY=your-api-key-here
```

3. **Verify installation**:

```bash
iartisan --help
```

---

## 🛠 Usage

### Basic usage

```bash
iartisan create a model Post with migration and controller
```

### Forcing Filament version

```bash
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

```bash
# Set custom Gemini model
iartisan config:set GEMINI_MODEL=gemini-2.5-flash

# Clear configuration
iartisan config:clear gemini_model
```

---

## 📚 Examples

* **Basic Laravel**

```bash
iartisan create a migration to add status column to users table
```

* **Filament 5**

```bash
iartisan --f5 make a filament resource for Product
```

* **Run migrations**

```bash
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](LICENSE).

---

## 📬 Support

For issues or feature requests, please open an issue on the [GitHub repository](https://github.com/marceloxp/iartisan).

For questions, contact Marcelo at **[marceloxp@gmail.com](mailto:marceloxp@gmail.com)**.