meego47/artisan-wizard

ArtisanWizard is a user-friendly Laravel package that brings interactivity to your artisan commands.

Maintainers

Package info

github.com/meego47/artisan-wizard

pkg:composer/meego47/artisan-wizard

Fund package maintenance!

meego47

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 0

v0.1.0 2026-06-28 17:47 UTC

This package is auto-updated.

Last update: 2026-06-28 18:17:11 UTC


README

Artisan Wizard — interactive Artisan commands for Laravel

Artisan Wizard — interactive Artisan commands for Laravel

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Artisan Wizard turns php artisan into a guided, interactive menu. Instead of remembering a command's exact name and the spelling of every argument and option, you run a single command and let the wizard walk you through it: pick a command from a list, fill in its arguments and options step by step, preview the exact call, and run it — all without leaving your terminal.

It's built on Laravel Prompts and reads every command straight from Artisan's own definitions, so any command registered in your app — first‑party, framework, or third‑party package — shows up automatically.

Why use it

  • Stop memorising commands and flags. Every registered command, its description, arguments, and options are presented to you.
  • Never run a half‑filled command. Required arguments and options are marked [Required], and the Run action only appears once they're all provided.
  • See before you run. The wizard prints the exact artisan … line it's about to execute, then shows the command's output and its exit code.
  • Great for onboarding. New team members can discover what a project's commands do without digging through code.

Features

  • Browse every registered Artisan command, sorted alphabetically with descriptions.
  • Fill arguments and options one at a time, with a running summary of what you've set.
  • Full support for the input types Artisan defines:
    • required and optional arguments,
    • value options (--queue=high),
    • boolean flags (--force),
    • array / variadic arguments and options (add several values).
  • Required‑field gating — Run is hidden until every required field has a value.
  • A live preview of the command, e.g. artisan migrate --force --ansi.
  • Run as many commands as you like in one session, with Back and Exit navigation.

Requirements

  • PHP 8.2+
  • Laravel 10, 11, 12, or 13

Installation

Install the package via Composer:

composer require meego47/artisan-wizard

The service provider is auto‑discovered, so there's nothing else to wire up.

Optionally publish the (currently empty) config file:

php artisan vendor:publish --tag="artisan-wizard-config"

Usage

Start the wizard:

php artisan artisan-wizard:run

A typical session looks like this:

 ┌ Select an artisan command to execute: ──────────────────────┐
 │   make:controller - Create a new controller class           │
 │ › make:model - Create a new Eloquent model class            │
 │   make:migration - Create a new migration file              │
 │   …                                                         │
 │   Exit the wizard                                           │
 └─────────────────────────────────────────────────────────────┘

Filled fields:
  (None yet)

 ┌ Select a field to fill (or run the command): ───────────────┐
 │ › [Required] Fill argument: name - The name of the model    │
 │   Append option: migration - Create a new migration file    │
 │   Append option: factory - Create a new factory             │
 │   Back to command selection                                 │
 └─────────────────────────────────────────────────────────────┘

# → choose the argument and type "Product"
# → append --migration and --factory
# → once "name" is filled, "Run command with current settings" appears

Executing: artisan make:model Product --migration --factory --ansi

   INFO  Model [app/Models/Product.php] created successfully.
   INFO  Migration [database/migrations/..._create_products_table.php] created successfully.

Command executed successfully!

While configuring a command:

  • Pick a field to fill from the menu. Arguments and value options prompt you for input; boolean flags are appended with a single selection. Array fields stay in the menu so you can add multiple values.
  • Run command with current settings appears as soon as all required fields are filled; it runs the command, prints its output, and reports the exit code.
  • Back to command selection returns you to the command list without running.
  • Exit the wizard leaves the session.

Testing

composer test

Static analysis and code style:

composer analyse   # PHPStan / Larastan
composer format    # Laravel Pint

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.