#!/usr/bin/env php arguments->add([ 'environment' => [ 'prefix' => 'e', 'longPrefix' => 'env', 'description' => 'Configuration Environment', 'defaultValue' => 'localhost' ] ]); $climate->arguments->parse(); $environment = $climate->arguments->get('environment'); // Set up environment based on params. Setup::$environment = $environment; $grav = Grav::instance(array('loader' => $autoload)); $grav['uri']->init(); $grav['config']->init(); $grav['streams']; $app = new Application('Grav Package Manager', GRAV_VERSION); $app->addCommands(array( new \Grav\Console\Gpm\IndexCommand(), new \Grav\Console\Gpm\VersionCommand(), new \Grav\Console\Gpm\InfoCommand(), new \Grav\Console\Gpm\InstallCommand(), new \Grav\Console\Gpm\UninstallCommand(), new \Grav\Console\Gpm\UpdateCommand(), new \Grav\Console\Gpm\SelfupgradeCommand(), )); $app->run();