#!/usr/bin/env php
<?php

use Leantime\Core\Console\ConsoleKernel;
define('LEAN_CLI', true);

require __DIR__.'/../vendor/autoload.php';

//Get the application once.
//Loads everything up once and then let's the bootloader manage it
$app = require_once __DIR__.'/../bootstrap/app.php';

$kernel = $app->make(ConsoleKernel::class);

$status = $kernel->handle(
        $input = new \Symfony\Component\Console\Input\ArgvInput,
        new \Symfony\Component\Console\Output\ConsoleOutput
);

$kernel->terminate($input, $status);

exit($status);
