An interactive Laravel package installer that sets up your project with best practices, testing tools, code quality standards, and CI/CD workflows in seconds.
Interactive Setup - Beautiful CLI interface using Laravel Prompts
Smart Package Management - Automatically installs PHP and Node.js packages
Auto-Detection - Detects your preferred Node package manager (npm, pnpm, yarn, bun)
️ Configuration Files - Generates Laravel Pint, Rector, and Release-It configs
GitHub Actions - Installs pre-configured CI/CD workflows
Composer Scripts - Adds convenient testing and linting scripts
Fully Typed - PHP 8.4 with strict types and modern features
Tested - Comes with Pest tests
- PHP 8.4+
- Laravel 12+
- Composer 2+
Install the package via Composer:
composer require --dev akira/setupThe package will automatically register itself via Laravel's package auto-discovery.
Run the interactive setup command:
php artisan akira:setupThe command will guide you through:
- Select PHP Packages - Choose from essential Laravel packages
- Select Dev Packages - Pick testing and code quality tools
- Select Node Packages - Choose release management tools
- Package Manager - Select npm, pnpm, yarn, or bun
- GitHub Workflows - Optionally install CI/CD pipelines
nunomaduro/essentials- Essential Laravel helpersakira/laravel-auth-logs- Authentication logging
akira/laravel-debugger- Enhanced debugging toolsdriftingly/rector-laravel- Laravel-specific Rector rulesfakerphp/faker- Fake data generatorlarastan/larastan- PHPStan for Laravellaravel/boost- Laravel performance optimizerlaravel/pail- Log viewerlaravel/pint- Code style fixermockery/mockery- Mocking frameworknunomaduro/collision- Error handlerpestphp/pest- Testing frameworkpestphp/pest-plugin-browser- Browser testingpestphp/pest-plugin-laravel- Laravel supportpestphp/pest-plugin-type-coverage- Type coveragerector/rector- PHP refactoring toolroave/security-advisories- Security vulnerability scanner
release-it- Release management tool@commitlint/cli- Commit message linter@commitlint/config-conventional- Conventional commits config@release-it/conventional-changelog- Changelog generator
Laravel Pint configuration with comprehensive rules for:
- Strict typing
- Modern PHP 8.4 features
- Final classes
- Readonly properties
- Type declarations
- Code quality standards
Rector configuration with:
- PHP 8.4 upgrade rules
- Laravel 12 compatibility
- Code quality improvements
- Type declaration automation
- Dead code removal
- Privatization rules
Release-It configuration for:
- Semantic versioning
- Conventional changelog generation
- Automatic GitHub releases
- Git tag management
The following scripts are added/merged into composer.json:
{
"scripts": {
"lint": [
"rector",
"pint --parallel",
"npm run lint"
],
"test:type-coverage": "pest --type-coverage --min=100",
"test:lint": [
"pint --parallel --test",
"rector --dry-run",
"npm run test:lint"
],
"test:unit": "pest --parallel --coverage --exactly=100.0",
"test:types": [
"phpstan",
"npm run test:types"
],
"test": [
"@test:type-coverage",
"@test:unit",
"@test:lint",
"@test:types"
]
}
}{
"scripts": {
"release": "release-it"
}
}Comprehensive testing pipeline with:
- PHP 8.4 test matrix
- Laravel 12 compatibility
- Multiple OS support
- Code quality checks
- Static analysis with PHPStan
Automatic Discord notifications for new releases with:
- Release version
- Release notes
- Repository link
- Timestamp
# Run all tests with type coverage, unit tests, linting, and type checking
composer test
# Run only unit tests
composer test:unit
# Run only type coverage
composer test:type-coverage
# Run only linting
composer test:lint
# Run only type checking
composer test:types# Auto-fix code style and refactor
composer lint
# Check code style without fixing
pint --test
# Run Rector dry-run
rector --dry-run# Interactive release (follows semantic versioning)
npm run release
# Specific version
npm run release -- --increment patch
npm run release -- --increment minor
npm run release -- --increment majorThe package follows Spatie-level quality standards:
- Action Pattern - Business logic isolated in action classes
- DTOs - Data Transfer Objects for complex data structures
- Service Provider - Auto-discovery for seamless integration
- Dependency Injection - No facades, pure DI
- Strict Typing - PHP 8.4 with
strict_types=1 - Final Classes - Immutability where appropriate
- Readonly Properties - Modern PHP features
- No Static Calls - Testable, maintainable code
akira/setup/
├── src/
│ ├── Console/
│ │ └── SetupCommand.php # Main interactive command
│ ├── Actions/
│ │ ├── InstallPhpPackagesAction.php
│ │ ├── InstallNodePackagesAction.php
│ │ ├── PublishConfigFilesAction.php
│ │ └── PublishWorkflowsAction.php
│ ├── DTOs/
│ │ ├── PackageSelection.php
│ │ └── ComposerScripts.php
│ ├── Support/
│ │ ├── PackageDetector.php # Package manager detection
│ │ └── FileManager.php # File operations
│ └── AkiraSetupServiceProvider.php
├── stubs/
│ ├── pint.json
│ ├── rector.php
│ ├── release-it.json
│ └── github/
│ ├── release-discord.yml
│ └── tests.yml
└── tests/
├── Feature/
│ └── SetupCommandTest.php
└── Unit/
├── PackageDetectorTest.php
└── ComposerScriptsTest.php
Run the package tests:
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.