#!/usr/bin/env php arguments->add([ 'environment' => [ 'prefix' => 'e', 'longPrefix' => 'env', 'description' => 'Configuration Environment', 'defaultValue' => 'localhost' ] ]); $climate->arguments->parse(); // Set up environment based on params. $environment = $climate->arguments->get('environment'); $grav = Grav::instance(array('loader' => $autoload)); $grav->setup($environment); if (!file_exists(GRAV_ROOT . '/index.php')) { exit('FATAL: Must be run from ROOT directory of Grav!'); } $app = new Application('Grav CLI Application', GRAV_VERSION); $app->addCommands(array( new Cli\InstallCommand(), new Cli\ComposerCommand(), new Cli\SandboxCommand(), new Cli\CleanCommand(), new Cli\ClearCacheCommand(), new Cli\BackupCommand(), new Cli\NewProjectCommand(), new Cli\SchedulerCommand(), new Cli\SecurityCommand(), new Cli\LogViewerCommand(), new Cli\YamlLinterCommand(), new Cli\ServerCommand(), new Cli\PageSystemValidatorCommand(), )); $app->run();