sandermuller / repo-new
CLI wizard for scaffolding repos using sandermuller/repo-init's playbook.
Requires
- php: ^8.3
- sandermuller/repo-init: ^1.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
- sandermuller/boost-skills: ^1.0
- 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, and get a repo with Composer dependencies installed, CI and quality tooling wired up, AI tooling synced, and composer test green on the first run.
Install (one-time per machine)
composer global require sandermuller/repo-new
Make sure your global Composer bin directory (~/.composer/vendor/bin or ~/.config/composer/vendor/bin) is on your PATH. sandermuller/repo-init — the source of the stubs and dependency lists — is pulled in automatically as a dependency; no separate install needed.
On first run, repo syncs its bundled AI skills to your user scope (~/.claude/skills/, ~/.codex/skills/, etc.) so they're available to every agent on the machine — no manual boost sync --scope=user step needed. Subsequent runs no-op via a per-version sentinel. Set BOOST_SKIP_AUTOSYNC=1 to disable.
Use
Interactive (recommended) — the wizard walks you through every choice:
repo new
Non-interactive (CI / scripting) — supply choices as flags:
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.
Categories
repo-new scaffolds seven repo categories. Choose one interactively, or pass --type:
Category (--type) |
What it scaffolds | Runtime dependencies wired in | Category options |
|---|---|---|---|
laravel-project |
A full Laravel application via laravel new --boost, with the shared tooling baseline overlaid on top |
Laravel skeleton (laravel new) |
--with-hihaho-rules, --with-security-advisories |
laravel-package |
A Laravel package — spatie/laravel-package-tools-based service provider, src/, tests/, publishable config |
illuminate/contracts, illuminate/support, spatie/laravel-package-tools |
--laravel=<constraint> |
php-package |
A framework-agnostic PHP library | none (pure library) | — |
phpstan-extension |
A PHPStan rule / extension package | phpstan/phpstan: ^2 |
--laravel-aware (swaps in larastan/larastan) |
rector-extension |
A Rector rule / ruleset package | rector/rector: ^2, symplify/rule-doc-generator-contracts |
--laravel-aware (adds driftingly/rector-laravel) |
composer-plugin |
A Composer plugin — command provider and/or event subscriber skeleton | composer-plugin-api: ^2.6 |
--plugin-shape=command-provider|event-subscriber|both|none |
skill-bundle |
A boost-core skill bundle — pure-markdown AI skills under resources/boost/skills/, no PHP source or test runner |
sandermuller/boost-core |
— |
What it sets up
Beyond the category-specific source skeleton above, every scaffolded repo gets the same baseline:
- Project files —
composer.jsonwith PSR-4 autoloading,src/+tests/, plusREADME.md,CHANGELOG.md,LICENSE,SECURITY.md,.editorconfig,.gitignore,.gitattributes(lean published archive), and.mcp.json. - CI workflows — GitHub Actions for the test suite, PHPStan, Pint, Rector, and changelog automation, plus a Dependabot config.
- Quality tooling, configured and installed — Pint (
pint.json), PHPStan (phpstan-baseline.neon) with the strict / deprecation / PHPUnit / disallowed-calls / Symplify extension set, Rector withtype-perfect, andtype-coverage+cognitive-complexityanalysis. All wired intocomposerscripts. - Test suite — Pest or PHPUnit. PHPStan / Rector extensions and Laravel projects default to PHPUnit; other categories default to Pest (PHPUnit for the
hihahovendor). Override with--test-framework. - AI tooling —
sandermuller/package-boost-php+boost-coreinstalled and aboost.phpconfig scaffolded — the agents, dependency vendors, andsandermuller/boost-skillscapability tags to sync (tags chosen interactively or via--skill-tags; package categories only —laravel-projectuseslaravel/boostinstead). Thenvendor/bin/boost syncgenerates.ai/,.claude/,.agents/,.cursor/,AGENTS.md,CLAUDE.md, and the per-agent skill directories.
Per-category runtime and dev dependencies come from repo-init's references/per-category-deps.yml, so the dependency set always matches the current canonical baseline.
skill-bundle is the lean exception: it ships pure-markdown skills with no PHP, so it skips the PHP toolchain (PHPStan, Rector, PHPUnit, .mcp.json, the phpstan / rector-check workflows) and the test runner — keeping Pint, lean-package-validator, the meta files, and the pint-check + update-changelog workflows.
How it works
- The wizard collects: category → vendor → package name → description → PHP version → (Laravel constraint for
laravel-package, plugin shape forcomposer-plugin) → test framework →boost-skillstags → opt-ins. - Runs
laravel new --boost(forlaravel-project) or copies the category stubs (for package categories) from the installedrepo-init. - Substitutes placeholders (
__VENDOR__,__NAMESPACE__,__PACKAGE_STUDLY__, …) acrosscomposer.json, source files, and CI workflows. - Pre-allows Composer plugins (
phpstan/extension-installer,pestphp/pest-plugin) before requiring dependencies, so install never aborts on the plugin allowlist. - Runs
composer installand the per-categorycomposer requirelists. - Fires
vendor/bin/boost syncto generate the AI tooling files. - Initializes a git repo (add
--commitfor an initial commit) and prints a copy-pasteable handoff prompt for Claude or your agent of choice.
Testing
composer test
Changelog
See CHANGELOG.md and releases.
Security
See SECURITY.md.
License
MIT — see LICENSE.