enom / cli
Simple command line argument interpreter
1.0.3
2020-03-31 17:23 UTC
Requires
- php: ^7.1
Requires (Dev)
- codeception/base: ^2.1@dev
- codeception/specify: dev-master
- enom/pharmon: dev-master
- escapestudios/symfony2-coding-standard: 3.x-dev
- friendsofphp/php-cs-fixer: ^2.10
- squizlabs/php_codesniffer: ^3.2
This package is auto-updated.
Last update: 2024-10-29 04:42:16 UTC
README
Simple command line argument interpreter.
Supports both shorthand single-dash arguments and extended double-dash arguments.
# console -w src/ -x "composer run lint"
$argv = \Console\CommandLine::parse($_SERVER['argv']);
$argv['w'] === 'src/';
$argv['x'] === 'composer run lint';
# console --dry-run --watch src/ --exec "composer run lint"
$argv = \Console\CommandLine::parse($_SERVER['argv']);
$argv['dry-run'] === true;
$argv['watch'] === 'src/';
$argv['exec'] === 'composer run lint';