Skip to content

Commit ec71fb1

Browse files
authored
Move the installation configuration docs to a separate page (#8546)
1 parent f76781c commit ec71fb1

File tree

3 files changed

+53
-39
lines changed

3 files changed

+53
-39
lines changed

docs/configuration/installer.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Configuring the uv installer
2+
3+
## Changing the install path
4+
5+
By default, uv is installed to `~/.cargo/bin`. To change the installation path, use
6+
`UV_INSTALL_DIR`:
7+
8+
=== "macOS and Linux"
9+
10+
```console
11+
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/custom/path" sh
12+
```
13+
14+
=== "Windows"
15+
16+
```powershell
17+
$env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
18+
```
19+
20+
## Disabling shell modifications
21+
22+
The installer may also update your shell profiles to ensure the uv binary is on your `PATH`. To
23+
disable this behavior, use `INSTALLER_NO_MODIFY_PATH`. For example:
24+
25+
```console
26+
$ curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh
27+
```
28+
29+
If installed with `INSTALLER_NO_MODIFY_PATH`, subsequent operations, like `uv self update`, will not
30+
modify your shell profiles.
31+
32+
## Unmanaged installations
33+
34+
In ephemeral environments like CI, use `UV_UNMANAGED_INSTALL` to install uv to a specific path while
35+
preventing the installer from modifying shell profiles or environment variables:
36+
37+
```console
38+
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/custom/path" sh
39+
```
40+
41+
The use of `UV_UNMANAGED_INSTALL` will also disable self-updates (via `uv self update`).
42+
43+
## Passing options to the install script
44+
45+
Using environment variables is recommended because they are consistent across platforms. However,
46+
options can be passed directly to the install script. For example, to see the available options:
47+
48+
```console
49+
$ curl -LsSf https://astral.sh/uv/install.sh | sh -s -- --help
50+
```

docs/getting-started/installation.md

+2-39
Original file line numberDiff line numberDiff line change
@@ -52,45 +52,8 @@ Request a specific version by including it in the URL:
5252

5353
Alternatively, the installer or binaries can be downloaded directly from [GitHub](#github-releases).
5454

55-
#### Configuring installation
56-
57-
By default, uv is installed to `~/.cargo/bin`. To change the installation path, use
58-
`UV_INSTALL_DIR`:
59-
60-
=== "macOS and Linux"
61-
62-
```console
63-
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/custom/path" sh
64-
```
65-
66-
=== "Windows"
67-
68-
```powershell
69-
$env:UV_INSTALL_DIR = "C:\Custom\Path" powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
70-
```
71-
72-
The installer will also update your shell profiles to ensure the uv binary is on your `PATH`. To
73-
disable this behavior, use `INSTALLER_NO_MODIFY_PATH`. For example:
74-
75-
```console
76-
$ curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_NO_MODIFY_PATH=1 sh
77-
```
78-
79-
Using environment variables is recommended because they are consistent across platforms. However,
80-
options can be passed directly to the install script. For example, to see the available options:
81-
82-
```console
83-
$ curl -LsSf https://astral.sh/uv/install.sh | sh -s -- --help
84-
```
85-
86-
In ephemeral environments like CI, use `UV_UNMANAGED_INSTALL` to install uv to a specific path while
87-
preventing the installer from modifying shell profiles or environment variables:
88-
89-
```console
90-
$ curl -LsSf https://astral.sh/uv/install.sh | env UV_UNMANAGED_INSTALL="/custom/path" sh
91-
```
92-
93-
The use of `UV_UNMANAGED_INSTALL` will also disable self-updates (via `uv self update`).
55+
See the documentation on [installer configuration](../configuration/installer.md) for details on
56+
customizing your uv installation.
9457

9558
### PyPI
9659

mkdocs.template.yml

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ nav:
107107
- Environment variables: configuration/environment.md
108108
- Authentication: configuration/authentication.md
109109
- Package indexes: configuration/indexes.md
110+
- Installer: configuration/installer.md
110111
- Integration guides:
111112
- guides/integration/index.md
112113
- Docker: guides/integration/docker.md

0 commit comments

Comments
 (0)