@ -8,28 +9,32 @@ __Command line management library in PHP (CLI)__
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
- options (short/long tag) : _-h_ or _--version_
- values : my/path/to/a/file
## Installation
```
composer require darkelfe14728/commandline
composer require jrosset/commandline
```
## 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.
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
```php
<?php
use CommandLine\CommandLine;
use CommandLine\Argument\Option\Flag;
use CommandLine\Argument\Parser\StringParser;
use CommandLine\Argument\Value\Value;
use jrosset\CommandLine\CommandLine;
use jrosset\CommandLine\Argument\Option\Flag;
use jrosset\CommandLine\Argument\Parser\StringParser;
use jrosset\CommandLine\Argument\Value\Value;
$cmdline = new CommandLine('Checker', 'File checker', 'php checker.php');