Search by

nyoncode / laravel-package-console

NyonCode

Artisan-like generators and scaffolding for developing Laravel 12 and 13 packages, with first-class laravel-package-toolkit support

Package info

github.com/NyonCode/laravel-package-console

pkg:composer/nyoncode/laravel-package-console

Statistics

Installs: 12

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2026-11-06 23:08 UTC

This package is auto-updated.

Last update: 2026-11-06 23:09:43 UTC


README

Anvil

Anvil: an Artisan-like console for Laravel packages

Anvil is php artisan make:* for people who build Laravel packages. It supports Laravel 12 and 13.

php anvil make:model Post -a
  INFO Model [src/Models/Post.php] created successfully.
  INFO Factory [database/factories/PostFactory.php] created successfully.
  INFO Migration [database/migrations/create_posts_table.php] created successfully.
  DONE Registered ->hasMigrations() in src/BlogServiceProvider.php.
  INFO Seeder [database/seeders/PostSeeder.php] created successfully.
  DONE Registered ->hasSeeders() in src/BlogServiceProvider.php.
  INFO Controller [src/Http/Controllers/PostController.php] created successfully.
  INFO Policy [src/Policies/PostPolicy.php] created successfully.
  • package:init creates or completes composer.json and scaffolds the package:
    • a service provider and a config file;
    • Pest + Testbench, Larastan and Pint;
    • a GitHub Actions matrix for PHP × Laravel.
  • 34 make:* commands write each file in your package's namespace and register it in your service provider:
  • Works with existing packages. package:init completes composer.json and keeps your provider, test setup and CI.
  • Registration is idempotent. It only adds what is missing and never reformats your code.
  • Every generated file passes Pint and Larastan. Integration tests install a generated package on Laravel 12 and 13 and check every registration in a running application.

Installation

composer require --dev nyoncode/laravel-package-console
vendor/bin/anvil package:init
php anvil list

Requires PHP 8.2+.

Documentation

The full documentation is in docs/:

Testing

composer test               # unit and feature tests
composer test:integration   # installs generated packages on Laravel 12 and 13 (needs network)

See Contributing.

Changelog

See CHANGELOG.

License

The MIT License (MIT). See LICENSE.