Skip to content

A simple and easy to use library with no dependencies for creating pretty and organized CLI apps in PHP. Even has some fun progress bars.

License

Notifications You must be signed in to change notification settings

andreypostal/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintainability

Progress Bar Gif

🧙‍♂️ Easy CLI for PHP

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!! 😄

Installation

composer require andreypostal/cli

Basic Usage

$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);

Docs

Examples

About

Author

Andrey Postal - andreypostal@gmail.com

License

CLI is licensed under the Apache License 2.0 - see the LICENSE file for details

Acknowledgements

Highly inspired by the Go library urfave/cli

About

A simple and easy to use library with no dependencies for creating pretty and organized CLI apps in PHP. Even has some fun progress bars.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages