ministrysites/cornerstone-devtools

Custom Artisan command toolkit for Laravel applications.

Maintainers

Package info

github.com/ministrysites/cornerstone-devtools

pkg:composer/ministrysites/cornerstone-devtools

Statistics

Installs: 7

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2 2026-04-20 23:28 UTC

This package is auto-updated.

Last update: 2026-05-20 23:42:00 UTC


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:install
  • cornerstone: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:

  • flux
  • filament

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 .cornerstone directory 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 welcome route from routes/web.php when 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 pro is selected, runs php artisan flux:activate

Filament

The Filament installer:

  • installs filament/filament
  • runs php artisan filament:install --panels
  • can optionally replace app/Models/User.php with a stub that implements the FilamentUser contract

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.