tecsiaron / cli-app
PHP library for building 1 file - 1 command CLI apps
0.1.0-alpha
2026-01-23 11:25 UTC
Requires
- php: >=8.2
This package is auto-updated.
Last update: 2026-03-01 00:48:56 UTC
README
Used to create 1 file - 1 command cli apps/utils. Install:
composer require tecsiaron/cli-app
NOTES:
- Requires PHP 8.2+
- Currently still exerimental/possibly unstable. Usage:
$option1 = new CLIOption("testBoolean", "tb", "Test boolean", CLIOptionType::BOOLEAN, false); $option2 = new CLIOption("testNumber", "tn", "Test number", CLIOptionType::NUMBER, true); $option3 = new CLIOption("testString", "ts", "Test string", CLIOptionType::STRING, true); $option4 = new CLIOption("testArray", "ta", "Test array", CLIOptionType::ARRAY, true); $option5 = new CLIOption("testEnum", "te", "Test string", CLIOptionType::ENUM, true, CLIExceptionCodes::cases()); $options=[$option1,$option2,$option3,$option4,$option5]; $app = new CLIApp("Tester", "Test CLI App", "1.0.0", $options); $app->Parse(); var_dump($app->GetAllOptions());