composer require weew/console-app
This is a very minimalistic wrapper for a console application. It is basically an integration of these two packages weew/app and weew/console.
Just create a new instance and your ready to go.
$app = new ConsoleApp();
// returns IConsole
$app->getConsole();
// start app
$app->start();
// run console
$app->parseArgv($argv);
Be aware that the --env
switch is only available if debug mode has been enabled.