sandermuller / repo-new
CLI wizard for scaffolding repos using sandermuller/repo-init's playbook.
Requires
- php: ^8.3
- sandermuller/repo-init: ^0.3.0
- symfony/console: ^7.0||^8.0
- symfony/process: ^7.0||^8.0
- symfony/yaml: ^7.0||^8.0
Requires (Dev)
- laravel/pao: ^1.0
- laravel/pint: ^1.29
- mrpunyapal/rector-pest: ^0.2
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0||^10.0||^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.0
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- rector/rector: ^2.4
- rector/type-perfect: ^2.1
- spaze/phpstan-disallowed-calls: ^4.10
- stolt/lean-package-validator: ^5.7
- symplify/phpstan-extensions: ^12.0
- tomasvotruba/cognitive-complexity: ^1.1
- tomasvotruba/type-coverage: ^2.1
README
Interactive CLI wizard that scaffolds a new PHP repo against the canonical Sander / hihaho baseline defined by sandermuller/repo-init. Same UX as laravel new — pick a category, answer a few questions, get a wired-up repo with composer deps installed, AI tooling synced, and composer test green on first run.
What it does
Walks you through category → vendor → package name → description → PHP version → Laravel constraint (laravel-package) → plugin shape (composer-plugin) → test framework → opt-ins, then:
- Calls
laravel new --boostfor projects, or copies category-specific stubs for packages. - Substitutes placeholders (
__VENDOR__,__NAMESPACE__,__PACKAGE_STUDLY__, …) across composer.json, source files, CI workflows. - Pre-allows composer plugins (
phpstan/extension-installer,pestphp/pest-plugin) before requiring deps, so install never aborts on plugin allowlist errors. - Runs
composer install+ per-categorycomposer requirelists fromrepo-init'sreferences/per-category-deps.yml. - Fires
vendor/bin/boost syncso.ai/,.claude/,.agents/,.cursor/,AGENTS.md,CLAUDE.md, etc. land alongside your code. - Prints a copy-pasteable handoff prompt for Claude/your agent of choice.
Supports 6 categories: laravel-project, laravel-package (sander or spatie variant), php-package, phpstan-extension, rector-extension, composer-plugin (with --plugin-shape=command-provider|event-subscriber|both|none).
Install (one-time per machine)
composer global require sandermuller/repo-new
Make sure ~/.composer/vendor/bin (or equivalent) is on your PATH, then:
repo new my-new-package
Use
Interactive (recommended):
repo new
Non-interactive (CI / scripting):
repo new my-laravel-app \
--type=laravel-project \
--vendor=acme \
--description="My new Laravel app" \
--php=8.4 \
--test-framework=phpunit
See repo new --help for the full flag list.
Testing
composer test
Changelog
See CHANGELOG.md and releases.
Security
See SECURITY.md.
License
MIT — see LICENSE.