Skip to content

Commit

Permalink
Update install cli doc
Browse files Browse the repository at this point in the history
`environment` flag was missing from documentation. Also updated documentation as mentioned in prefix-dev#1333 (comment)
  • Loading branch information
vigneshmanick authored May 7, 2024
1 parent 5b16bdd commit 03934d9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Which gets generated on `pixi add` or when you manually change the [manifest fil
- `--manifest-path <MANIFEST_PATH>`: the path to [manifest file](configuration.md), by default it searches for one in the parent directories.
- `--frozen`: install the environment as defined in the lock file, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`).
- `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`.
- `--environemnt <ENVIRONMENT> (-e)`: install the specific environment (example: `pixi install -e lint`).

```shell
pixi install
Expand All @@ -103,6 +104,13 @@ pixi install --frozen
pixi install --locked
```

!!! info
`pixi install` by default will only install the required environment (`default` environment).
To specify installation of other environments use the `-e` flag to specify the name of the environment that you require to install.
The install command is used when only the installation of the default environment is required and nothing else.
The other commands, `run` `shell` `shell-hook`, `remove` to name a few, will all install the environment/s as and when it's required by the commands.
This mechanism ensures that the environments are always in the correct state.

To reinitialize the lock file in your project, you can remove the existing `pixi.lock` file and run `pixi install`.
This process will regenerate the lock file based on the dependencies defined in your manifest file:

Expand Down

0 comments on commit 03934d9

Please sign in to comment.