From ad2b8c48974e0a0b77795e2ea31c4a08e82babd3 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 17 Aug 2013 03:45:51 +0200 Subject: [PATCH] Add docs for global command --- doc/03-cli.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/03-cli.md b/doc/03-cli.md index 995d2029e..be0b252e8 100644 --- a/doc/03-cli.md +++ b/doc/03-cli.md @@ -148,6 +148,24 @@ to the command. * **--no-progress:** Removes the progress display that can mess with some terminals or scripts which don't handle backspace characters. +## global + +The global command allows you to run other commands like `install`, `require` +or `update` as if you were running them from the [COMPOSER_HOME](#COMPOSER_HOME) +directory. + +This can be used to install CLI utilities globally and if you add +`$COMPOSER_HOME/vendor/bin` to your `$PATH` environment variable. Here is an +example: + + $ php composer.phar global require fabpot/php-cs-fixer:dev-master + +Now the `php-cs-fixer` binary is available globally (assuming you adjusted +your PATH). If you wish to update the binary later on you can just run a +global update: + + $ php composer.phar global update + ## search The search command allows you to search through the current project's package @@ -356,6 +374,11 @@ performance. autoloader. This is recommended especially for production, but can take a bit of time to run so it is currently not done by default. +## licenses + +Lists the name, version and license of every package installed. Use +`--format=json` to get machine readable output. + ## run-script To run [scripts](articles/scripts.md) manually you can use this command,