iamgerwin/filament-artisan-panel
Composer 安装命令:
composer require iamgerwin/filament-artisan-panel
包简介
A beautiful Filament panel for running Artisan commands with variable inputs, command history, and progress tracking
README 文档
README
A beautiful and powerful Filament panel for running Artisan commands with ease. Execute predefined or custom commands, track command history, and manage your Laravel application directly from your Filament admin panel.
Perfect for those moments when you need to clear the cache but your SSH keys are sleeping, or when you want to migrate without opening a terminal. Because sometimes, clicking buttons is just more fun than typing commands. 🚀
Features
- 🎨 Beautiful UI - Intuitive card-based interface with grouped commands
- ⚡ Quick Actions - Run common Artisan commands with a single click
- 🔧 Custom Commands - Execute custom Artisan and bash commands (optional)
- 📊 Command History - Track all executed commands with success/failure status
- 🎯 Dynamic Options - Support for command options and flags
- 🔒 Safety First - Confirmation dialogs for destructive operations
- 🎭 Dark Mode - Full support for Filament's dark mode
- 📦 Pre-configured - Ships with common Laravel commands out of the box
- 🚀 Queue Support - Queue long-running commands (optional)
- 🎨 Customizable - Full configuration control over appearance and behavior
Requirements
- PHP 8.3 or higher
- Laravel 11.x or 12.x
- Filament 4.x
Installation
You can install the package via Composer:
composer require iamgerwin/filament-artisan-panel
Optionally, publish the configuration file:
php artisan vendor:publish --tag="filament-artisan-panel-config"
Optionally, publish the views:
php artisan vendor:publish --tag="filament-artisan-panel-views"
Usage
Register the Plugin
Register the plugin in your Filament panel configuration:
use Iamgerwin\FilamentArtisanPanel\FilamentArtisanPanelPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FilamentArtisanPanelPlugin::make(), ]); }
That's it! The Artisan Panel will now appear in your Filament navigation.
Configuration
The package ships with sensible defaults, but you can customize everything in the config file:
return [ 'navigation' => [ 'enabled' => true, 'label' => 'Artisan Commands', 'icon' => 'heroicon-o-command-line', 'sort' => null, 'group' => null, ], 'history' => [ 'enabled' => true, 'limit' => 50, ], 'allow_custom_artisan_commands' => false, 'allow_custom_bash_commands' => false, 'execution' => [ 'timeout' => 300, 'prevent_simultaneous_execution' => false, ], ];
Adding Custom Commands
You can define your own commands in the configuration file:
'commands' => [ [ 'label' => 'Clear Cache', 'command' => 'cache:clear', 'type' => 'artisan', 'group' => 'Cache', 'icon' => 'heroicon-o-trash', 'color' => 'danger', 'confirmation' => false, 'help' => 'Clear the application cache', ], [ 'label' => 'Run Migrations', 'command' => 'migrate', 'type' => 'artisan', 'group' => 'Database', 'icon' => 'heroicon-o-circle-stack', 'color' => 'primary', 'confirmation' => true, 'help' => 'Run the database migrations', 'options' => [ [ 'name' => '--force', 'label' => 'Force', 'type' => 'checkbox', 'help' => 'Force in production', ], ], ], ],
Command Options
Commands can have dynamic options that users can configure before execution:
'options' => [ [ 'name' => '--force', // The command option name 'label' => 'Force', // Display label 'type' => 'checkbox', // Input type (checkbox, text, number, select) 'help' => 'Force the operation', ], [ 'name' => '--step', 'label' => 'Steps', 'type' => 'number', 'help' => 'Number of steps', ], ],
Security Considerations
By default, custom commands are disabled for security reasons. If you want to allow users to run custom commands:
'allow_custom_artisan_commands' => true, // Allow custom artisan commands 'allow_custom_bash_commands' => false, // Keep bash commands disabled (recommended)
Warning: Enabling custom commands, especially bash commands, can be a security risk. Only enable this for trusted users in secure environments.
Command History
The package tracks all executed commands, storing:
- Command name and parameters
- Execution timestamp
- Success/failure status
- Output (for failed commands)
You can configure history tracking:
'history' => [ 'enabled' => true, 'limit' => 50, // Maximum number of history entries ],
History is stored in the application cache and can be cleared using the "Clear History" button in the panel.
Pre-configured Commands
The package comes with these commands out of the box:
Cache Management
- Clear Cache
- Clear Config Cache
- Clear Route Cache
- Clear View Cache
Optimization
- Optimize Application
- Clear Optimization
Database
- Run Migrations
- Rollback Migrations
- Seed Database
Queue
- Queue Work
- Queue Restart
Storage
- Storage Link
Testing
Run the test suite:
composer test
Run PHPStan:
composer analyse
Run code style fixer:
composer format
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Security
If you discover any security-related issues, please email iamgerwin@live.com instead of using the issue tracker.
Credits
- iamgerwin
- Inspired by nova-command-runner
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
iamgerwin/filament-artisan-panel 适用场景与选型建议
iamgerwin/filament-artisan-panel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「artisan」 「filament」 「filament-plugin」 「command-runner」 「filament-panel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 iamgerwin/filament-artisan-panel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 iamgerwin/filament-artisan-panel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 iamgerwin/filament-artisan-panel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Collection of handy Laravel artisan commands that most projects needs
Additional artisan commands for Laravel
Enterprise-Grade Modular Architecture for Laravel Applications - A powerful Laravel package that revolutionizes application development with robust Service Repository Pattern, Dynamic Module Management, and 50+ Artisan commands for scalable, maintainable applications.
Create views, including "resource" views, using console commands.
Generates Laravel Migrations from an existing database
Laravel Craftsman
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-29