#!/usr/bin/env php
<?php
// Register Application Space
define('BEAR', $_SERVER['BEAR_ENV'] ?? 'production');

// Includes Constants
require_once __DIR__ . '/config/constants.php';

// Includes Composer Vendor Packages
require_once __DIR__ . '/vendor/autoload.php';

use Silly\Edition\PhpDi\Application;

// List all Command
use Bear\App\Command\TestCommand;

$app = new Application();
$app->setName(ENV_APP_NAME);

// Routes list Command
$app->command(parseExpressionOptions('greet', [
		'u|upper',
		'r|randomFaker'
]), TestCommand::class)->descriptions(TestCommand::$desc, TestCommand::$optionsInfo);

try {
	$app->run();
} catch (Exception $e) {
	echo $e->getMessage() . PHP_EOL;
}
