diff --git a/README.md b/README.md index 017ede2..848bdd6 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,28 @@ - # PHPCommandLine -__Command line management library in PHP (CLI)__ +__Command line management library in PHP (CLI)__ -![nb releases](https://badgen.net/github/tags/darkelfe14728/PhpCommandLine?label=Nb%20releases) -![last release](https://badgen.net/github/tag/darkelfe14728/PhpCommandLine?label=Last%20release&color=yellow) -![licence](https://badgen.net/badge/license/CC%20BY%204.0/red) +![last release](https://badgen.net/packagist/v/darkelfe14728/commandline?label=Last%20release) +![licence](https://badgen.net/packagist/license/darkelfe14728/commandline?color=red) +![nb releases](https://badgen.net/packagist/dt/darkelfe14728/commandline?color=green) A command-line options parser with configurable expects and help auto generation. There is two kind of arguments : - options (short/long tag) : _-h_ or _--version_ - values : my/path/to/a/file + +## Installation +``` +composer require darkelfe14728/commandline +``` -### Description +## Description At first, create a new CommandLine with program name and description. Add options and values by using respectively _addOption_ and _addValue_. Default options for help (-h / --help) and version (--version) can be add with _addDefaultArguments_ and use _treatDefaultArguments_ for launching associated treatments. Treat script arguments with _parse_ : return an object of variables. -### Example +## Example ```php