protected function configure()
{
$this->setName('run')->setDescription('execute a script')->addArgument('script', InputArgument::REQUIRED, 'Which script do you want to run?')->addArgument('arguments', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Which arguments do you want to pass to the script?')->addOption('no-cache', null, InputOption::VALUE_NONE, 'If set, do not rely on previous cache.')->addOption('prefer-source', null, InputOption::VALUE_NONE, 'Forces installation from package sources when possible, including VCS information.')->addOption('trust', 't', InputOption::VALUE_NONE, 'Trust the resource.')->setHelp(<<<EOT
The <info>run</info> command executes single-file scripts using Composer
<info>php melody.phar run test.php</info>
You may also run a gist file:
<info>php melody.phar run https://gist.github.com/lyrixx/23bb3980daf65154c3d4</info>
Or a stream resource
<info>php melody.phar run http://my.private/snippets/test.php</info>
<info>curl http://my.private/snippets/demo.php | php melody.phar run php://stdin -- --arg1</info>
If you want to debug things a little bit, it might be useful to use:
<info>php melody.phar run -vvv --no-cache test.php</info>
If you want to pass arguments to your script, use:
<info>php melody.phar run test.php -- -a --arg1 arg2</info>
If you trust a remote resource, use:
<info>php melody.phar run https://gist.github.com/lyrixx/23bb3980daf65154c3d4 --trust</info>
EOT
);
}