1
0
Fork 0

Add some missing options to the CLI docs

pull/747/head
Igor Wiedler 2012-05-30 23:55:04 +02:00
parent f418a63e57
commit 0afd5dcd51
1 changed files with 20 additions and 5 deletions

View File

@ -5,15 +5,27 @@ things. This chapter documents all the available commands.
## init ## init
In the [Libraries](02-libraries.md) chapter we looked at how to create a `composer.json` by In the [Libraries](02-libraries.md) chapter we looked at how to create a
hand. There is also an `init` command available that makes it a bit easier to `composer.json` by hand. There is also an `init` command available that makes
do this. it a bit easier to do this.
When you run the command it will interactively ask you to fill in the fields, When you run the command it will interactively ask you to fill in the fields,
while using some smart defaults. while using some smart defaults.
$ php composer.phar init $ php composer.phar init
### Options
* **--no-interaction:** (**-n**) Run the command in non-interactive mode.
The rest of these options only make sense when you are in this mode.
* **--name:** Name of the package.
* **--description:** Description of the package.
* **--author:** Author name of the package.
* **--homepage:** Homepage of the package.
* **--require:** Package to require with a version constraint. Should be
in format `foo/bar:1.0.0`.
* **--require-dev:** Development requirements, see **--require**.
## install ## install
The `install` command reads the `composer.json` file from the current The `install` command reads the `composer.json` file from the current
@ -42,6 +54,7 @@ resolution.
* **--dev:** By default composer will only install required packages. By * **--dev:** By default composer will only install required packages. By
passing this option you can also make it install packages referenced by passing this option you can also make it install packages referenced by
`require-dev`. `require-dev`.
* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
## update ## update
@ -62,16 +75,17 @@ If you just want to update a few packages and not all, you can list them as such
* **--prefer-source:** Install packages from `source` when available. * **--prefer-source:** Install packages from `source` when available.
* **--dry-run:** Simulate the command without actually doing anything. * **--dry-run:** Simulate the command without actually doing anything.
* **--dev:** Install packages listed in `require-dev`. * **--dev:** Install packages listed in `require-dev`.
* **--no-scripts:** Skips execution of scripts defined in `composer.json`.
## require ## require
The `require` command adds new packages to the `composer.json` file from The `require` command adds new packages to the `composer.json` file from
the current directory. the current directory.
$ php composer.phar require $ php composer.phar require
After adding/changing the requirements, the modified requirements will be After adding/changing the requirements, the modified requirements will be
installed or updated. installed or updated.
If you do not want to choose requirements interactively, you can just pass them If you do not want to choose requirements interactively, you can just pass them
to the command. to the command.
@ -190,6 +204,7 @@ By default the command checks for the packages on packagist.org.
to a `composer` repository, or a path to a local `packages.json` file. to a `composer` repository, or a path to a local `packages.json` file.
* **--prefer-source:** Get a development version of the code checked out * **--prefer-source:** Get a development version of the code checked out
from version control. from version control.
* **--dev:** Install packages listed in `require-dev`.
## help ## help