uv/docs/reference/installer.md
Zanie Blue 262ca73965
Remove the configuration section in favor of concepts / reference (#13842)
Extends https://github.com/astral-sh/uv/pull/13841 — I'll drop that
commit later after that pull request merges but it's small.

I find the split into a "Configuration" section awkward and don't think
it's helping us. Everything moved into the "Concepts" section, except
the "Environment variables" page which definitely belongs in the
reference and the "Installer" page which is fairly niche and seems
better in the reference.

Before / After


<img
src="https://github.com/user-attachments/assets/80d8304b-17da-4900-a5f4-c3ccac96fcc5"
width="400">
2025-06-05 17:09:49 +00:00

53 lines
1.7 KiB
Markdown

# The uv installer
## Changing the install path
By default, uv is installed to `~/.local/bin`. If `XDG_BIN_HOME` is set, it will be used instead.
Similarly, if `XDG_DATA_HOME` is set, the target directory will be inferred as
`XDG_DATA_HOME/../bin`.
To change the installation path, use `UV_INSTALL_DIR`:
=== "macOS and Linux"
```console
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/custom/path" sh
```
=== "Windows"
```pwsh-session
PS> powershell -ExecutionPolicy ByPass -c {$env:UV_INSTALL_DIR = "C:\Custom\Path";irm https://astral.sh/uv/install.ps1 | iex}
```
## Disabling shell modifications
The installer may also update your shell profiles to ensure the uv binary is on your `PATH`. To
disable this behavior, use `INSTALLER_NO_MODIFY_PATH`. For example:
```console
$ curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh
```
If installed with `INSTALLER_NO_MODIFY_PATH`, subsequent operations, like `uv self update`, will not
modify your shell profiles.
## Unmanaged installations
In ephemeral environments like CI, use `UV_UNMANAGED_INSTALL` to install uv to a specific path while
preventing the installer from modifying shell profiles or environment variables:
```console
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/custom/path" sh
```
The use of `UV_UNMANAGED_INSTALL` will also disable self-updates (via `uv self update`).
## Passing options to the install script
Using environment variables is recommended because they are consistent across platforms. However,
options can be passed directly to the install script. For example, to see the available options:
```console
$ curl -LsSf https://astral.sh/uv/install.sh | sh -s -- --help
```