tecsiaron/cli-app

PHP library for building 1 file - 1 command CLI apps

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/tecsiaron/cli-app

0.1.0-alpha 2026-01-23 11:25 UTC

This package is auto-updated.

Last update: 2026-01-29 10:51:13 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());