diff --git a/docs/reference/environment_variables.md b/docs/reference/environment_variables.md index 610b15fbb7..1d1938dcbb 100644 --- a/docs/reference/environment_variables.md +++ b/docs/reference/environment_variables.md @@ -1,5 +1,5 @@ -# Environment Variables +## Configurable Environment Variables Pixi can also be configured via environment variables. @@ -30,3 +30,23 @@ Pixi can also be configured via environment variables. + + +## Environment Variables Set By Pixi + +The following environment variables are set by Pixi, when using the `pixi run`, `pixi shell`, or `pixi shell-hook` command: + +- `PIXI_PROJECT_ROOT`: The root directory of the project. +- `PIXI_PROJECT_NAME`: The name of the project. +- `PIXI_PROJECT_MANIFEST`: The path to the manifest file (`pixi.toml`). +- `PIXI_PROJECT_VERSION`: The version of the project. +- `PIXI_PROMPT`: The prompt to use in the shell, also used by `pixi shell` itself. +- `PIXI_ENVIRONMENT_NAME`: The name of the environment, defaults to `default`. +- `PIXI_ENVIRONMENT_PLATFORMS`: Comma separated list of platforms supported by the project. +- `CONDA_PREFIX`: The path to the environment. (Used by multiple tools that already understand conda environments) +- `CONDA_DEFAULT_ENV`: The name of the environment. (Used by multiple tools that already understand conda environments) +- `PATH`: We prepend the `bin` directory of the environment to the `PATH` variable, so you can use the tools installed in the environment directly. +- `INIT_CWD`: ONLY IN `pixi run`: The directory where the command was run from. + +!!! note + Even though the variables are environment variables these cannot be overridden. E.g. you can not change the root of the project by setting `PIXI_PROJECT_ROOT` in the environment. diff --git a/docs/workspace/environment.md b/docs/workspace/environment.md index e37486590b..cff31d5a04 100644 --- a/docs/workspace/environment.md +++ b/docs/workspace/environment.md @@ -136,25 +136,6 @@ $ (default) which python !!! tip "" See our [direnv page](../integration/third_party/direnv.md) on how to leverage `pixi shell-hook` to integrate with direnv. -## Environment variables - -The following environment variables are set by pixi, when using the `pixi run`, `pixi shell`, or `pixi shell-hook` command: - -- `PIXI_PROJECT_ROOT`: The root directory of the project. -- `PIXI_PROJECT_NAME`: The name of the project. -- `PIXI_PROJECT_MANIFEST`: The path to the manifest file (`pixi.toml`). -- `PIXI_PROJECT_VERSION`: The version of the project. -- `PIXI_PROMPT`: The prompt to use in the shell, also used by `pixi shell` itself. -- `PIXI_ENVIRONMENT_NAME`: The name of the environment, defaults to `default`. -- `PIXI_ENVIRONMENT_PLATFORMS`: Comma separated list of platforms supported by the project. -- `CONDA_PREFIX`: The path to the environment. (Used by multiple tools that already understand conda environments) -- `CONDA_DEFAULT_ENV`: The name of the environment. (Used by multiple tools that already understand conda environments) -- `PATH`: We prepend the `bin` directory of the environment to the `PATH` variable, so you can use the tools installed in the environment directly. -- `INIT_CWD`: ONLY IN `pixi run`: The directory where the command was run from. - -!!! note - Even though the variables are environment variables these cannot be overridden. E.g. you can not change the root of the project by setting `PIXI_PROJECT_ROOT` in the environment. - ## Solving environments When you run a command that uses the environment, Pixi will check if the environment is in sync with the `pixi.lock` file.