sandermuller/repo-new

CLI wizard for scaffolding repos using sandermuller/repo-init's playbook.

Maintainers

Package info

github.com/SanderMuller/repo-new

Homepage

pkg:composer/sandermuller/repo-new

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 1

0.3.0 2026-05-18 17:06 UTC

This package is auto-updated.

Last update: 2026-05-18 20:25:54 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads License

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 --boost for 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-category composer require lists from repo-init's references/per-category-deps.yml.
  • Fires vendor/bin/boost sync so .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.