A beautiful, modern browser-based terminal for running Laravel Artisan commands. Zero dependencies on the frontend, just works.
- Run any Artisan command from your browsers
- Tab completion for command names
- Command history with up/down arrow navigation
- 4 built-in themes: Dark, Light, Monokai, Dracula
- Security: Environment restriction, Gate authorization, command allow/block lists
- Wildcard patterns for command filtering (
migrate:*,db:*) - Artisan install command for quick setup
- Zero configuration needed - works out of the box
- Supports Laravel 10, 11, and 12
- PHP 8.2+
- Laravel 10.x, 11.x, or 12.x
composer require emir/laravel-webartisan --dev
The package uses Laravel's auto-discovery, so the service provider is registered automatically.
Run the install command to publish config and assets:
php artisan webartisan:install
That's it! Visit /webartisan in your browser.
If you prefer to publish resources individually:
# Config file
php artisan vendor:publish --tag=webartisan-config
# Frontend assets
php artisan vendor:publish --tag=webartisan-assets
# Blade views (for customization)
php artisan vendor:publish --tag=webartisan-views
After publishing, the config file is located at config/webartisan.php:
return [
// Master switch
'enabled' => env('WEBARTISAN_ENABLED', true),
// Only available in these environments
'enabled_environments' => ['local'],
// URL prefix (accessible at /webartisan)
'route_prefix' => env('WEBARTISAN_PREFIX', 'webartisan'),
// Restrict to a specific domain
'domain' => env('WEBARTISAN_DOMAIN', null),
// Route middleware
'middleware' => ['web'],
// Gate-based authorization (see Security section)
'gate' => null,
// Only allow these commands (empty = all except blocked)
'allowed_commands' => [],
// Always block these commands
'blocked_commands' => [
'down', 'up', 'env', 'serve', 'tinker',
'key:generate', 'migrate:fresh', 'migrate:reset',
'db:wipe', 'db:seed', ...
],
// Terminal theme: 'dark', 'light', 'monokai', 'dracula'
'theme' => env('WEBARTISAN_THEME', 'dark'),
];
| Command | Description |
|---|---|
help |
Show available terminal commands |
list |
List all artisan commands with descriptions |
clear |
Clear the terminal screen |
exit / quit |
Leave webartisan |
Type any Artisan command directly:
❯ route:list
❯ migrate:status
❯ make:model Post --migration --factory
❯ config:show database
| Shortcut | Action |
|---|---|
Tab |
Autocomplete command names |
Up / Down |
Navigate command history |
Ctrl+L |
Clear terminal |
Set the theme in your config or .env file:
WEBARTISAN_THEME=dracula
Available themes: dark (default), light, monokai, dracula.
Webartisan is designed for development use only. Multiple security layers are built in:
By default, Webartisan is only available in the local environment:
'enabled_environments' => ['local'],
Disable completely via environment variable:
WEBARTISAN_ENABLED=false
For fine-grained access control, define a gate in your AppServiceProvider:
use Illuminate\Support\Facades\Gate;
Gate::define('viewWebartisan', function ($user) {
return in_array($user->email, [
'[email protected]',
]);
});
Then enable it in the config:
'gate' => 'viewWebartisan',
'middleware' => ['web', 'auth'], // Add auth middleware
Use the Webartisan::auth() method in your AppServiceProvider:
use Emir\Webartisan\Webartisan;
Webartisan::auth(function ($request) {
return $request->user()?->isAdmin() ?? false;
});
// Only allow specific commands
'allowed_commands' => ['route:list', 'migrate:status', 'queue:*'],
// Block dangerous commands (supports wildcards)
'blocked_commands' => ['db:*', 'migrate:fresh', 'tinker'],
Restrict to an internal domain:
WEBARTISAN_DOMAIN=admin.myapp.test
composer test
Please see CHANGELOG for more information on what has changed recently.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Emir Karşıyakalı
- Inspired by samdark/yii2-webshell
- Built with jQuery Terminal
- All Contributors
The MIT License (MIT). Please see License File for more information.