Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update install cli doc #1

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,29 @@ pixi add --feature featurex numpy

## `install`

Installs all dependencies specified in the lock file `pixi.lock`.
Which gets generated on `pixi add` or when you manually change the [manifest file](configuration.md) file and run `pixi install`.
Installs an environment based on the [manifest file](configuration.md).
If there is no `pixi.lock` file or it is not up-to-date with the [manifest file](configuration.md), it will (re-)generate the lock file.

##### Options
/// Install the environment as defined in the lock file, doesn't abort when lock file isn't up-to-date with the manifest file.
`pixi install` only installs one environment at a time, if you have multiple environments you can select the right one with the `--environment` flag.
If you don't provide an environment, the `default` environment will be installed.

Running `pixi install` is not required before running other commands.
As all commands interacting with the environment will first run the `install` command if the environment is not ready, to make sure you always run in a correct state.
E.g. `pixi run`, `pixi shell`, `pixi shell-hook`, `pixi add`, `pixi remove` to name a few.

##### Options
- `--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`.
- `--environment <ENVIRONMENT> (-e)`: The environment to install, if none are provided the default environment will be used.

```shell
pixi install
pixi install --manifest-path ~/myproject/pixi.toml
pixi install --frozen
pixi install --locked
pixi install --environment lint
pixi install -e lint
```

To reinitialize the lock file in your project, you can remove the existing `pixi.lock` file and run `pixi install`.
Expand Down