Skip to content

Exclude Vendor and Default Commands in php artisan dev (Laravel 13.30)

Laravel 13.30 adds withoutVendorCommands() and withoutDefaultCommands() to the DevCommands class, giving you precise control over which processes run when you execute php artisan dev.

Published · Updated · 3 min read

Exclude Vendor and Default Commands in php artisan dev (Laravel 13.30)

Taking Control of php artisan dev in Laravel 13.30

The php artisan dev command is a convenient way to spin up all your development processes in one shot — the local server, queue worker, log watcher, and Vite. But as your project grows, you may not want every vendor package or framework default injecting its own process into that list.

Laravel 13.30 ships two new methods on the DevCommands class that let you opt out of those automatic registrations entirely.

New Methods: withoutVendorCommands() and withoutDefaultCommands()

use Illuminate\Foundation\DevCommands;

DevCommands::withoutVendorCommands();
DevCommands::withoutDefaultCommands();

Calling both methods strips the process list down to nothing, leaving you free to define exactly what runs:

namespace App\Providers;

use Illuminate\Foundation\DevCommands;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        DevCommands::withoutVendorCommands();
        DevCommands::withoutDefaultCommands();

        DevCommands::artisan('serve', 'server');
        DevCommands::artisan('queue:work --queue=notifications', 'queue:notifications');
        DevCommands::node('dev', 'vite');
    }
}

Granular Control with only() and except()

If you want something in between — for example, keep all framework defaults but drop the log watcher, while still blocking vendor commands — you can combine the new methods with the existing except() helper:

DevCommands::withoutVendorCommands();
DevCommands::except('logs');

What Are the Default Commands?

The framework registers four processes by default via registerDefaults():

  • server — php artisan serve
  • queue — php artisan queue:listen --tries=1 --timeout=0
  • logs — php artisan pail --timeout=0 (only when pcntl_fork() is available)
  • vite — npm run dev (only when a package.json exists)

Inspecting the Process List with dev:list

Before committing to a configuration, use php artisan dev:list to see exactly what will run and where each entry was registered:

php artisan dev:list

  server  php artisan serve ................................. Illuminate\Foundation\Providers\ArtisanServiceProvider@boot
  queue   php artisan queue:listen --tries=1 --timeout=0 .... Illuminate\Foundation\Providers\ArtisanServiceProvider@boot
  logs    php artisan pail --timeout=0 ...................... Illuminate\Foundation\Providers\ArtisanServiceProvider@boot
  vite    npm run dev ....................................... Illuminate\Foundation\Providers\ArtisanServiceProvider@boot

Need machine-readable output? Add --json:

php artisan dev:list --json | jq

This is especially useful when feeding process metadata to AI agents or custom tooling.

Key Takeaways

  • DevCommands::withoutVendorCommands() prevents third-party service providers from adding processes to php artisan dev.
  • DevCommands::withoutDefaultCommands() removes the four framework-registered defaults.
  • Use except('name') for surgical removal of a single default process.
  • php artisan dev:list (with optional --json) shows the full resolved process list before you run it.
  • Both methods were contributed by Jack Bayliss in PR #61344 and shipped in Laravel 13.30.

Source: Laravel News — Exclude Vendor and Default Commands in php artisan dev

Frequently asked questions

How do I stop vendor packages from adding processes to php artisan dev?

Call DevCommands::withoutVendorCommands() inside your AppServiceProvider boot method. This prevents any third-party service provider from registering its own processes with the dev command.

Can I keep some framework defaults while removing others?

Yes. Instead of calling withoutDefaultCommands(), use DevCommands::except('name') to remove a specific default process by name — for example, DevCommands::except('logs') removes only the log watcher while keeping server, queue, and vite.

How can I see which processes will run before executing php artisan dev?

Run php artisan dev:list to get a formatted table of all registered processes and their source. Add the --json flag for machine-readable output suitable for scripts or AI agents.

Mohamed Said

About the author

Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

About GitHub LinkedIn WhatsApp Email Address My CV

Have a technical challenge?

Tell me what you’re building. I reply within two working days.

Discuss your project