1. Go to this page and download the library: Download shso/cli library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cli\usage([
'opts' => [
'-f' => null, // optional, without arg, short
'*c' => null, // g, long
'*config' => 'CONFIG', //
cli\usage([
'args' => [ 'CONFUSING_ARG' ],
'opts' => [
'-f' => null,
],
'desc' => [
'CONFUSING_ARG' => 'Some descriptions that make the arg not confusing!',
'-f' => 'Describe -f option can force the operation or whatever.',
],
]);
sh
$ curl -fL -O https://github.com/ShahinSorkh/php-cli/raw/master/src/cli.php
# Or using wget
$ wget https://github.com/ShahinSorkh/php-cli/raw/master/src/cli.php