zenstruck/console-extra
Modular helpers to reduce boilerplate in Symfony console commands. Build invokable commands with auto-injected IO, arguments/options via attributes, and handy traits to run other commands or processes. Designed to mix and match features or power a shared base command.
InvokableServiceCommand + attributes), accelerating feature delivery and reducing maintenance overhead.IO and CommandSummarySubscriber, improving user experience.[AsCommand], [Argument]) for cleaner, more maintainable code, aligning with Symfony’s modern DI practices.RunsCommands, RunsProcesses) for CI/CD pipelines.IO and CommandRunner for scripts requiring input.Adopt if:
Command boilerplate.Look elsewhere if:
StyleInterface.For Executives: "This package cuts CLI development time by 70% for Symfony apps, letting our team ship internal tools faster with less boilerplate. For example, a command to manage users now requires 3 lines of code instead of 30. It also standardizes output (e.g., success messages, performance metrics), reducing user errors and improving DevOps workflows. Low risk—MIT license, actively maintained, and used in production by [Zenstruck]."
For Engineers:
*"Replace verbose Command classes with attribute-driven, service-injected commands using InvokableServiceCommand. Key wins:
execute() method: Just define __invoke() with type-hinted dependencies.UserManager) like controllers.$this->runCommand() or $this->runProcess().IO for styled output and CommandSummarySubscriber for execution metrics.
Example: A user-creation command drops from 50 to 10 lines of code. Works seamlessly with Symfony’s DI and attributes."*For PMs: *"This aligns with our developer velocity and technical debt reduction goals. It’s a low-effort, high-impact upgrade for CLI-heavy projects (e.g., migrations, admin tools). Prioritize if:
How can I help you explore Laravel packages today?