Weave 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

Cli Laravel Package

innmind/cli

A PHP CLI package from the Innmind ecosystem for building console applications with composable commands, arguments, and input handling. It provides a lightweight, functional-style foundation for defining and running command-line tools.

Deep Wiki
Context7

innmind/cli provides a lightweight, object-oriented foundation for building command-line applications in PHP. Define commands as dedicated classes, declare their arguments and options through a clean input abstraction, and keep output handling separate so every command stays small, testable, and framework-agnostic.

  • Commands as single-responsibility classes
  • Typed argument and option parsing
  • Decoupled output writer for formatted console messages
  • Composable with InnMind's dependency injection and bootstrapping
  • Works for standalone scripts or larger applications
Frequently asked questions about Cli
What is innmind/cli used for?
innmind/cli is a PHP framework for building command-line applications. You define commands declaratively, parse arguments and options, and handle input/output through small composable interfaces. It is part of the Innmind ecosystem and favors explicit objects over magic so console apps are easier to test and extend.
How do I install innmind/cli?
Install it with Composer using composer require innmind/cli. Composer will resolve the package and its dependencies from Packagist. Then include Composer's autoloader in your CLI entry point.
Does innmind/cli work with Laravel?
innmind/cli is framework-agnostic PHP, so it can be installed in a Laravel application via Composer. It does not appear to depend on Laravel, so you would wire commands into your own console entry point rather than expecting Artisan integration. For Laravel-native commands, Artisan remains the default choice.
How do I define a command in innmind/cli?
Commands are defined declaratively, typically by describing the command name, arguments, options, and handler as explicit objects. The framework then parses input and routes it to the matching command. Check the package documentation for the exact interfaces and composition style.
How are arguments and options parsed in innmind/cli?
innmind/cli handles parsing of command-line arguments and options as part of its command definition and dispatch flow. You declare the expected inputs, and the framework maps raw CLI input to them. This keeps parsing separate from business logic and makes commands easier to test.
Can I test CLI applications built with innmind/cli?
Yes, the design favors small composable interfaces and explicit objects, which makes commands easier to unit test. You can test command behavior by supplying inputs and checking outputs through the interfaces rather than relying on magic. This testability is a key goal of the framework.
How does innmind/cli handle input and output?
Input and output are handled through small composable interfaces. That means you can swap or wrap I/O implementations, making console apps easier to test and integrate with other components. It avoids hard-coding global stdin and stdout behavior into command logic.
Is innmind/cli a replacement for Laravel Artisan?
No, innmind/cli is a general PHP CLI framework, not a Laravel console component. Artisan is Laravel's built-in command runner and provides framework-specific integration. You could use innmind/cli alongside Laravel for standalone CLI tooling, but it does not replace Artisan's Laravel hooks.
What PHP versions or Laravel versions does innmind/cli support?
The provided overview does not specify PHP or Laravel version constraints. Check the package's composer.json and Packagist metadata for the exact PHP requirement and dependency constraints. Because it is framework-agnostic, Laravel version support depends on your application's PHP and Composer compatibility.
What are good alternatives to innmind/cli?
Common PHP CLI options include Symfony Console, Laravel Artisan for Laravel-native commands, and lightweight tools such as Minicli or Laravel Zero for standalone apps. innmind/cli differentiates itself through declarative command definitions, composable I/O interfaces, and explicit objects. Choose based on how much framework integration versus minimal composition you want.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons