Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Auto Shell Laravel Package

pmjones/auto-shell

AutoShell auto-maps CLI command names to PHP command classes in a namespace. It reflects a command’s main method to parse args/options (scalars or arrays), then returns an Exec to run. Zero dependencies—add a class and it becomes a command.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Accelerating CLI Development: Reduces boilerplate for CLI tools by auto-mapping PHP classes to commands, enabling faster iteration for internal tools, admin panels, or developer utilities.
  • Consistent CLI UX: Standardizes argument/option parsing across all commands, improving developer experience and reducing onboarding time for new team members.
  • Build vs. Buy: Avoids reinventing CLI parsing logic (e.g., Symfony Console) when lightweight, dependency-free solutions suffice.
  • Use Cases:
    • Internal DevOps Tools: Automate repetitive tasks (e.g., db:reset, logs:tail).
    • Admin Interfaces: Expose backend operations via CLI (e.g., user:promote, cache:clear).
    • Legacy System Integration: Modernize monolithic PHP apps with structured CLI commands.
    • Testing/Scripting: Replace ad-hoc shell scripts with type-safe, documented commands.

When to Consider This Package

  • Look Here If:
    • Your project needs minimal CLI tooling without heavy dependencies (e.g., Symfony Console, Laravel Artisan).
    • You prefer PHP-first CLI development over shell scripting (e.g., Bash/Python).
    • Your team values type safety and IDE autocompletion for CLI arguments/options.
    • You want auto-generated help documentation with minimal effort.
  • Look Elsewhere If:
    • You need complex subcommands or nested command hierarchies (consider Symfony Console).
    • Your CLI requires interactive prompts (e.g., Symfony’s QuestionHelper).
    • You’re building a public-facing tool needing polished UX (e.g., Laravel Artisan’s rich output).
    • You need cross-language support (e.g., Go/Python CLI tools).

How to Pitch It (Stakeholders)

For Executives: "AutoShell lets us build CLI tools in PHP with zero boilerplate—no more writing custom argument parsers or maintaining shell scripts. For example, a user:reset-password command can be created in one class, with built-in help docs and type safety. This cuts dev time for internal tools by 30–50% while improving reliability. It’s ideal for automating backend tasks, admin workflows, or developer utilities—think of it as ‘Laravel Artisan, but lightweight and dependency-free.’"

For Engineers: *"This package automates CLI command registration and parsing using PHP reflection. Key benefits:

  • No manual routing: Drop a class in src/Cli/Command/ and it’s instantly available as a CLI command.
  • Type-safe arguments/options: Define method signatures like public function __invoke(string $name, bool $force) and AutoShell handles parsing.
  • Built-in help: Add #[Help] attributes to auto-generate manpages.
  • DI-friendly: Plug into PSR-11 containers for dependency injection. Perfect for projects where we want structured CLI tools without the overhead of Symfony Console or Artisan. Example use case: Replace our Bash scripts for database migrations with type-safe PHP commands."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport