cleaniquecoders / laravel-artisan-runner
Run allowlisted Artisan commands from a Livewire UI
Package info
github.com/cleaniquecoders/laravel-artisan-runner
pkg:composer/cleaniquecoders/laravel-artisan-runner
Fund package maintenance!
Requires
- php: ^8.3
- illuminate/contracts: ^11.0||^12.0||^13.0
- livewire/livewire: ^3.0||^4.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
README
Run allowlisted Artisan commands from a Livewire UI. Every execution is logged to the database and notifications are sent on completion or failure.
Features
- Three discovery modes - Manual allowlist, auto-discover, or selective discovery
- Livewire 4 UI - Select commands, configure parameters, and view output in real-time
- Async by default - Commands run via queued jobs, never blocking HTTP requests
- Full audit trail - Every execution logged with who, what, when, and result
- Output viewer - Click any execution to expand terminal-style command output
- Notifications - Mail and database notifications on completion or failure
- Dynamic parameters - Arguments and options rendered separately with proper input types
Installation
composer require cleaniquecoders/laravel-artisan-runner
Publish and run migrations:
php artisan artisan-runner:install php artisan migrate
Quick Start
Add a command to your allowlist in config/artisan-runner.php:
'allowed_commands' => [ 'cache:clear' => [ 'label' => 'Clear Cache', 'description' => 'Flush the application cache.', 'group' => 'Cache', 'parameters' => [], ], ],
Include the Livewire component in any Blade view:
<livewire:artisan-runner::command-runner />
Start your queue worker and run commands from the UI.
Documentation
Full documentation is available in the docs directory:
- Getting Started - Installation, quick start, basic usage
- Architecture - Design, contracts, data layer
- Configuration - Config reference, environment variables
- Livewire UI - Component usage and customization
- Testing - Pest test conventions and examples
- Advanced - Log pruning, notifications, extending
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
