spiral/console
Spiral Console provides a simple, extensible CLI framework for building command-line tools and application commands in Spiral apps. Define commands, arguments, options, and interactive prompts with clean APIs, integrated with the Spiral container and environment.
composer require spiral/consoleSpiral\Console\Command. Commands auto-discover if placed under src/Command (configurable) and annotated with #[AsCommand] (Symfony-style attributes).config/console.php file (if published) to tweak command discovery paths and default options.php ./app.php list (or php index.php list depending on app bootstrap) to see all registered commands.#[Sequence(...)] attribute on commands to define dependencies or execution order (e.g., #[Sequence('db:migrate', 'db:seed')]).Spiral\Console\Composable and reside in configured namespaces—no manual binding required in service providers.InputInterface and OutputInterface for customarg parsing and colored output; Spiral wraps these with additional convenience methods (e.g., ask(), confirm(), table()).HasPrompt trait for interactive prompts or AsksForConfirmation for reusable confirmation logic across commands.Symfony\Component\Console v6+.#[AsCommand] and #[Sequence] attributes live in Spiral\Console\Attribute, not Symfony’s Symfony\Component\Console\Attribute. Confusing if you’re used to standard Symfony conventions.-vvv to see auto-discovery logs—watch for commands skipped due to missing #[AsCommand] or invalid signatures.app/Console/Kernel.php or use Command::resolveFromContainer() to hook into IoC.How can I help you explore Laravel packages today?