protected function execute(InputInterface $input, OutputInterface $output)
 {
     $name = $input->getArgument('name');
     while (empty($name)) {
         $name = readline('What do you want to call the project? ');
     }
     $tab = '    ';
     $output->writeln("create-instance {$tab} {$name}");
     error_reporting(E_ERROR | E_PARSE);
     Instances::createInstances($name);
 }
    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')) {
        $ret = true;
    }
    return $response->withHeader('Content-Type', 'application/json')->getBody()->write(json_encode($ret));
});
$app->get('/rscanInstance/{name}[/{ext:.*}]', function (Request $request, Response $response) {