Download the PHP package alwayscurious/laravel-project-devtool without Composer

On this page you can find all versions of the php package alwayscurious/laravel-project-devtool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-project-devtool

Laravel Project Devtool

Latest Version on Packagist Tests Total Downloads

Simplify your developers' startup time on new projects from an existing repo — one command to a clean-slate dev environment, and a clean way for your app to hook into it.

php artisan project:dev --setup tears the local environment down and rebuilds it from scratch: clear caches → migrate:fresh → seed → build assets. Onboard a new teammate, recover from a broken branch, or reset between feature spikes in a single command instead of a wiki page of steps.

The part that makes it worth installing instead of writing your own shell script: at every stage of the reset it fires a lifecycle event, and your app attaches its own work by dropping a listener into app/Listeners. Generate permissions, seed demo data, print login credentials — without ever editing this package. The engine is mechanism; your app supplies the policy.

⚠️ Dev-only. --setup runs migrate:fresh, which drops every table. Install it as a --dev dependency and never point it at data you care about.


Install

That's the whole setup — the command auto-registers. Publish the config only if you want to change defaults:

Try it:


The command

You want to… Run
See what's available (safe, no-op) php artisan project:dev
Reset the environment php artisan project:dev --setup
Reset a freshly cloned repo, deps and all php artisan project:dev --setup --new
Reset unattended (CI, scripts) php artisan project:dev --setup --force
Preview exactly what would happen, change nothing php artisan project:dev --setup --dry-run
Just reseed (no wipe, no asset build) php artisan project:dev --setup --only=seed
Everything except the slow asset build php artisan project:dev --setup --skip=build

Before wiping anything, --setup confirms with a prompt that names the exact connection and database it's about to drop — so a wrong .env can't surprise you. --force skips it. And it refuses to run in production unless you pass --force-production.

Run only the steps you need

--setup is no longer all-or-nothing. The selectable steps, in order, are install, caches, migrate, seed, build. Use --only to run a subset or --skip to drop a few:

The confirmation prompt only appears when a destructive step (migrate or seed) is actually in the run — --only=caches won't ask.

Preview with --dry-run

--dry-run walks the entire sequence, prints what each step would do, fires every lifecycle event (so your listeners can announce their intent too), and changes nothing — no migrations, no seeding, no processes, no prompt:

Timing report

Every real run prints a per-step timing table at the end, so you can see where onboarding time actually goes:


How --setup runs (and where you plug in)

The sequence is fixed and ordering-sensitive — your listeners can rely on it:

Each event carries the running command, so a listener gets the live console and can run nested artisan commands:

Why seeding comes after a separate DatabaseMigrated event

This is the design detail the package exists for. Some apps must generate data (permissions, lookup tables) after the schema exists but before the seeder runs — because the seeder consumes it (e.g. granting permissions to a role). So the reset deliberately fires DatabaseMigrated in the gap between migrate:fresh and db:seed, giving you a hook at exactly that moment. Merge the two and the seam disappears; keep them split and your app slots right in.


Integrating your app: write a hook

A hook is just a listener that type-hints one of the lifecycle events. Laravel's event discovery wires it up — no registration, no config, no service provider edits.

Scaffold one

Generates app/Listeners/BuildDemoData.php, pre-typed to the event and documented with the full event list. --event is validated and defaults to DatabaseSeeded.

Or write it by hand

Lifecycle reference

Event Fires… Reach for it to…
SetupStarting before the wipe confirmation; may throw AbortSetup guard the run (env present? right branch?)
CachesCleared after optimize:clear prep that needs a clean cache/config
DatabaseMigrated after migrate:fresh, before seeding generate permissions / data the seeder needs
DatabaseSeeded after db:seed demo / sample data
AssetsBuilding just before the asset build prepare build inputs
SetupCompleted after the build, before the command returns print login URLs, credentials, next steps

Hooks can't break the reset

A thrown exception from any listener is reported and swallowed so a broken custom hook never leaves you with a half-built database. The single exception is the deliberate veto below.


Guarding the reset: AbortSetup

Veto a doomed run before anything destructive happens by throwing AbortSetup from a SetupStarting listener:

The command prints the message, says “Nothing was changed.”, and exits with a failure code — the database is never touched. AbortSetup is honoured only from the SetupStarting pre-flight point; thrown later it's treated as a misplaced veto (warned and swallowed) so it can't corrupt a half-built database.


Batteries (opt-in recipes)

Common integrations ship as listeners that are off by default — a project that doesn't use them pulls in zero coupling — and self-guard when an optional dependency is missing.

Filament Shield permissions

GenerateShieldPermissions regenerates filament-shield permissions on DatabaseMigrated, in the gap before seeding, so your seeder can grant them to a super-admin role. If filament-shield isn't installed it skips with a notice instead of failing. Enable it in config:


Configuration

config/project-devtool.php — everything you'd want to vary, nothing hardcoded:


Requirements

Testing

License

The MIT License (MIT). See License File.


All versions of laravel-project-devtool with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0||^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alwayscurious/laravel-project-devtool contains the following files

Loading the files please wait ...