afrihost/base-command-bundle
Symfony bundle providing an opinionated base class for console commands to reduce boilerplate. Adds built-in initialization for common needs like logging and locking, with global defaults via config and per-command or runtime overrides for flexible behavior.
Adopt if:
config/packages/base_command.yaml).Look elsewhere if:
symfony/console or spatie/fluent instead.For Executives: "This package lets us standardize how our CLI tools work—like giving all our command-line scripts a consistent ‘dashboard’ for logging, locks, and settings. Instead of each developer reinventing how to handle errors or debug modes, we define rules once (e.g., ‘all commands log to files’) and override them only when needed. This saves dev time on maintenance and reduces bugs in our internal tools, like data imports or admin scripts. It’s a low-risk, high-reward way to improve reliability without adding complexity."
For Engineers:
*"If you’re tired of copying the same if ($this->getDebug()) or lock-acquisition code into every command, this bundle abstracts that into a reusable base class. Key benefits:
php bin/console migrate:data.composer require and extend BaseCommand.
Tradeoff: Last updated in 2020, but the core logic (logging/locking) is stable. If you hit an issue, we can fork it or contribute fixes."*For PMs: *"This is a DX investment—it won’t add features, but it’ll make it faster to build and maintain CLI tools. Prioritize this if:
ContainerAwareCommand and refactor later if boilerplate becomes painful."*How can I help you explore Laravel packages today?