A simple and easy to use library with no dependencies for creating pretty and organized CLI apps in PHP.
No dependencies, simple and easy to understand. You can create simple CLI tools or complex one and things wont get messy!! 😄
composer require andreypostal/cli
$app = new App(
appName: 'MyApp',
description: 'My app has a cool description',
cmd: 'php cmd',
params: [],
commands: [
new Command(
key: 'run',
description: 'This action will run soon',
service: [
'handler' => static function(Context $context): void {
App::console('It is so easy!!!');
},
],
),
],
);
$app->run($argv);
- Basic Handler
- Basic Service
- Required Params Validation
- Boolean Flag
- Progress Bar
- Infinite Progress Bar
- Complete
Andrey Postal - andreypostal@gmail.com
CLI is licensed under the Apache License 2.0 - see the LICENSE file for details
Highly inspired by the Go library urfave/cli