laravel/installer
Laravel Installer is the official CLI tool to quickly create new Laravel applications. Install via Composer, then run a single command to scaffold a fresh project with the latest framework version and recommended defaults.
laravel/installer package is a bootstrap tool for Laravel projects, not a runtime dependency. It simplifies project initialization (e.g., laravel new project) by handling Composer, directory structure, and default configurations. This is ideal for TPMs managing Laravel-based products where rapid, standardized project setup is critical (e.g., SaaS platforms, internal tools, or developer onboarding).composer create-project or laravel/new (deprecated) exist, this package centralizes and modernizes the process with Laravel-specific optimizations (e.g., .env setup, default service providers).require-dev or a global install. No custom build steps are needed.- name: Bootstrap project
run: composer global require laravel/installer && laravel new my-app
.env.example, composer.json templates). Teams needing non-standard scaffolding (e.g., custom auth, monorepo structures) may require post-install scripts or forks.laravel/installer:^5.0 with Laravel 10.x).composer audit) should suffice..env values, or non-standard directory structures? If yes, evaluate:
post-install-cmd in composer.json).laravel new project --version=10.x).laradock).composer update laravel/installer in CI.| Phase | Action | Tools/Commands | Risk Mitigation |
|---|---|---|---|
| Assessment | Audit current project setup (e.g., manual composer create-project). |
Review existing composer.json. |
Document deviations from Laravel defaults. |
| Pilot | Test in a sandbox: laravel new test-app. |
Compare with existing project structure. | Roll back if custom configs are lost. |
| Integration | Add to composer.json (dev dependency) or global Composer. |
composer require-dev laravel/installer |
Use version constraints (e.g., ^5.0). |
| Automation | Embed in CI/CD (e.g., GitHub Actions). | Custom workflow scripts. | Cache Composer dependencies. |
| Customization | Extend with post-install scripts if needed. | composer.json scripts or Makefile. |
Test thoroughly; document overrides. |
laravel alias conflicts).laravel new project --version=10.x).composer global require laravel/installer.composer require-dev laravel/installer.laravel new <project>.laravel new . in a monorepo).laravel new my-app").composer update laravel/installer.scripts/ directory).composer create-project laravel/laravel). Monitor Laravel’s roadmap.chmod), PHP version mismatches, or custom config conflicts.laravel new --help and composer diagnose.laravel-installer.| Scenario | Impact | Mitigation |
|---|---|---|
| Installer fails silently | Developers get broken projects. | Add set -e to scripts; log errors. |
| Laravel version mismatch | Incompatible dependencies. | Pin Laravel version in installer. |
| Custom configs overwritten | Lost team-specific settings. | Use post |
How can I help you explore Laravel packages today?