dev-to-geek/laravel-init

A little package I use to add preconfigured tools (PHPStan, Larastan, Pint, Pail, ...) to my projects

Fund package maintenance!
Dev2Geek

Installs: 7 559

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 1

Open Issues: 1

pkg:composer/dev-to-geek/laravel-init


README

Latest Version on Packagist GitHub Tests Action Status PHPStan Total Downloads

A Laravel package that bootstraps your project with preconfigured development tools via a single artisan command.

Requirements

  • PHP ^8.3
  • Laravel ^12.0

Installation

composer require dev-to-geek/laravel-init --dev

Usage

php artisan laravel-init:install

This command will automatically install and configure the following tools:

  • Laravel Pint -- Automated code formatting (with pint.json config).
  • Larastan -- PHPStan + Larastan static analysis (with phpstan.neon.dist config).
  • Pest PHP -- Modern testing framework with Mockery, Laravel and Livewire plugins.
  • Laravel Pail -- Real-time log viewer.
  • Rector -- Automated code refactoring (with rector.php config).
  • Laravel Boost -- MCP Server for AI-assisted development.

No manual setup is required; everything is ready to use after running the command.

Options

--only -- Install specific tools

Install only the tools you need instead of the full suite:

# Install only Pint and Larastan
php artisan laravel-init:install --only=pint --only=larastan

# Install only Pest
php artisan laravel-init:install --only=pest

Valid tool names: pint, larastan, pest, pail, rector, boost.

--force -- Overwrite existing configuration files

By default, existing configuration files (pint.json, phpstan.neon.dist, rector.php) are not overwritten. Use --force to replace them:

php artisan laravel-init:install --force

--remove-me -- Self-uninstall after setup

Remove the laravel-init package from your project after all tools have been installed:

php artisan laravel-init:install --remove-me

Suggested composer scripts

After installation, you can add these scripts to your composer.json:

"scripts": {
    "test": "@php artisan test",
    "test-coverage": "@php artisan test --parallel --coverage",
    "analyse": "vendor/bin/phpstan analyse --memory-limit=2G",
    "format": "vendor/bin/pint",
    "refactor": "vendor/bin/rector"
}

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.