ministrysites / cornerstone-devtools
Custom Artisan command toolkit for Laravel applications.
Package info
github.com/ministrysites/cornerstone-devtools
pkg:composer/ministrysites/cornerstone-devtools
Requires
- php: ^8.3
- illuminate/console: ^13.0
- illuminate/contracts: ^13.0
- illuminate/filesystem: ^13.0
- illuminate/process: ^13.0
- illuminate/support: ^13.0
- laravel/prompts: ^0.3.15
Requires (Dev)
- laravel/pint: ^1.24
- orchestra/testbench: ^11.0
- pestphp/pest: ^4.4
- pestphp/pest-plugin-laravel: ^4.1
- phpstan/phpstan: ^2.1
README
cornerstone-devtools is a Laravel package that provides opinionated Artisan installers for optional dependencies used by the Cornerstone starter kit.
It exists to make common starter-kit setup steps fast, repeatable, and consistent across new projects.
Important Note
This package is built for the Cornerstone starter kit and reflects that workflow on purpose.
The commands in this package encode specific opinions about:
- which packages get installed
- which follow-up commands should run
- which files may be scaffolded or replaced during setup
If you are not building on the Cornerstone starter kit, this package is probably not the right fit. If you need similar behavior with different conventions, forking this package is the intended path.
Requirements
- PHP
^8.3 - Laravel
^13.0
What It Does
This package exposes two public entrypoints:
cornerstone:installcornerstone:cleanup
cornerstone:install can:
- install one supported package
- install multiple supported packages sequentially
- prompt interactively for package selection when no package arguments are provided
- delegate follow-up setup to package-specific installers
Supported installers:
fluxfilament
Installation
Install the package as a development dependency:
composer require --dev ministrysites/cornerstone-devtools
Installing it as a dev dependency is strongly recommended so these commands are not available in production.
Laravel package discovery will register the service provider automatically.
Usage
Run a single installer:
php artisan cornerstone:install flux php artisan cornerstone:install filament
Run multiple installers sequentially:
php artisan cornerstone:install flux filament
Run interactively and choose packages from a multi-select prompt:
php artisan cornerstone:install
Package-specific flags can be combined in a single multi-package command. Each installer only receives the flags it understands.
php artisan cornerstone:install flux filament --pro --flux-email=jane@example.com --flux-license-key=your-key --replace-user-model --no-interaction
If one installer fails, the command stops immediately and returns a failure exit code.
Cleanup
cornerstone:cleanup removes Cornerstone demo files listed in .cornerstone/demo-manifest.txt so you can start building your own app.
Usage:
php artisan cornerstone:cleanup
Behavior:
- reads
./.cornerstone/demo-manifest.txt(one path per line, relative to the Laravel app root) - prints every path it will delete and requires confirmation before making changes
- shows a progress bar while deleting the listed files
- removes the
.cornerstonedirectory itself as the final step - skips paths that are already missing and reports them in the summary
- is idempotent: if the manifest is missing, it warns and exits without error
- reminds you to manually remove the
welcomeroute fromroutes/web.phpwhen done
Installers
Flux
The Flux installer supports both interactive and non-interactive use.
Interactive usage:
php artisan cornerstone:install flux
In interactive mode, the installer prompts for either the free or pro edition.
Non-interactive usage:
php artisan cornerstone:install flux --free --no-interaction php artisan cornerstone:install flux --pro --flux-email=jane@example.com --flux-license-key=your-key --no-interaction
Behavior:
- installs
livewire/flux - if
prois selected, runsphp artisan flux:activate
Filament
The Filament installer:
- installs
filament/filament - runs
php artisan filament:install --panels - can optionally replace
app/Models/User.phpwith a stub that implements theFilamentUsercontract
Interactive usage:
php artisan cornerstone:install filament
Non-interactive usage:
php artisan cornerstone:install filament --replace-user-model --no-interaction
The replacement user model is intentionally a starter stub. It satisfies Filament's contract, but you are expected to adapt its access logic to your application's needs.
Opinionated By Design
This package is intentionally narrow in scope.
Its goal is not to be a universal Laravel installer framework. Its goal is to support the Cornerstone starter kit with predictable setup behavior.
Because of that:
- pull requests that fix bugs, improve reliability, or clarify behavior are welcome
- pull requests that broaden scope or weaken the package's opinions are unlikely to be merged
If you need materially different installation behavior, the better path is usually to fork this package or build one that matches your own conventions.
Development
Install dependencies:
composer install
Run the test suite:
composer test
Run Pint formatting:
composer format
Run Pint in check-only mode:
composer format -- --test
Run PHPStan:
composer stan
Contributing
Issues and pull requests are welcome, but read this entire README before opening a change proposal.
The fastest way to get a contribution accepted is to keep it aligned with the package's purpose:
- support the Cornerstone starter kit
- preserve the package's current opinions
- improve correctness, maintainability, or developer ergonomics without broadening scope
License
This package is open-sourced software licensed under the MIT license.