forked from fa/breadcrumb-the-shire
- ConsoleApplication.discoverCommands() scans lib/Console/Commands/ automatically; adding a new command no longer requires editing bin/console - Command base class provides bootstrapApp(), bootstrapModuleApp(), requireBinScript() and projectRoot() helpers — eliminates fragile 4-level relative require_once paths - Per-command --help support via optional usage() method on Command - Docker-compose scheduler updated to use bin/console scheduler:run - Old bin scripts now emit deprecation hint to stderr when called directly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
26 lines
601 B
PHP
Executable File
26 lines
601 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* CoreCore CLI — single entry point for all commands.
|
|
*
|
|
* Usage:
|
|
* php bin/console <command> [arguments] [options]
|
|
* php bin/console list
|
|
* php bin/console <command> --help
|
|
*
|
|
* Commands are auto-discovered from lib/Console/Commands/.
|
|
* To add a new command, create a class extending Command in that directory.
|
|
*/
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use MintyPHP\Console\ConsoleApplication;
|
|
|
|
$app = new ConsoleApplication();
|
|
$app->discoverCommands(__DIR__ . '/../lib/Console/Commands');
|
|
|
|
exit($app->run($argv));
|