boot(); // $container = $kernel->getContainer(); // $app = $container->get(CommandRunner::class); $runner = new CommandRunner([ new FooCommand(), ]); $exitCode = $runner->run(new CommandParser(), new Output()); exit($exitCode);