PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Andrey Postal   EasyCLI   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: EasyCLI
Create CLI applications using handler functions
Author: By
Last change:
Date: 4 months ago
Size: 1,511 bytes
 

Contents

Class file image Download

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.

Probably I should have thought of a name for it.

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> <br />

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