coringawc/filament-plugin-workbench
Docker-based dev workbench for FilamentPHP plugin authors. Includes a generic PHP 8.4/Node 22/Composer 2 image, auto-install entrypoint, docker-compose and testbench templates, and a workbench/sail CLI to run artisan, tests, and tooling without local PHP/Node.
extra.laravel.providers into testbench.yaml, Playwright browser caching), reducing boilerplate for plugin maintainers.python3 as a fallback (common on 99% of systems).packages/workbench/), with dynamic path resolution for Dockerfile and stubs. This is low-friction for existing Laravel/Filament plugins.vendor/bin/workbench and vendor/bin/sail, enabling seamless CLI access without manual setup.testbench.yaml with provider auto-detection, reducing manual configuration for testing.workbench CLI is written in strict POSIX sh (no Bashisms), which may limit future feature additions (e.g., arrays, advanced string handling). Risk: Maintenance overhead if complex logic is needed./tmp/.cache/ms-playwright in the image to avoid permission issues. Risk: Edge cases with custom Docker setups or non-standard volume mounts.python3 for parsing composer.json (with Docker fallback). Risk: Minor performance overhead or failure on exotic environments (though mitigated by the fallback).intl, pcntl) and Chromium libraries. Risk: Overhead for plugins not using Playwright (~20MB), but justified by simplicity.testbench.yaml provider auto-detection? Will it handle edge cases (e.g., malformed composer.json, missing providers) gracefully?filament-acl, filament-media-library). Ideal for teams building plugins requiring:
git submodule add https://github.com/CoringaWc/filament-plugin-workbench.git packages/workbench
./vendor/bin/workbench install
docker-compose.yml.stub → docker-compose.yml (with dynamic build.context).testbench.yaml.stub → testbench.yaml (with provider auto-fill)../vendor/bin/workbench up
./vendor/bin/sail artisan migrate
./vendor/bin/sail for all CLI commands (artisan, phpunit, etc.)../vendor/bin/workbench for environment management (fresh, logs, shell).docker compose syntax).workbench install → workbench up..env (e.g., DB_DATABASE path for SQLite).sail artisan for Laravel commands.sail phpunit for tests.workbench shell for debugging.workbench down to clean up.git submodule deinit -f packages/workbench
rm -rf .git/modules/packages/workbench
git submodule update --remote.docker-compose.yml or testbench.yaml post-generation.docker compose logs./tmp/.cache/ms-playwright has correct ownership (handled by the image)../vendor/bin/workbench help or ./vendor/bin/sail --help.realpath missing? Falls back to heuristics.README.md + AGENTS.md). May need expansion for edge cases.workbench up + sail test in workflows.docker compose instances.| Scenario | Impact | Mitigation |
|---|---|---|
| Docker not installed | CLI fails | Document as pre-requisite. |
| Python 3 unavailable | Provider detection fails | Docker fallback works in 99% of cases. |
| Volume permission issues | Playwright cache fails | Pre-created /tmp/.cache/ms-playwright in Dockerfile. |
Corrupted composer.json |
Provider auto-fill crashes | Graceful fallback (no crash). |
| Network issues (Docker daemon) | All commands hang | Retry or check Docker status. |
Plugin overrides Dockerfile |
Conflicts with shared image | Document override procedures. |
workbench up).filament-plugin-workbench as a submodule in plugin templates.sail vs. workbench commands (e.g., sail artisan vs. `workbench shellHow can I help you explore Laravel packages today?