Registry / cli / splitbrain-php-cli

splitbrain-php-cli

JSON →
library1.3.5phppackagistunverified

Easy command line scripts for PHP with opt parsing and color output. No dependencies

composer require splitbrain/php-cli
INSTALL
IMPORT
SIG · SPLITBRAIN-PHP-CLI
S
splitbrain-php-cli
cliphpv1.3.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI
use splitbrain\phpcli\CLI;

Create a simple CLI script with argument parsing and colored output

use splitbrain\phpcli\CLI; use splitbrain\phpcli\Options; class MyCLI extends CLI { protected function setup(Options $options) { $options->setHelp('My CLI tool'); $options->registerOption('name', 'Your name', 'n'); } protected function main(Options $options) { $name = $options->getOpt('name') ?: 'World'; echo "Hello, $name!\n"; } } $cli = new MyCLI(); $cli->run();
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.3.5latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
24
Amazon
1
Resources
splitbrain-php-cli — pip install splitbrain-php-cli · libregistry