protected function execute(InputInterface $input, OutputInterface $output)
 {
     $instances = Instances::getInstances();
     foreach ($instances as $instance) {
         $output->writeln($instance['name'] . "\t" . $instance['version'] . "\t" . $instance['path']);
     }
 }
$app->get('/getLatestRelease', function (Request $request, Response $response) {
    $cresponse = \SDK\Util\GitHub::getLatestRelease();
    return $response->withHeader('Content-Type', 'application/json')->getBody()->write($cresponse);
});
$app->get('/setupConfig/{name}', function (Request $request, Response $response) {
    global $config;
    $name = $request->getAttribute('name');
    $config['git']['projects']['SuiteCRM'] = array("upstream" => $config['git']['url'] . "salesagility/SuiteCRM.git", "origin" => $config['git']['url'] . $name . "/SuiteCRM.git");
    file_put_contents('config.php', '<?php' . PHP_EOL . 'global $config; $config = ' . var_export($config, true) . ';' . PHP_EOL);
    if (!file_exists('instances')) {
        mkdir('instances');
    }
    return $response->withHeader('Content-Type', 'application/json')->getBody()->write(json_encode(true));
});
$app->get('/getInstances', function (Request $request, Response $response) {
    $projects = \SDK\Util\Instances::getInstances();
    return $response->withHeader('Content-Type', 'application/json')->getBody()->write(json_encode($projects));
});
$app->get('/addInstance/{name}', function (Request $request, Response $response) {
    $name = $request->getAttribute('name');
    $exists = array('output' => \SDK\Util\Instances::createInstances($name));
    return $response->withHeader('Content-Type', 'application/json')->getBody()->write(json_encode($exists));
});
$app->get('/deleteInstance/{name}', function (Request $request, Response $response) {
    $name = $request->getAttribute('name');
    $exists = array('output' => \SDK\Util\Instances::deleteInstances($name));
    return $response->withHeader('Content-Type', 'application/json')->getBody()->write(json_encode($exists));
});
$app->get('/phpmyadmin', function (Request $request, Response $response) {
    $ret = false;
    if (is_dir(__DIR__ . '/phpmyadmin')) {