uv_static/env_vars.rs
1//! Environment variables used or supported by uv.
2//! Used to generate `docs/reference/environment.md`.
3use uv_macros::{attr_added_in, attr_env_var_pattern, attr_hidden, attribute_env_vars_metadata};
4
5/// Declares all environment variable used throughout `uv` and its crates.
6pub struct EnvVars;
7
8#[attribute_env_vars_metadata]
9impl EnvVars {
10 /// The path to the binary that was used to invoke uv.
11 ///
12 /// This is propagated to all subprocesses spawned by uv.
13 ///
14 /// If the executable was invoked through a symbolic link, some platforms will return the path
15 /// of the symbolic link and other platforms will return the path of the symbolic link’s target.
16 ///
17 /// See <https://doc.rust-lang.org/std/env/fn.current_exe.html#security> for security
18 /// considerations.
19 #[attr_added_in("0.6.0")]
20 pub const UV: &'static str = "UV";
21
22 /// The path to the Ruff binary used by `uv format`.
23 #[attr_added_in("0.11.22")]
24 pub const RUFF: &'static str = "RUFF";
25
26 /// The path to the ty binary used by `uv check`.
27 #[attr_added_in("0.11.22")]
28 pub const TY: &'static str = "TY";
29
30 /// Equivalent to the `--offline` command-line argument. If set, uv will disable network access.
31 #[attr_added_in("0.5.9")]
32 pub const UV_OFFLINE: &'static str = "UV_OFFLINE";
33
34 /// Equivalent to the `--default-index` command-line argument. If set, uv will use
35 /// this index as the default index when searching for packages.
36 #[attr_added_in("0.4.23")]
37 pub const UV_DEFAULT_INDEX: &'static str = "UV_DEFAULT_INDEX";
38
39 /// Equivalent to the `--index` command-line argument. If set, uv will use this
40 /// space-separated list of additional indexes when searching for packages.
41 #[attr_added_in("0.4.23")]
42 pub const UV_INDEX: &'static str = "UV_INDEX";
43
44 /// Equivalent to the `--index-url` command-line argument. If set, uv will use this
45 /// URL as the default index when searching for packages.
46 /// (Deprecated: use `UV_DEFAULT_INDEX` instead.)
47 #[attr_added_in("0.0.5")]
48 pub const UV_INDEX_URL: &'static str = "UV_INDEX_URL";
49
50 /// Equivalent to the `--extra-index-url` command-line argument. If set, uv will
51 /// use this space-separated list of URLs as additional indexes when searching for packages.
52 /// (Deprecated: use `UV_INDEX` instead.)
53 #[attr_added_in("0.1.3")]
54 pub const UV_EXTRA_INDEX_URL: &'static str = "UV_EXTRA_INDEX_URL";
55
56 /// Equivalent to the `--find-links` command-line argument. If set, uv will use this
57 /// comma-separated list of additional locations to search for packages.
58 #[attr_added_in("0.4.19")]
59 pub const UV_FIND_LINKS: &'static str = "UV_FIND_LINKS";
60
61 /// Equivalent to the `--no-sources` command-line argument. If set, uv will ignore
62 /// `[tool.uv.sources]` annotations when resolving dependencies.
63 #[attr_added_in("0.9.8")]
64 pub const UV_NO_SOURCES: &'static str = "UV_NO_SOURCES";
65
66 /// Equivalent to the `--cache-dir` command-line argument. If set, uv will use this
67 /// directory for caching instead of the default cache directory.
68 #[attr_added_in("0.0.5")]
69 pub const UV_CACHE_DIR: &'static str = "UV_CACHE_DIR";
70
71 /// The directory for storage of credentials when using a plain text backend.
72 #[attr_added_in("0.8.15")]
73 pub const UV_CREDENTIALS_DIR: &'static str = "UV_CREDENTIALS_DIR";
74
75 /// Equivalent to the `--no-cache` command-line argument. If set, uv will not use the
76 /// cache for any operations.
77 #[attr_added_in("0.1.2")]
78 pub const UV_NO_CACHE: &'static str = "UV_NO_CACHE";
79
80 /// Equivalent to the `--resolution` command-line argument. For example, if set to
81 /// `lowest-direct`, uv will install the lowest compatible versions of all direct dependencies.
82 #[attr_added_in("0.1.27")]
83 pub const UV_RESOLUTION: &'static str = "UV_RESOLUTION";
84
85 /// Equivalent to the `--prerelease` command-line argument. For example, if set to
86 /// `allow`, uv will allow pre-release versions for all dependencies.
87 #[attr_added_in("0.1.16")]
88 pub const UV_PRERELEASE: &'static str = "UV_PRERELEASE";
89
90 /// Equivalent to the `--fork-strategy` argument. Controls version selection during universal
91 /// resolution.
92 #[attr_added_in("0.5.9")]
93 pub const UV_FORK_STRATEGY: &'static str = "UV_FORK_STRATEGY";
94
95 /// Equivalent to the `--system` command-line argument. If set to `true`, uv will
96 /// use the first Python interpreter found in the system `PATH`.
97 ///
98 /// WARNING: `UV_SYSTEM_PYTHON=true` is intended for use in continuous integration (CI)
99 /// or containerized environments and should be used with caution, as modifying the system
100 /// Python can lead to unexpected behavior.
101 #[attr_added_in("0.1.18")]
102 pub const UV_SYSTEM_PYTHON: &'static str = "UV_SYSTEM_PYTHON";
103
104 /// Equivalent to the `--python` command-line argument. If set to a path, uv will use
105 /// this Python interpreter for all operations.
106 #[attr_added_in("0.1.40")]
107 pub const UV_PYTHON: &'static str = "UV_PYTHON";
108
109 /// Equivalent to the `--break-system-packages` command-line argument. If set to `true`,
110 /// uv will allow the installation of packages that conflict with system-installed packages.
111 ///
112 /// WARNING: `UV_BREAK_SYSTEM_PACKAGES=true` is intended for use in continuous integration
113 /// (CI) or containerized environments and should be used with caution, as modifying the system
114 /// Python can lead to unexpected behavior.
115 #[attr_added_in("0.1.32")]
116 pub const UV_BREAK_SYSTEM_PACKAGES: &'static str = "UV_BREAK_SYSTEM_PACKAGES";
117
118 /// Equivalent to the `--native-tls` command-line argument. If set to `true`, uv will
119 /// load TLS certificates from the platform's native certificate store instead of the
120 /// bundled Mozilla root certificates.
121 /// (Deprecated: use `UV_SYSTEM_CERTS` instead.)
122 #[attr_added_in("0.1.19")]
123 pub const UV_NATIVE_TLS: &'static str = "UV_NATIVE_TLS";
124
125 /// Equivalent to the `--system-certs` command-line argument. If set to `true`, uv will
126 /// load TLS certificates from the platform's native certificate store instead of the
127 /// bundled Mozilla root certificates.
128 #[attr_added_in("0.11.0")]
129 pub const UV_SYSTEM_CERTS: &'static str = "UV_SYSTEM_CERTS";
130
131 /// Equivalent to the `--index-strategy` command-line argument.
132 ///
133 /// For example, if set to `unsafe-best-match`, uv will consider versions of a given package
134 /// available across all index URLs, rather than limiting its search to the first index URL
135 /// that contains the package.
136 #[attr_added_in("0.1.29")]
137 pub const UV_INDEX_STRATEGY: &'static str = "UV_INDEX_STRATEGY";
138
139 /// Equivalent to the `--require-hashes` command-line argument. If set to `true`,
140 /// uv will require that all dependencies have a hash specified in the requirements file.
141 #[attr_added_in("0.1.34")]
142 pub const UV_REQUIRE_HASHES: &'static str = "UV_REQUIRE_HASHES";
143
144 /// Require hashes for build dependencies across project, build, tool, and pip commands.
145 #[attr_added_in("0.13.0")]
146 pub const UV_REQUIRE_BUILD_HASHES: &'static str = "UV_REQUIRE_BUILD_HASHES";
147
148 /// Require wheel metadata to be fetched with HTTP range requests when separate metadata is
149 /// unavailable. If set to `true`, uv will fail instead of downloading the entire wheel.
150 #[attr_hidden]
151 #[attr_added_in("0.12.8")]
152 pub const UV_REQUIRE_METADATA_RANGE_REQUESTS: &'static str =
153 "UV_REQUIRE_METADATA_RANGE_REQUESTS";
154
155 /// Equivalent to the `--constraints` command-line argument. If set, uv will use this
156 /// file as the constraints file. Uses space-separated list of files.
157 #[attr_added_in("0.1.36")]
158 pub const UV_CONSTRAINT: &'static str = "UV_CONSTRAINT";
159
160 /// Equivalent to the `--build-constraints` command-line argument. If set, uv will use this file
161 /// as constraints for any source distribution builds. Uses space-separated list of files.
162 #[attr_added_in("0.2.34")]
163 pub const UV_BUILD_CONSTRAINT: &'static str = "UV_BUILD_CONSTRAINT";
164
165 /// Equivalent to the `--overrides` command-line argument. If set, uv will use this file
166 /// as the overrides file. Uses space-separated list of files.
167 #[attr_added_in("0.2.22")]
168 pub const UV_OVERRIDE: &'static str = "UV_OVERRIDE";
169
170 /// Equivalent to the `--excludes` command-line argument. If set, uv will use this
171 /// as the excludes file. Uses space-separated list of files.
172 #[attr_added_in("0.9.8")]
173 pub const UV_EXCLUDE: &'static str = "UV_EXCLUDE";
174
175 /// Equivalent to the `--link-mode` command-line argument. If set, uv will use this as
176 /// a link mode.
177 #[attr_added_in("0.1.40")]
178 pub const UV_LINK_MODE: &'static str = "UV_LINK_MODE";
179
180 /// Equivalent to the `--no-build-isolation` command-line argument. If set, uv will
181 /// skip isolation when building source distributions.
182 #[attr_added_in("0.1.40")]
183 pub const UV_NO_BUILD_ISOLATION: &'static str = "UV_NO_BUILD_ISOLATION";
184
185 /// Equivalent to the `--custom-compile-command` command-line argument.
186 ///
187 /// Used to override uv in the output header of the `requirements.txt` files generated by
188 /// `uv pip compile`. Intended for use-cases in which `uv pip compile` is called from within a wrapper
189 /// script, to include the name of the wrapper script in the output file.
190 #[attr_added_in("0.1.23")]
191 pub const UV_CUSTOM_COMPILE_COMMAND: &'static str = "UV_CUSTOM_COMPILE_COMMAND";
192
193 /// Equivalent to the `--keyring-provider` command-line argument. If set, uv
194 /// will use this value as the keyring provider.
195 #[attr_added_in("0.1.19")]
196 pub const UV_KEYRING_PROVIDER: &'static str = "UV_KEYRING_PROVIDER";
197
198 /// Equivalent to the `--config-file` command-line argument. Expects a path to a
199 /// local `uv.toml` file to use as the configuration file.
200 #[attr_added_in("0.1.34")]
201 pub const UV_CONFIG_FILE: &'static str = "UV_CONFIG_FILE";
202
203 /// Equivalent to the `--no-config` command-line argument. If set, uv will not read
204 /// any configuration files from the current directory, parent directories, or user configuration
205 /// directories.
206 #[attr_added_in("0.2.30")]
207 pub const UV_NO_CONFIG: &'static str = "UV_NO_CONFIG";
208
209 /// If set, uv will not read system-level configuration files.
210 #[attr_added_in("0.11.16")]
211 pub const UV_NO_SYSTEM_CONFIG: &'static str = "UV_NO_SYSTEM_CONFIG";
212
213 /// Equivalent to the `--isolated` command-line argument. If set, uv will avoid discovering
214 /// a `pyproject.toml` or `uv.toml` file.
215 #[attr_added_in("0.8.14")]
216 pub const UV_ISOLATED: &'static str = "UV_ISOLATED";
217
218 /// Equivalent to the `--exclude-newer` command-line argument. If set, uv will
219 /// exclude distributions published after the specified date. Set to `false` to disable
220 /// `exclude-newer`.
221 #[attr_added_in("0.2.12")]
222 pub const UV_EXCLUDE_NEWER: &'static str = "UV_EXCLUDE_NEWER";
223
224 /// Whether uv should prefer system or managed Python versions.
225 #[attr_added_in("0.3.2")]
226 pub const UV_PYTHON_PREFERENCE: &'static str = "UV_PYTHON_PREFERENCE";
227
228 /// Selects the architecture for Python requests that do not specify one, e.g., `x86_64`
229 /// or `aarch64`. Requests that name an interpreter executable take precedence.
230 #[attr_added_in("0.12.22")]
231 pub const UV_PYTHON_ARCH: &'static str = "UV_PYTHON_ARCH";
232
233 /// Require use of uv-managed Python versions.
234 #[attr_added_in("0.6.8")]
235 pub const UV_MANAGED_PYTHON: &'static str = "UV_MANAGED_PYTHON";
236
237 /// Disable use of uv-managed Python versions.
238 #[attr_added_in("0.6.8")]
239 pub const UV_NO_MANAGED_PYTHON: &'static str = "UV_NO_MANAGED_PYTHON";
240
241 /// Equivalent to the
242 /// [`python-downloads`](../reference/settings.md#python-downloads) setting and, when disabled, the
243 /// `--no-python-downloads` option. Whether uv should allow Python downloads.
244 #[attr_added_in("0.3.2")]
245 pub const UV_PYTHON_DOWNLOADS: &'static str = "UV_PYTHON_DOWNLOADS";
246
247 /// Overrides the environment-determined libc on linux systems when filling in the current platform
248 /// within Python version requests. Options are: `gnu`, `gnueabi`, `gnueabihf`, `musl`,
249 /// `musleabi`, `musleabihf`, and `none`.
250 #[attr_added_in("0.7.22")]
251 pub const UV_LIBC: &'static str = "UV_LIBC";
252
253 /// Equivalent to the `--compile-bytecode` command-line argument. If set, uv
254 /// will compile Python source files to bytecode after installation.
255 #[attr_added_in("0.3.3")]
256 pub const UV_COMPILE_BYTECODE: &'static str = "UV_COMPILE_BYTECODE";
257
258 /// Timeout (in seconds) for bytecode compilation.
259 #[attr_added_in("0.7.22")]
260 pub const UV_COMPILE_BYTECODE_TIMEOUT: &'static str = "UV_COMPILE_BYTECODE_TIMEOUT";
261
262 /// Equivalent to the `--no-editable` command-line argument. If set, uv
263 /// installs or exports any editable dependencies, including the project and any workspace
264 /// members, as non-editable.
265 #[attr_added_in("0.6.15")]
266 pub const UV_NO_EDITABLE: &'static str = "UV_NO_EDITABLE";
267
268 /// Equivalent to the `--dev` command-line argument. If set, uv will include
269 /// development dependencies.
270 #[attr_added_in("0.8.7")]
271 pub const UV_DEV: &'static str = "UV_DEV";
272
273 /// Equivalent to the `--no-dev` command-line argument. If set, uv will exclude
274 /// development dependencies.
275 #[attr_added_in("0.8.7")]
276 pub const UV_NO_DEV: &'static str = "UV_NO_DEV";
277
278 /// Equivalent to the `--no-group` command-line argument. If set, uv will disable
279 /// the specified dependency groups for the given space-delimited list of packages.
280 #[attr_added_in("0.9.8")]
281 pub const UV_NO_GROUP: &'static str = "UV_NO_GROUP";
282
283 /// Equivalent to the `--no-default-groups` command-line argument. If set, uv will
284 /// not select the default dependency groups defined in `tool.uv.default-groups`.
285 #[attr_added_in("0.9.9")]
286 pub const UV_NO_DEFAULT_GROUPS: &'static str = "UV_NO_DEFAULT_GROUPS";
287
288 /// Equivalent to the `--no-install-project` command-line argument. If set, uv will
289 /// install the project's dependencies but not the project itself.
290 #[attr_added_in("0.11.20")]
291 pub const UV_NO_INSTALL_PROJECT: &'static str = "UV_NO_INSTALL_PROJECT";
292
293 /// Equivalent to the `--no-install-workspace` command-line argument. If set, uv will
294 /// install workspace dependencies but not workspace members (including the current
295 /// project).
296 #[attr_added_in("0.11.20")]
297 pub const UV_NO_INSTALL_WORKSPACE: &'static str = "UV_NO_INSTALL_WORKSPACE";
298
299 /// Equivalent to the `--no-install-local` command-line argument. If set, uv will skip
300 /// the current project, workspace members, and any other local (path or editable)
301 /// packages, installing only remote dependencies.
302 #[attr_added_in("0.11.20")]
303 pub const UV_NO_INSTALL_LOCAL: &'static str = "UV_NO_INSTALL_LOCAL";
304
305 /// Equivalent to the hidden `--only-install-project` command-line argument.
306 #[attr_hidden]
307 #[attr_added_in("0.11.20")]
308 pub const UV_ONLY_INSTALL_PROJECT: &'static str = "UV_ONLY_INSTALL_PROJECT";
309
310 /// Equivalent to the hidden `--only-install-workspace` command-line argument.
311 #[attr_hidden]
312 #[attr_added_in("0.11.20")]
313 pub const UV_ONLY_INSTALL_WORKSPACE: &'static str = "UV_ONLY_INSTALL_WORKSPACE";
314
315 /// Equivalent to the hidden `--only-install-local` command-line argument.
316 #[attr_hidden]
317 #[attr_added_in("0.11.20")]
318 pub const UV_ONLY_INSTALL_LOCAL: &'static str = "UV_ONLY_INSTALL_LOCAL";
319
320 /// Equivalent to the `--no-binary` command-line argument. If set, uv will install
321 /// all packages from source. The resolver will still use pre-built wheels to
322 /// extract package metadata, if available.
323 #[attr_added_in("0.5.30")]
324 pub const UV_NO_BINARY: &'static str = "UV_NO_BINARY";
325
326 /// Equivalent to the `--no-binary-package` command line argument. If set, uv will
327 /// not use pre-built wheels for the given space-delimited list of packages.
328 #[attr_added_in("0.5.30")]
329 pub const UV_NO_BINARY_PACKAGE: &'static str = "UV_NO_BINARY_PACKAGE";
330
331 /// Equivalent to the `--no-build` command-line argument. If set, uv will not build source
332 /// distributions. First-party packages, such as projects in the workspace, will still be
333 /// built.
334 #[attr_added_in("0.1.40")]
335 pub const UV_NO_BUILD: &'static str = "UV_NO_BUILD";
336
337 /// Equivalent to the `--no-build-package` command line argument. If set, uv will not build
338 /// source distributions for the given space-delimited list of packages. First-party packages,
339 /// such as projects in the workspace, will still be built.
340 #[attr_added_in("0.6.5")]
341 pub const UV_NO_BUILD_PACKAGE: &'static str = "UV_NO_BUILD_PACKAGE";
342
343 /// Equivalent to the `--no-sources-package` command line argument. If set, uv will
344 /// ignore the `tool.uv.sources` table for the given space-delimited list of packages.
345 #[attr_added_in("0.9.26")]
346 pub const UV_NO_SOURCES_PACKAGE: &'static str = "UV_NO_SOURCES_PACKAGE";
347
348 /// Equivalent to the `--publish-url` command-line argument. The URL of the upload
349 /// endpoint of the index to use with `uv publish`.
350 #[attr_added_in("0.4.16")]
351 pub const UV_PUBLISH_URL: &'static str = "UV_PUBLISH_URL";
352
353 /// Equivalent to the `--token` command-line argument in `uv publish`. If set, uv
354 /// will use this token (with the username `__token__`) for publishing.
355 #[attr_added_in("0.4.16")]
356 pub const UV_PUBLISH_TOKEN: &'static str = "UV_PUBLISH_TOKEN";
357
358 /// Equivalent to the `--index` command-line argument in `uv publish`. If
359 /// set, uv will use the index with this name in the configuration for publishing.
360 #[attr_added_in("0.5.8")]
361 pub const UV_PUBLISH_INDEX: &'static str = "UV_PUBLISH_INDEX";
362
363 /// Equivalent to the `--username` command-line argument in `uv publish`. If
364 /// set, uv will use this username for publishing.
365 #[attr_added_in("0.4.16")]
366 pub const UV_PUBLISH_USERNAME: &'static str = "UV_PUBLISH_USERNAME";
367
368 /// Equivalent to the `--password` command-line argument in `uv publish`. If
369 /// set, uv will use this password for publishing.
370 #[attr_added_in("0.4.16")]
371 pub const UV_PUBLISH_PASSWORD: &'static str = "UV_PUBLISH_PASSWORD";
372
373 /// Equivalent to the `--check-url` command-line argument in `uv publish`.
374 /// Don't upload a file if it already exists on the index. The value is the URL of the index.
375 #[attr_added_in("0.4.30")]
376 pub const UV_PUBLISH_CHECK_URL: &'static str = "UV_PUBLISH_CHECK_URL";
377
378 /// Equivalent to the `--no-attestations` command-line argument in `uv publish`. If set,
379 /// uv will skip uploading any collected attestations for the published distributions.
380 #[attr_added_in("0.9.12")]
381 pub const UV_PUBLISH_NO_ATTESTATIONS: &'static str = "UV_PUBLISH_NO_ATTESTATIONS";
382
383 /// Equivalent to the `--no-sync` command-line argument. If set, uv will skip updating
384 /// the environment.
385 #[attr_added_in("0.4.18")]
386 pub const UV_NO_SYNC: &'static str = "UV_NO_SYNC";
387
388 /// Equivalent to the `--locked` command-line argument. If set, uv will assert that the
389 /// `uv.lock` remains unchanged.
390 #[attr_added_in("0.4.25")]
391 pub const UV_LOCKED: &'static str = "UV_LOCKED";
392
393 /// Equivalent to the `--frozen` command-line argument. If set, uv will run without
394 /// updating the `uv.lock` file.
395 #[attr_added_in("0.4.25")]
396 pub const UV_FROZEN: &'static str = "UV_FROZEN";
397
398 /// Equivalent to the `--preview` argument. Enables preview mode.
399 #[attr_added_in("0.1.37")]
400 pub const UV_PREVIEW: &'static str = "UV_PREVIEW";
401
402 /// Equivalent to the `--preview-features` argument. Enables specific preview features.
403 #[attr_added_in("0.8.4")]
404 pub const UV_PREVIEW_FEATURES: &'static str = "UV_PREVIEW_FEATURES";
405
406 /// Equivalent to the `--token` argument for self update. A GitHub token for authentication.
407 #[attr_added_in("0.4.10")]
408 pub const UV_GITHUB_TOKEN: &'static str = "UV_GITHUB_TOKEN";
409
410 /// Equivalent to the `--no-verify-hashes` argument. Disables hash verification for
411 /// `requirements.txt` files.
412 #[attr_added_in("0.5.3")]
413 pub const UV_NO_VERIFY_HASHES: &'static str = "UV_NO_VERIFY_HASHES";
414
415 /// Equivalent to the `--allow-insecure-host` argument.
416 #[attr_added_in("0.3.5")]
417 pub const UV_INSECURE_HOST: &'static str = "UV_INSECURE_HOST";
418
419 /// Disable ZIP validation for streamed wheels and ZIP-based source distributions.
420 ///
421 /// WARNING: Disabling ZIP validation can expose your system to security risks by bypassing
422 /// integrity checks and allowing uv to install potentially malicious ZIP files. If uv rejects
423 /// a ZIP file due to failing validation, it is likely that the file is malformed; consider
424 /// filing an issue with the package maintainer.
425 #[attr_added_in("0.8.6")]
426 pub const UV_INSECURE_NO_ZIP_VALIDATION: &'static str = "UV_INSECURE_NO_ZIP_VALIDATION";
427
428 /// Use the legacy backend to read and write tar archives.
429 /// Set to a true value (e.g., `1`) to enable this compatibility fallback.
430 #[attr_added_in("0.13.0")]
431 pub const UV_LEGACY_TAR_BACKEND: &'static str = "UV_LEGACY_TAR_BACKEND";
432
433 /// Sets the maximum number of in-flight concurrent downloads that uv will
434 /// perform at any given time.
435 #[attr_added_in("0.1.43")]
436 pub const UV_CONCURRENT_DOWNLOADS: &'static str = "UV_CONCURRENT_DOWNLOADS";
437
438 /// Sets the maximum number of source distributions that uv will build
439 /// concurrently at any given time.
440 #[attr_added_in("0.1.43")]
441 pub const UV_CONCURRENT_BUILDS: &'static str = "UV_CONCURRENT_BUILDS";
442
443 /// Controls the number of threads used when installing and unzipping
444 /// packages.
445 #[attr_added_in("0.1.45")]
446 pub const UV_CONCURRENT_INSTALLS: &'static str = "UV_CONCURRENT_INSTALLS";
447
448 /// Controls the number of threads used to read cached HTTP responses.
449 #[attr_added_in("0.11.29")]
450 pub const UV_CONCURRENT_CACHE_READS: &'static str = "UV_CONCURRENT_CACHE_READS";
451
452 /// Equivalent to the `--no-progress` command-line argument. Disables all progress output. For
453 /// example, spinners and progress bars.
454 #[attr_added_in("0.2.28")]
455 pub const UV_NO_PROGRESS: &'static str = "UV_NO_PROGRESS";
456
457 /// Specifies the directory where uv stores managed tools.
458 #[attr_added_in("0.2.16")]
459 pub const UV_TOOL_DIR: &'static str = "UV_TOOL_DIR";
460
461 /// Specifies the "bin" directory for installing tool executables.
462 #[attr_added_in("0.3.0")]
463 pub const UV_TOOL_BIN_DIR: &'static str = "UV_TOOL_BIN_DIR";
464
465 /// Equivalent to the `--bare` argument for `uv init`. If set, uv will only create a
466 /// `pyproject.toml`.
467 #[attr_added_in("0.10.7")]
468 pub const UV_INIT_BARE: &'static str = "UV_INIT_BARE";
469
470 /// Equivalent to the `--build-backend` argument for `uv init`. Determines the default backend
471 /// to use when creating a new project.
472 #[attr_added_in("0.8.2")]
473 pub const UV_INIT_BUILD_BACKEND: &'static str = "UV_INIT_BUILD_BACKEND";
474
475 /// Specifies the path to the directory to use for a project virtual environment.
476 ///
477 /// See the [project documentation](../concepts/projects/config.md#project-environment-path)
478 /// for more details.
479 #[attr_added_in("0.4.4")]
480 pub const UV_PROJECT_ENVIRONMENT: &'static str = "UV_PROJECT_ENVIRONMENT";
481
482 /// Specifies the directory to place links to installed, managed Python executables.
483 #[attr_added_in("0.4.29")]
484 pub const UV_PYTHON_BIN_DIR: &'static str = "UV_PYTHON_BIN_DIR";
485
486 /// Specifies the directory for storing managed Python installations.
487 #[attr_added_in("0.2.22")]
488 pub const UV_PYTHON_INSTALL_DIR: &'static str = "UV_PYTHON_INSTALL_DIR";
489
490 /// Whether to install the Python executable into the `UV_PYTHON_BIN_DIR` directory.
491 #[attr_added_in("0.8.0")]
492 pub const UV_PYTHON_INSTALL_BIN: &'static str = "UV_PYTHON_INSTALL_BIN";
493
494 /// Whether to install the Python executable into the Windows registry.
495 #[attr_added_in("0.8.0")]
496 pub const UV_PYTHON_INSTALL_REGISTRY: &'static str = "UV_PYTHON_INSTALL_REGISTRY";
497
498 /// Disable use of the Windows registry for Python discovery and registration.
499 ///
500 /// When set, uv will not discover Python interpreters from the Windows registry or Microsoft
501 /// Store locations, and managed Python installations will not be registered in the Windows
502 /// registry.
503 #[attr_added_in("0.11.8")]
504 pub const UV_PYTHON_NO_REGISTRY: &'static str = "UV_PYTHON_NO_REGISTRY";
505
506 /// Managed Python installations information is hardcoded in the `uv` binary.
507 ///
508 /// This variable can be set to a local path or URL pointing to
509 /// a JSON list of Python installations to override the hardcoded list.
510 ///
511 /// This allows customizing the URLs for downloads or using slightly older or newer versions
512 /// of Python than the ones hardcoded into this build of `uv`.
513 #[attr_added_in("0.6.13")]
514 pub const UV_PYTHON_DOWNLOADS_JSON_URL: &'static str = "UV_PYTHON_DOWNLOADS_JSON_URL";
515
516 /// Specifies the directory for caching the archives of managed Python installations before
517 /// installation.
518 #[attr_added_in("0.7.0")]
519 pub const UV_PYTHON_CACHE_DIR: &'static str = "UV_PYTHON_CACHE_DIR";
520
521 /// Managed Python installations are downloaded from the Astral
522 /// [`python-build-standalone`](https://github.com/astral-sh/python-build-standalone) project.
523 ///
524 /// This variable can be set to a mirror URL to use a different source for Python installations.
525 /// The provided URL will replace `https://github.com/astral-sh/python-build-standalone/releases/download` in, e.g.,
526 /// `https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz`.
527 /// Distributions can be read from a local directory by using the `file://` URL scheme.
528 ///
529 /// This more-specific mirror takes precedence over
530 /// [`UV_ASTRAL_MIRROR_URL`](Self::UV_ASTRAL_MIRROR_URL) for CPython downloads.
531 #[attr_added_in("0.2.35")]
532 pub const UV_PYTHON_INSTALL_MIRROR: &'static str = "UV_PYTHON_INSTALL_MIRROR";
533
534 /// Managed PyPy installations are downloaded from [python.org](https://downloads.python.org/).
535 ///
536 /// This variable can be set to a mirror URL to use a
537 /// different source for PyPy installations. The provided URL will replace
538 /// `https://downloads.python.org/pypy` in, e.g.,
539 /// `https://downloads.python.org/pypy/pypy3.8-v7.3.7-osx64.tar.bz2`.
540 /// Distributions can be read from a local directory by using the `file://` URL scheme.
541 #[attr_added_in("0.2.35")]
542 pub const UV_PYPY_INSTALL_MIRROR: &'static str = "UV_PYPY_INSTALL_MIRROR";
543
544 /// Managed GraalPy installations are downloaded from [GitHub](https://github.com/oracle/graalpython/releases).
545 ///
546 /// This variable can be set to a mirror URL to use a different source for GraalPy installations.
547 /// The provided URL will replace `https://github.com/oracle/graalpython/releases/download` in, e.g.,
548 /// `https://github.com/oracle/graalpython/releases/download/graal-24.2.2/graalpy-24.2.2-macos-aarch64.tar.gz`.
549 /// Distributions can be read from a local directory by using the `file://` URL scheme.
550 #[attr_added_in("0.12.24")]
551 pub const UV_GRAALPY_INSTALL_MIRROR: &'static str = "UV_GRAALPY_INSTALL_MIRROR";
552
553 /// Managed Pyodide installations are downloaded from [GitHub](https://github.com/pyodide/pyodide/releases).
554 ///
555 /// This variable can be set to a mirror URL to use a different source for Pyodide installations.
556 /// The provided URL will replace `https://github.com/pyodide/pyodide/releases/download` in, e.g.,
557 /// `https://github.com/pyodide/pyodide/releases/download/0.29.5/xbuildenv-0.29.5.tar.gz`.
558 /// Distributions can be read from a local directory by using the `file://` URL scheme.
559 #[attr_added_in("0.12.24")]
560 pub const UV_PYODIDE_INSTALL_MIRROR: &'static str = "UV_PYODIDE_INSTALL_MIRROR";
561
562 /// Replaces the `https://releases.astral.sh` base URL for all Astral-mirrored
563 /// metadata and artifact downloads.
564 ///
565 /// When set, uv uses only the configured mirror URL and does not fall back to
566 /// GitHub or raw GitHub. Path components in the URL are preserved: only
567 /// trailing slashes are trimmed before appending the normal path suffix
568 /// (e.g., `/github/versions/main/v1/uv.ndjson`).
569 ///
570 /// This is useful for proxy repositories (e.g., Artifactory, Nexus) that
571 /// mirror `releases.astral.sh`.
572 ///
573 /// More-specific sources take precedence:
574 /// [`UV_PYTHON_INSTALL_MIRROR`](Self::UV_PYTHON_INSTALL_MIRROR) and
575 /// `python-install-mirror` override this variable for CPython downloads, while
576 /// [`UV_INSTALLER_GITHUB_BASE_URL`](Self::UV_INSTALLER_GITHUB_BASE_URL) and
577 /// [`UV_INSTALLER_GHE_BASE_URL`](Self::UV_INSTALLER_GHE_BASE_URL) override this
578 /// variable for `uv self update`.
579 #[attr_added_in("0.11.14")]
580 pub(crate) const UV_ASTRAL_MIRROR_URL: &'static str = "UV_ASTRAL_MIRROR_URL";
581
582 /// Pin managed CPython versions to a specific build version.
583 ///
584 /// For CPython, this should be the build date (e.g., "20250814").
585 #[attr_added_in("0.8.14")]
586 pub const UV_PYTHON_CPYTHON_BUILD: &'static str = "UV_PYTHON_CPYTHON_BUILD";
587
588 /// Pin managed PyPy versions to a specific build version.
589 ///
590 /// For PyPy, this should be the PyPy version (e.g., "7.3.20").
591 #[attr_added_in("0.8.14")]
592 pub const UV_PYTHON_PYPY_BUILD: &'static str = "UV_PYTHON_PYPY_BUILD";
593
594 /// Pin managed GraalPy versions to a specific build version.
595 ///
596 /// For GraalPy, this should be the GraalPy version (e.g., "24.2.2").
597 #[attr_added_in("0.8.14")]
598 pub const UV_PYTHON_GRAALPY_BUILD: &'static str = "UV_PYTHON_GRAALPY_BUILD";
599
600 /// Pin managed Pyodide versions to a specific build version.
601 ///
602 /// For Pyodide, this should be the Pyodide version (e.g., "0.28.1").
603 #[attr_added_in("0.8.14")]
604 pub const UV_PYTHON_PYODIDE_BUILD: &'static str = "UV_PYTHON_PYODIDE_BUILD";
605
606 /// Equivalent to the `--clear` command-line argument. If set, uv will remove any
607 /// existing files or directories at the target path.
608 #[attr_added_in("0.8.0")]
609 pub const UV_VENV_CLEAR: &'static str = "UV_VENV_CLEAR";
610
611 /// Equivalent to the `--relocatable` command-line argument. If set, the virtual
612 /// environment will be relocatable.
613 #[attr_added_in("0.10.8")]
614 pub const UV_VENV_RELOCATABLE: &'static str = "UV_VENV_RELOCATABLE";
615
616 /// Install seed packages (one or more of: `pip`, `setuptools`, and `wheel`) into the virtual environment
617 /// created by `uv venv`.
618 ///
619 /// Note that `setuptools` and `wheel` are not included in Python 3.12+ environments.
620 #[attr_added_in("0.5.21")]
621 pub const UV_VENV_SEED: &'static str = "UV_VENV_SEED";
622
623 /// Used to override `PATH` for Python executable discovery.
624 ///
625 /// When set, uv will search for Python interpreters in the directories specified by this
626 /// variable instead of `PATH`.
627 #[attr_added_in("0.11.8")]
628 pub const UV_PYTHON_SEARCH_PATH: &'static str = "UV_PYTHON_SEARCH_PATH";
629
630 /// Include resolver and installer output related to environment modifications.
631 #[attr_hidden]
632 #[attr_added_in("0.2.32")]
633 pub const UV_SHOW_RESOLUTION: &'static str = "UV_SHOW_RESOLUTION";
634
635 /// Use to update the json schema files.
636 #[attr_hidden]
637 #[attr_added_in("0.1.34")]
638 pub const UV_UPDATE_SCHEMA: &'static str = "UV_UPDATE_SCHEMA";
639
640 /// Use to disable line wrapping for diagnostics.
641 #[attr_added_in("0.0.5")]
642 pub const UV_NO_WRAP: &'static str = "UV_NO_WRAP";
643
644 /// Set to `1` to enable the automatic malware check that runs after `uv sync`.
645 ///
646 /// When enabled, uv performs a lightweight check against the OSV database for known
647 /// malware advisories after every lockfile sync. Set this variable to `0` to opt out.
648 #[attr_added_in("0.11.16")]
649 pub const UV_MALWARE_CHECK: &'static str = "UV_MALWARE_CHECK";
650
651 /// Override the vulnerability service URL for the automatic malware check.
652 ///
653 /// Defaults to the OSV API endpoint (`https://api.osv.dev/`).
654 #[attr_added_in("0.11.16")]
655 pub const UV_MALWARE_CHECK_URL: &'static str = "UV_MALWARE_CHECK_URL";
656
657 /// Provides the HTTP Basic authentication username for a named index.
658 ///
659 /// The `name` parameter is the name of the index. For example, given an index named `foo`,
660 /// the environment variable key would be `UV_INDEX_FOO_USERNAME`.
661 #[attr_added_in("0.4.23")]
662 #[attr_env_var_pattern("UV_INDEX_{name}_USERNAME")]
663 pub fn index_username(name: &str) -> String {
664 format!("UV_INDEX_{name}_USERNAME")
665 }
666
667 /// Provides the HTTP Basic authentication password for a named index.
668 ///
669 /// The `name` parameter is the name of the index. For example, given an index named `foo`,
670 /// the environment variable key would be `UV_INDEX_FOO_PASSWORD`.
671 #[attr_added_in("0.4.23")]
672 #[attr_env_var_pattern("UV_INDEX_{name}_PASSWORD")]
673 pub fn index_password(name: &str) -> String {
674 format!("UV_INDEX_{name}_PASSWORD")
675 }
676
677 /// Used to set the uv commit hash at build time via `build.rs`.
678 #[attr_hidden]
679 #[attr_added_in("0.1.11")]
680 pub const UV_COMMIT_HASH: &'static str = "UV_COMMIT_HASH";
681
682 /// Used to set the uv commit short hash at build time via `build.rs`.
683 #[attr_hidden]
684 #[attr_added_in("0.1.11")]
685 pub const UV_COMMIT_SHORT_HASH: &'static str = "UV_COMMIT_SHORT_HASH";
686
687 /// Used to set the uv commit date at build time via `build.rs`.
688 #[attr_hidden]
689 #[attr_added_in("0.1.11")]
690 pub const UV_COMMIT_DATE: &'static str = "UV_COMMIT_DATE";
691
692 /// Used to set the uv tag at build time via `build.rs`.
693 #[attr_hidden]
694 #[attr_added_in("0.1.11")]
695 pub const UV_LAST_TAG: &'static str = "UV_LAST_TAG";
696
697 /// Used to set the uv tag distance from head at build time via `build.rs`.
698 #[attr_hidden]
699 #[attr_added_in("0.1.11")]
700 pub const UV_LAST_TAG_DISTANCE: &'static str = "UV_LAST_TAG_DISTANCE";
701
702 /// Used to set the spawning/parent interpreter when using --system in the test suite.
703 #[attr_hidden]
704 #[attr_added_in("0.2.0")]
705 pub const UV_INTERNAL__PARENT_INTERPRETER: &'static str = "UV_INTERNAL__PARENT_INTERPRETER";
706
707 /// Used to identify the source tree when invoking PEP 517 build hooks.
708 #[attr_hidden]
709 #[attr_added_in("0.11.22")]
710 pub const UV_INTERNAL__BUILD_DIR: &'static str = "UV_INTERNAL__BUILD_DIR";
711
712 /// Set to `1` to include Git metadata in development builds.
713 /// Release builds include Git metadata by default.
714 #[attr_hidden]
715 #[attr_added_in("0.12.16")]
716 pub const UV_INTERNAL__BUILD_GIT_INFO: &'static str = "UV_INTERNAL__BUILD_GIT_INFO";
717
718 /// Used to force showing the derivation tree during resolver error reporting.
719 #[attr_hidden]
720 #[attr_added_in("0.3.0")]
721 pub const UV_INTERNAL__SHOW_DERIVATION_TREE: &'static str = "UV_INTERNAL__SHOW_DERIVATION_TREE";
722
723 /// Used to set a temporary directory for some tests.
724 #[attr_hidden]
725 #[attr_added_in("0.3.4")]
726 pub const UV_INTERNAL__TEST_DIR: &'static str = "UV_INTERNAL__TEST_DIR";
727
728 /// Configure `RUST_LOG` for commands spawned by the test suite.
729 #[attr_hidden]
730 #[attr_added_in("0.12.18")]
731 pub const UV_INTERNAL__TEST_RUST_LOG: &'static str = "UV_INTERNAL__TEST_RUST_LOG";
732
733 /// Path to a directory on a filesystem that supports copy-on-write, e.g., btrfs or APFS.
734 ///
735 /// When populated, uv will run additional tests that require this functionality.
736 #[attr_hidden]
737 #[attr_added_in("0.10.5")]
738 pub const UV_INTERNAL__TEST_COW_FS: &'static str = "UV_INTERNAL__TEST_COW_FS";
739
740 /// Path to a directory on a filesystem that does **not** support copy-on-write.
741 ///
742 /// When populated, uv will run additional tests that verify fallback behavior
743 /// when copy-on-write is unavailable.
744 #[attr_hidden]
745 #[attr_added_in("0.10.5")]
746 pub const UV_INTERNAL__TEST_NOCOW_FS: &'static str = "UV_INTERNAL__TEST_NOCOW_FS";
747
748 /// Path to a directory on an alternative filesystem for testing.
749 ///
750 /// This filesystem must be a different device than the default for the test suite.
751 ///
752 /// When populated, uv will run additional tests that cover cross-filesystem linking.
753 #[attr_hidden]
754 #[attr_added_in("0.10.5")]
755 pub const UV_INTERNAL__TEST_ALT_FS: &'static str = "UV_INTERNAL__TEST_ALT_FS";
756
757 /// Network path to a directory on an SMB filesystem for testing.
758 ///
759 /// When populated, uv will run additional tests that cover SMB-specific filesystem behavior.
760 #[attr_hidden]
761 #[attr_added_in("0.11.16")]
762 pub const UV_INTERNAL__TEST_SMB_FS: &'static str = "UV_INTERNAL__TEST_SMB_FS";
763
764 /// Path to a directory on a filesystem with a low hardlink limit (e.g., minix with ~250).
765 ///
766 /// When populated, uv will run additional tests that exercise EMLINK recovery.
767 #[attr_hidden]
768 #[attr_added_in("0.10.9")]
769 pub const UV_INTERNAL__TEST_LOWLINKS_FS: &'static str = "UV_INTERNAL__TEST_LOWLINKS_FS";
770
771 /// Used to force treating an interpreter as "managed" during tests.
772 #[attr_hidden]
773 #[attr_added_in("0.8.0")]
774 pub const UV_INTERNAL__TEST_PYTHON_MANAGED: &'static str = "UV_INTERNAL__TEST_PYTHON_MANAGED";
775
776 /// Used to force ignoring Git LFS commands as `git-lfs` detection cannot be overridden via PATH.
777 #[attr_hidden]
778 #[attr_added_in("0.9.15")]
779 pub const UV_INTERNAL__TEST_LFS_DISABLED: &'static str = "UV_INTERNAL__TEST_LFS_DISABLED";
780
781 /// Used to disable delay for HTTP retries in tests.
782 #[attr_hidden]
783 #[attr_added_in("0.12.18")]
784 pub const UV_INTERNAL__TEST_NO_HTTP_RETRY_DELAY: &'static str =
785 "UV_INTERNAL__TEST_NO_HTTP_RETRY_DELAY";
786
787 /// Hide progress messages with non-deterministic order in tests.
788 #[attr_hidden]
789 #[attr_added_in("0.12.18")]
790 pub const UV_INTERNAL__TEST_NO_CLI_PROGRESS: &'static str = "UV_INTERNAL__TEST_NO_CLI_PROGRESS";
791
792 /// Used to mock the current timestamp for relative `--exclude-newer` times in tests.
793 /// Should be set to an RFC 3339 timestamp (e.g., `2025-11-21T12:00:00Z`).
794 #[attr_hidden]
795 #[attr_added_in("0.12.18")]
796 pub const UV_INTERNAL__TEST_CURRENT_TIMESTAMP: &'static str =
797 "UV_INTERNAL__TEST_CURRENT_TIMESTAMP";
798
799 /// When set to a timestamp, applies an `exclude-newer` filter to the versions
800 /// considered available from indexes.
801 ///
802 /// This is used for reproducible resolver error messages. When `exclude-newer`
803 /// is used, we retain information about the available versions to improve error
804 /// messages. In contrast, versions published after this cutoff are considered
805 /// non-existent.
806 ///
807 /// Should be set to an RFC 3339 timestamp (e.g., `2024-03-25T00:00:00Z`).
808 #[attr_hidden]
809 #[attr_added_in("0.12.18")]
810 pub const UV_INTERNAL__TEST_AVAILABLE_VERSION_CUTOFF: &'static str =
811 "UV_INTERNAL__TEST_AVAILABLE_VERSION_CUTOFF";
812
813 /// Path to system-level configuration directory on Unix systems.
814 #[attr_added_in("0.4.26")]
815 pub const XDG_CONFIG_DIRS: &'static str = "XDG_CONFIG_DIRS";
816
817 /// Path to system-level configuration directory on Windows systems.
818 #[attr_added_in("0.4.26")]
819 pub const SYSTEMDRIVE: &'static str = "SYSTEMDRIVE";
820
821 /// Path to user-level configuration directory on Windows systems.
822 #[attr_added_in("0.1.42")]
823 pub const APPDATA: &'static str = "APPDATA";
824
825 /// Path to root directory of user's profile on Windows systems.
826 #[attr_added_in("0.0.5")]
827 pub const USERPROFILE: &'static str = "USERPROFILE";
828
829 /// Path to user-level configuration directory on Unix systems.
830 #[attr_added_in("0.1.34")]
831 pub const XDG_CONFIG_HOME: &'static str = "XDG_CONFIG_HOME";
832
833 /// Path to cache directory on Unix systems.
834 #[attr_added_in("0.1.17")]
835 pub const XDG_CACHE_HOME: &'static str = "XDG_CACHE_HOME";
836
837 /// Path to directory for storing managed Python installations and tools.
838 #[attr_added_in("0.2.16")]
839 pub const XDG_DATA_HOME: &'static str = "XDG_DATA_HOME";
840
841 /// Path to directory where executables are installed.
842 #[attr_added_in("0.2.16")]
843 pub const XDG_BIN_HOME: &'static str = "XDG_BIN_HOME";
844
845 /// Path to a CA certificate bundle file for TLS connections.
846 ///
847 /// Requires a PEM-encoded certificate file (e.g., `certs.pem`, `ca-bundle.crt`). DER-encoded
848 /// files are not supported.
849 ///
850 /// When set, this overrides the default certificate source (bundled Mozilla roots or system
851 /// certificates). Only the certificates in this file will be trusted.
852 #[attr_added_in("0.1.14")]
853 pub const SSL_CERT_FILE: &'static str = "SSL_CERT_FILE";
854
855 /// Path to a directory containing PEM-encoded CA certificate files for TLS connections.
856 ///
857 /// Multiple entries are supported, separated using a platform-specific delimiter (`:` on Unix,
858 /// `;` on Windows).
859 ///
860 /// Certificates are usually stored with `.pem`, `.crt`, or `.cer` extensions, but uv will
861 /// attempt to read a certificate from any regular file in the provided `SSL_CERT_DIR`.
862 ///
863 /// Files that cannot be parsed as PEM certificates are ignored. uv resolves symlinks and
864 /// ignores dangling symlinks.
865 ///
866 /// Only PEM-encoded files are supported, i.e., DER-encoded files are not supported.
867 ///
868 /// When set, this overrides the default certificate source (bundled Mozilla roots or system
869 /// certificates). Only the certificates in this directory will be trusted.
870 #[attr_added_in("0.9.10")]
871 pub const SSL_CERT_DIR: &'static str = "SSL_CERT_DIR";
872
873 /// If set, uv will use this file for mTLS authentication.
874 /// This should be a single file containing both the certificate and the private key in PEM format.
875 #[attr_added_in("0.2.11")]
876 pub const SSL_CLIENT_CERT: &'static str = "SSL_CLIENT_CERT";
877
878 /// Proxy for HTTP requests.
879 #[attr_added_in("0.1.38")]
880 pub const HTTP_PROXY: &'static str = "HTTP_PROXY";
881
882 /// Proxy for HTTPS requests.
883 #[attr_added_in("0.1.38")]
884 pub const HTTPS_PROXY: &'static str = "HTTPS_PROXY";
885
886 /// General proxy for all network requests.
887 #[attr_added_in("0.1.38")]
888 pub const ALL_PROXY: &'static str = "ALL_PROXY";
889
890 /// Comma-separated list of hostnames (e.g., `example.com`) and/or patterns (e.g., `192.168.1.0/24`) that should bypass the proxy.
891 #[attr_added_in("0.1.38")]
892 pub const NO_PROXY: &'static str = "NO_PROXY";
893
894 /// Timeout (in seconds) for only upload HTTP requests. (default: 900 s)
895 #[attr_added_in("0.9.1")]
896 pub const UV_UPLOAD_HTTP_TIMEOUT: &'static str = "UV_UPLOAD_HTTP_TIMEOUT";
897
898 /// Timeout (in seconds) for HTTP reads. (default: 30 s)
899 #[attr_added_in("0.1.7")]
900 pub const UV_HTTP_TIMEOUT: &'static str = "UV_HTTP_TIMEOUT";
901
902 /// Timeout (in seconds) to connect to a server. (default: 10 s)
903 ///
904 /// If `UV_HTTP_TIMEOUT` is lower than this value, `UV_HTTP_TIMEOUT` will be used instead.
905 #[attr_added_in("0.10.0")]
906 pub const UV_HTTP_CONNECT_TIMEOUT: &'static str = "UV_HTTP_CONNECT_TIMEOUT";
907
908 /// The number of retries for HTTP requests. (default: 3)
909 #[attr_added_in("0.7.21")]
910 pub const UV_HTTP_RETRIES: &'static str = "UV_HTTP_RETRIES";
911
912 /// Timeout (in seconds) for HTTP requests. Equivalent to `UV_HTTP_TIMEOUT`.
913 #[attr_added_in("0.1.6")]
914 pub const UV_REQUEST_TIMEOUT: &'static str = "UV_REQUEST_TIMEOUT";
915
916 /// Timeout (in seconds) for HTTP requests. Equivalent to `UV_HTTP_TIMEOUT`.
917 #[attr_added_in("0.1.7")]
918 pub const HTTP_TIMEOUT: &'static str = "HTTP_TIMEOUT";
919
920 /// The validation modes to use when run with `--compile`.
921 ///
922 /// See [`PycInvalidationMode`](https://docs.python.org/3/library/py_compile.html#py_compile.PycInvalidationMode).
923 #[attr_added_in("0.1.7")]
924 pub const PYC_INVALIDATION_MODE: &'static str = "PYC_INVALIDATION_MODE";
925
926 /// Used to detect an activated virtual environment.
927 #[attr_added_in("0.0.5")]
928 pub const VIRTUAL_ENV: &'static str = "VIRTUAL_ENV";
929
930 /// Used to detect the path of an active Conda environment.
931 #[attr_added_in("0.0.5")]
932 pub const CONDA_PREFIX: &'static str = "CONDA_PREFIX";
933
934 /// Used to determine the name of the active Conda environment.
935 #[attr_added_in("0.5.0")]
936 pub const CONDA_DEFAULT_ENV: &'static str = "CONDA_DEFAULT_ENV";
937
938 /// Used to determine the root install path of Conda.
939 #[attr_added_in("0.8.18")]
940 pub const CONDA_ROOT: &'static str = "_CONDA_ROOT";
941
942 /// Used to determine if we're running in Dependabot.
943 #[attr_added_in("0.9.11")]
944 pub const DEPENDABOT: &'static str = "DEPENDABOT";
945
946 /// If set to `1` before a virtual environment is activated, then the
947 /// virtual environment name will not be prepended to the terminal prompt.
948 #[attr_added_in("0.0.5")]
949 pub const VIRTUAL_ENV_DISABLE_PROMPT: &'static str = "VIRTUAL_ENV_DISABLE_PROMPT";
950
951 /// Used to detect the use of the Windows Command Prompt (as opposed to PowerShell).
952 #[attr_added_in("0.1.16")]
953 pub const PROMPT: &'static str = "PROMPT";
954
955 /// Used to detect `NuShell` usage.
956 #[attr_added_in("0.1.16")]
957 pub const NU_VERSION: &'static str = "NU_VERSION";
958
959 /// Used to detect Fish shell usage.
960 #[attr_added_in("0.1.28")]
961 pub const FISH_VERSION: &'static str = "FISH_VERSION";
962
963 /// Used to detect Bash shell usage.
964 #[attr_added_in("0.1.28")]
965 pub const BASH_VERSION: &'static str = "BASH_VERSION";
966
967 /// Used to detect Zsh shell usage.
968 #[attr_added_in("0.1.28")]
969 pub const ZSH_VERSION: &'static str = "ZSH_VERSION";
970
971 /// Used to determine which `.zshenv` to use when Zsh is being used.
972 #[attr_added_in("0.2.25")]
973 pub const ZDOTDIR: &'static str = "ZDOTDIR";
974
975 /// Used to detect Ksh shell usage.
976 #[attr_added_in("0.2.33")]
977 pub const KSH_VERSION: &'static str = "KSH_VERSION";
978
979 /// Used to detect PowerShell usage (set by PowerShell on all platforms).
980 #[attr_added_in("0.10.0")]
981 pub const PS_MODULE_PATH: &'static str = "PSModulePath";
982
983 /// Used with `--python-platform macos` and related variants to set the
984 /// deployment target (i.e., the minimum supported macOS version).
985 ///
986 /// Defaults to `13.0`, the least-recent non-EOL macOS version at time of writing.
987 #[attr_added_in("0.1.42")]
988 pub const MACOSX_DEPLOYMENT_TARGET: &'static str = "MACOSX_DEPLOYMENT_TARGET";
989
990 /// Used with `--python-platform arm64-apple-ios` and related variants to set the
991 /// deployment target (i.e., the minimum supported iOS version).
992 ///
993 /// Defaults to `13.0`.
994 #[attr_added_in("0.8.16")]
995 pub const IPHONEOS_DEPLOYMENT_TARGET: &'static str = "IPHONEOS_DEPLOYMENT_TARGET";
996
997 /// Used with `--python-platform aarch64-linux-android` and related variants to set the
998 /// Android API level. (i.e., the minimum supported Android API level).
999 ///
1000 /// Defaults to `24`.
1001 #[attr_added_in("0.8.16")]
1002 pub const ANDROID_API_LEVEL: &'static str = "ANDROID_API_LEVEL";
1003
1004 /// Disables colored output (takes precedence over `FORCE_COLOR`).
1005 ///
1006 /// See [no-color.org](https://no-color.org).
1007 #[attr_added_in("0.2.7")]
1008 pub const NO_COLOR: &'static str = "NO_COLOR";
1009
1010 /// Forces colored output regardless of terminal support.
1011 ///
1012 /// See [force-color.org](https://force-color.org).
1013 #[attr_added_in("0.2.7")]
1014 pub const FORCE_COLOR: &'static str = "FORCE_COLOR";
1015
1016 /// Use to control color via `anstyle`.
1017 #[attr_added_in("0.1.32")]
1018 pub const CLICOLOR_FORCE: &'static str = "CLICOLOR_FORCE";
1019
1020 /// The standard `PATH` env var.
1021 #[attr_added_in("0.0.5")]
1022 pub const PATH: &'static str = "PATH";
1023
1024 /// The standard `HOME` env var.
1025 #[attr_added_in("0.0.5")]
1026 pub const HOME: &'static str = "HOME";
1027
1028 /// The standard `SHELL` posix env var.
1029 #[attr_added_in("0.1.16")]
1030 pub const SHELL: &'static str = "SHELL";
1031
1032 /// The standard `PWD` posix env var.
1033 #[attr_added_in("0.0.5")]
1034 pub const PWD: &'static str = "PWD";
1035
1036 /// Used to look for Microsoft Store Pythons installations.
1037 #[attr_added_in("0.3.3")]
1038 pub const LOCALAPPDATA: &'static str = "LOCALAPPDATA";
1039
1040 /// Path to the `.git` directory. Ignored by `uv` when performing fetch.
1041 #[attr_hidden]
1042 #[attr_added_in("0.0.5")]
1043 pub const GIT_DIR: &'static str = "GIT_DIR";
1044
1045 /// Path to the git working tree. Ignored by `uv` when performing fetch.
1046 #[attr_hidden]
1047 #[attr_added_in("0.0.5")]
1048 pub const GIT_WORK_TREE: &'static str = "GIT_WORK_TREE";
1049
1050 /// Path to the index file for staged changes. Ignored by `uv` when performing fetch.
1051 #[attr_hidden]
1052 #[attr_added_in("0.0.5")]
1053 pub const GIT_INDEX_FILE: &'static str = "GIT_INDEX_FILE";
1054
1055 /// Path to where git object files are located. Ignored by `uv` when performing fetch.
1056 #[attr_hidden]
1057 #[attr_added_in("0.0.5")]
1058 pub const GIT_OBJECT_DIRECTORY: &'static str = "GIT_OBJECT_DIRECTORY";
1059
1060 /// Alternate locations for git objects. Ignored by `uv` when performing fetch.
1061 #[attr_hidden]
1062 #[attr_added_in("0.0.5")]
1063 pub const GIT_ALTERNATE_OBJECT_DIRECTORIES: &'static str = "GIT_ALTERNATE_OBJECT_DIRECTORIES";
1064
1065 /// Disables SSL verification for git operations.
1066 #[attr_hidden]
1067 #[attr_added_in("0.5.28")]
1068 pub const GIT_SSL_NO_VERIFY: &'static str = "GIT_SSL_NO_VERIFY";
1069
1070 /// Sets allowed protocols for git operations.
1071 ///
1072 /// When uv is in "offline" mode, only the "file" protocol is allowed.
1073 #[attr_hidden]
1074 #[attr_added_in("0.6.13")]
1075 pub const GIT_ALLOW_PROTOCOL: &'static str = "GIT_ALLOW_PROTOCOL";
1076
1077 /// Sets the SSH command used when Git tries to establish a connection using SSH.
1078 #[attr_hidden]
1079 #[attr_added_in("0.7.11")]
1080 pub const GIT_SSH_COMMAND: &'static str = "GIT_SSH_COMMAND";
1081
1082 /// Disable interactive git prompts in terminals, e.g., for credentials. Does not disable
1083 /// GUI prompts.
1084 #[attr_hidden]
1085 #[attr_added_in("0.6.4")]
1086 pub const GIT_TERMINAL_PROMPT: &'static str = "GIT_TERMINAL_PROMPT";
1087
1088 /// Skip Smudge LFS Filter.
1089 #[attr_hidden]
1090 #[attr_added_in("0.9.15")]
1091 pub const GIT_LFS_SKIP_SMUDGE: &'static str = "GIT_LFS_SKIP_SMUDGE";
1092
1093 /// Used in tests to set the user global git config location.
1094 #[attr_hidden]
1095 #[attr_added_in("0.9.15")]
1096 pub const GIT_CONFIG_GLOBAL: &'static str = "GIT_CONFIG_GLOBAL";
1097
1098 /// Used in tests for better git isolation.
1099 ///
1100 /// For example, we run some tests in ~/.local/share/uv/tests.
1101 /// And if the user's `$HOME` directory is a git repository,
1102 /// this will change the behavior of some tests. Setting
1103 /// `GIT_CEILING_DIRECTORIES=/home/andrew/.local/share/uv/tests` will
1104 /// prevent git from crawling up the directory tree past that point to find
1105 /// parent git repositories.
1106 #[attr_hidden]
1107 #[attr_added_in("0.4.29")]
1108 pub const GIT_CEILING_DIRECTORIES: &'static str = "GIT_CEILING_DIRECTORIES";
1109
1110 /// Cleared for uv's git invocations to ensure git behaves correctly in
1111 /// spite of an odd environment.
1112 #[attr_hidden]
1113 #[attr_added_in("0.11.8")]
1114 pub const GIT_COMMON_DIR: &'static str = "GIT_COMMON_DIR";
1115
1116 /// Indicates that the current process is running in GitHub Actions.
1117 ///
1118 /// `uv publish` may attempt trusted publishing flows when set
1119 /// to `true`.
1120 #[attr_added_in("0.4.16")]
1121 pub const GITHUB_ACTIONS: &'static str = "GITHUB_ACTIONS";
1122
1123 /// Indicates that the current process is running in GitLab CI.
1124 ///
1125 /// `uv publish` may attempt trusted publishing flows when set
1126 /// to `true`.
1127 #[attr_added_in("0.8.18")]
1128 pub const GITLAB_CI: &'static str = "GITLAB_CI";
1129
1130 /// Used for testing GitLab CI trusted publishing.
1131 #[attr_hidden]
1132 #[attr_added_in("0.8.18")]
1133 pub const PYPI_ID_TOKEN: &'static str = "PYPI_ID_TOKEN";
1134
1135 /// Used for testing GitLab CI trusted publishing.
1136 #[attr_hidden]
1137 #[attr_added_in("0.8.18")]
1138 pub const TESTPYPI_ID_TOKEN: &'static str = "TESTPYPI_ID_TOKEN";
1139
1140 /// Sets the encoding for standard I/O streams (e.g., PYTHONIOENCODING=utf-8).
1141 #[attr_hidden]
1142 #[attr_added_in("0.4.18")]
1143 pub const PYTHONIOENCODING: &'static str = "PYTHONIOENCODING";
1144
1145 /// Forces unbuffered I/O streams, equivalent to `-u` in Python.
1146 #[attr_hidden]
1147 #[attr_added_in("0.1.15")]
1148 pub const PYTHONUNBUFFERED: &'static str = "PYTHONUNBUFFERED";
1149
1150 /// Enables UTF-8 mode for Python, equivalent to `-X utf8`.
1151 #[attr_hidden]
1152 #[attr_added_in("0.4.19")]
1153 pub const PYTHONUTF8: &'static str = "PYTHONUTF8";
1154
1155 /// Adds directories to Python module search path (e.g., `PYTHONPATH=/path/to/modules`).
1156 #[attr_added_in("0.1.22")]
1157 pub const PYTHONPATH: &'static str = "PYTHONPATH";
1158
1159 /// Used to set the location of Python stdlib when using trampolines.
1160 #[attr_hidden]
1161 #[attr_added_in("0.7.13")]
1162 pub const PYTHONHOME: &'static str = "PYTHONHOME";
1163
1164 /// Overrides the executable Python uses to determine its environment.
1165 #[attr_hidden]
1166 #[attr_added_in("0.12.4")]
1167 pub const PYTHONEXECUTABLE: &'static str = "PYTHONEXECUTABLE";
1168
1169 /// Used to correctly detect virtual environments when using trampolines.
1170 #[attr_hidden]
1171 #[attr_added_in("0.7.13")]
1172 pub const PYVENV_LAUNCHER: &'static str = "__PYVENV_LAUNCHER__";
1173
1174 /// Used in tests to enforce a consistent locale setting.
1175 #[attr_hidden]
1176 #[attr_added_in("0.4.28")]
1177 pub const LC_ALL: &'static str = "LC_ALL";
1178
1179 /// Typically set by CI runners, used to detect a CI runner.
1180 #[attr_hidden]
1181 #[attr_added_in("0.0.5")]
1182 pub const CI: &'static str = "CI";
1183
1184 /// Azure DevOps build identifier, used to detect CI environments.
1185 #[attr_hidden]
1186 #[attr_added_in("0.1.22")]
1187 pub const BUILD_BUILDID: &'static str = "BUILD_BUILDID";
1188
1189 /// Generic build identifier, used to detect CI environments.
1190 #[attr_hidden]
1191 #[attr_added_in("0.1.22")]
1192 pub const BUILD_ID: &'static str = "BUILD_ID";
1193
1194 /// Pip environment variable to indicate CI environment.
1195 #[attr_hidden]
1196 #[attr_added_in("0.1.22")]
1197 pub const PIP_IS_CI: &'static str = "PIP_IS_CI";
1198
1199 /// Use to set the .netrc file location.
1200 #[attr_added_in("0.1.16")]
1201 pub const NETRC: &'static str = "NETRC";
1202
1203 /// The standard `PAGER` posix env var. Used by `uv` to configure the appropriate pager.
1204 #[attr_added_in("0.4.18")]
1205 pub const PAGER: &'static str = "PAGER";
1206
1207 /// Used to detect when running inside a Jupyter notebook.
1208 #[attr_added_in("0.2.6")]
1209 pub const JPY_SESSION_NAME: &'static str = "JPY_SESSION_NAME";
1210
1211 /// Use to create the tracing root directory via the `tracing-durations-export` feature.
1212 #[attr_hidden]
1213 #[attr_added_in("0.1.32")]
1214 pub const TRACING_DURATIONS_TEST_ROOT: &'static str = "TRACING_DURATIONS_TEST_ROOT";
1215
1216 /// Use to create the tracing durations file via the `tracing-durations-export` feature.
1217 #[attr_added_in("0.0.5")]
1218 pub const TRACING_DURATIONS_FILE: &'static str = "TRACING_DURATIONS_FILE";
1219
1220 /// Used to set `RUST_HOST_TARGET` at build time via `build.rs`.
1221 #[attr_hidden]
1222 #[attr_added_in("0.1.11")]
1223 pub const TARGET: &'static str = "TARGET";
1224
1225 /// If set, uv will use this value as the log level for its `--verbose` output. Accepts
1226 /// any filter compatible with the `tracing_subscriber` crate.
1227 ///
1228 /// For example:
1229 ///
1230 /// * `RUST_LOG=uv=debug` is the equivalent of adding `--verbose` to the command line
1231 /// * `RUST_LOG=trace` will enable trace-level logging.
1232 ///
1233 /// See the [tracing documentation](https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax)
1234 /// for more.
1235 #[attr_added_in("0.0.5")]
1236 pub const RUST_LOG: &'static str = "RUST_LOG";
1237
1238 /// If set, it can be used to display more stack trace details when a panic occurs.
1239 /// This is used by uv particularly on windows to show more details during a platform exception.
1240 ///
1241 /// For example:
1242 ///
1243 /// * `RUST_BACKTRACE=1` will print a short backtrace.
1244 /// * `RUST_BACKTRACE=full` will print a full backtrace.
1245 ///
1246 /// See the [Rust backtrace documentation](https://doc.rust-lang.org/std/backtrace/index.html)
1247 /// for more.
1248 #[attr_added_in("0.7.22")]
1249 pub const RUST_BACKTRACE: &'static str = "RUST_BACKTRACE";
1250
1251 /// Add additional context and structure to log messages.
1252 ///
1253 /// If logging is not enabled, e.g., with `RUST_LOG` or `-v`, this has no effect.
1254 #[attr_added_in("0.6.4")]
1255 pub const UV_LOG_CONTEXT: &'static str = "UV_LOG_CONTEXT";
1256
1257 /// Use to set the stack size used by uv.
1258 ///
1259 /// The value is in bytes, and if both `UV_STACK_SIZE` are `RUST_MIN_STACK` unset, uv uses a 4MB
1260 /// (4194304) stack. `UV_STACK_SIZE` takes precedence over `RUST_MIN_STACK`.
1261 ///
1262 /// Unlike the normal `RUST_MIN_STACK` semantics, this can affect main thread
1263 /// stack size, because we actually spawn our own main2 thread to work around
1264 /// the fact that Windows' real main thread is only 1MB. That thread has size
1265 /// `max(UV_STACK_SIZE, 1MB)`.
1266 #[attr_added_in("0.0.5")]
1267 pub const UV_STACK_SIZE: &'static str = "UV_STACK_SIZE";
1268
1269 /// Use to set the stack size used by uv.
1270 ///
1271 /// The value is in bytes, and if both `UV_STACK_SIZE` are `RUST_MIN_STACK` unset, uv uses a 4MB
1272 /// (4194304) stack. `UV_STACK_SIZE` takes precedence over `RUST_MIN_STACK`.
1273 ///
1274 /// Prefer setting `UV_STACK_SIZE`, since `RUST_MIN_STACK` also affects subprocesses, such as
1275 /// build backends that use Rust code.
1276 ///
1277 /// Unlike the normal `RUST_MIN_STACK` semantics, this can affect main thread
1278 /// stack size, because we actually spawn our own main2 thread to work around
1279 /// the fact that Windows' real main thread is only 1MB. That thread has size
1280 /// `max(RUST_MIN_STACK, 1MB)`.
1281 #[attr_added_in("0.5.19")]
1282 pub const RUST_MIN_STACK: &'static str = "RUST_MIN_STACK";
1283
1284 /// The directory containing the `Cargo.toml` manifest for a package.
1285 #[attr_hidden]
1286 #[attr_added_in("0.1.11")]
1287 pub const CARGO_MANIFEST_DIR: &'static str = "CARGO_MANIFEST_DIR";
1288
1289 /// The Cargo profile family: `debug` for profiles derived from `dev`, or `release`.
1290 #[attr_hidden]
1291 #[attr_added_in("0.12.16")]
1292 pub const PROFILE: &'static str = "PROFILE";
1293
1294 /// Specifies the directory where Cargo stores build artifacts (target directory).
1295 #[attr_hidden]
1296 #[attr_added_in("0.0.5")]
1297 pub const CARGO_TARGET_DIR: &'static str = "CARGO_TARGET_DIR";
1298
1299 /// Set by cargo when compiling for Windows-like platforms.
1300 #[attr_hidden]
1301 #[attr_added_in("0.0.5")]
1302 pub const CARGO_CFG_WINDOWS: &'static str = "CARGO_CFG_WINDOWS";
1303
1304 /// Specifies the directory where Cargo stores intermediate build artifacts.
1305 #[attr_hidden]
1306 #[attr_added_in("0.8.25")]
1307 pub const OUT_DIR: &'static str = "OUT_DIR";
1308
1309 /// Used in tests for environment substitution testing in `requirements.in`.
1310 #[attr_hidden]
1311 #[attr_added_in("0.1.18")]
1312 pub const URL: &'static str = "URL";
1313
1314 /// Used in tests for environment substitution testing in `requirements.in`.
1315 #[attr_hidden]
1316 #[attr_added_in("0.1.18")]
1317 pub const FILE_PATH: &'static str = "FILE_PATH";
1318
1319 /// Used in tests for environment substitution testing in `requirements.in`.
1320 #[attr_hidden]
1321 #[attr_added_in("0.1.25")]
1322 pub const HATCH_PATH: &'static str = "HATCH_PATH";
1323
1324 /// Used in tests for environment substitution testing in `requirements.in`.
1325 #[attr_hidden]
1326 #[attr_added_in("0.1.25")]
1327 pub const BLACK_PATH: &'static str = "BLACK_PATH";
1328
1329 /// Used in testing Hatch's root.uri feature
1330 ///
1331 /// See: <https://hatch.pypa.io/dev/config/dependency/#local>.
1332 #[attr_hidden]
1333 #[attr_added_in("0.1.22")]
1334 pub const ROOT_PATH: &'static str = "ROOT_PATH";
1335
1336 /// Used in testing extra build dependencies.
1337 #[attr_hidden]
1338 #[attr_added_in("0.8.5")]
1339 pub const EXPECTED_ANYIO_VERSION: &'static str = "EXPECTED_ANYIO_VERSION";
1340
1341 /// Used to set test credentials for keyring tests.
1342 #[attr_hidden]
1343 #[attr_added_in("0.1.34")]
1344 pub const KEYRING_TEST_CREDENTIALS: &'static str = "KEYRING_TEST_CREDENTIALS";
1345
1346 /// Used for testing named indexes in tests.
1347 #[attr_hidden]
1348 #[attr_added_in("0.5.21")]
1349 pub const UV_INDEX_MY_INDEX_USERNAME: &'static str = "UV_INDEX_MY_INDEX_USERNAME";
1350
1351 /// Used for testing named indexes in tests.
1352 #[attr_hidden]
1353 #[attr_added_in("0.5.21")]
1354 pub const UV_INDEX_MY_INDEX_PASSWORD: &'static str = "UV_INDEX_MY_INDEX_PASSWORD";
1355
1356 /// Used to set the GitHub fast-path url for tests.
1357 #[attr_hidden]
1358 #[attr_added_in("0.7.15")]
1359 pub const UV_GITHUB_FAST_PATH_URL: &'static str = "UV_GITHUB_FAST_PATH_URL";
1360
1361 /// `.env` files from which to load environment variables when executing `uv run` commands.
1362 #[attr_added_in("0.4.30")]
1363 pub const UV_ENV_FILE: &'static str = "UV_ENV_FILE";
1364
1365 /// Ignore `.env` files when executing `uv run` commands.
1366 #[attr_added_in("0.4.30")]
1367 pub const UV_NO_ENV_FILE: &'static str = "UV_NO_ENV_FILE";
1368
1369 /// The URL from which to download uv using the standalone installer and `self update` feature,
1370 /// in lieu of the default GitHub URL.
1371 ///
1372 /// This more-specific installer source takes precedence over
1373 /// [`UV_ASTRAL_MIRROR_URL`](Self::UV_ASTRAL_MIRROR_URL) for `uv self update`.
1374 #[attr_added_in("0.5.0")]
1375 pub const UV_INSTALLER_GITHUB_BASE_URL: &'static str = "UV_INSTALLER_GITHUB_BASE_URL";
1376
1377 /// The URL from which to download uv using the standalone installer and `self update` feature,
1378 /// in lieu of the default GitHub Enterprise URL.
1379 ///
1380 /// This more-specific installer source takes precedence over
1381 /// [`UV_ASTRAL_MIRROR_URL`](Self::UV_ASTRAL_MIRROR_URL) for `uv self update`.
1382 #[attr_added_in("0.5.0")]
1383 pub const UV_INSTALLER_GHE_BASE_URL: &'static str = "UV_INSTALLER_GHE_BASE_URL";
1384
1385 /// The directory in which to install uv using the standalone installer and `self update` feature.
1386 /// Defaults to `~/.local/bin`.
1387 #[attr_added_in("0.5.0")]
1388 pub const UV_INSTALL_DIR: &'static str = "UV_INSTALL_DIR";
1389
1390 /// Used ephemeral environments like CI to install uv to a specific path while preventing
1391 /// the installer from modifying shell profiles or environment variables.
1392 #[attr_added_in("0.5.0")]
1393 pub const UV_UNMANAGED_INSTALL: &'static str = "UV_UNMANAGED_INSTALL";
1394
1395 /// The URL from which to download uv using the standalone installer. By default, installs from
1396 /// uv's GitHub Releases. `INSTALLER_DOWNLOAD_URL` is also supported as an alias, for backwards
1397 /// compatibility.
1398 #[attr_added_in("0.8.4")]
1399 pub const UV_DOWNLOAD_URL: &'static str = "UV_DOWNLOAD_URL";
1400
1401 /// Avoid modifying the `PATH` environment variable when installing uv using the standalone
1402 /// installer and `self update` feature. `INSTALLER_NO_MODIFY_PATH` is also supported as an
1403 /// alias, for backwards compatibility.
1404 #[attr_added_in("0.8.4")]
1405 pub const UV_NO_MODIFY_PATH: &'static str = "UV_NO_MODIFY_PATH";
1406
1407 /// Skip writing `uv` installer metadata files (e.g., `INSTALLER`, `REQUESTED`, and `direct_url.json`) to site-packages `.dist-info` directories.
1408 #[attr_added_in("0.5.7")]
1409 pub const UV_NO_INSTALLER_METADATA: &'static str = "UV_NO_INSTALLER_METADATA";
1410
1411 /// Enables fetching files stored in Git LFS when installing a package from a Git repository.
1412 #[attr_added_in("0.5.19")]
1413 pub const UV_GIT_LFS: &'static str = "UV_GIT_LFS";
1414
1415 /// Sets the soft open-file descriptor limit for commands executed by `uv run`.
1416 ///
1417 /// The limit is applied after uv prepares the environment and immediately before the command
1418 /// is spawned. The hard open-file descriptor limit remains unchanged. If the limit cannot be
1419 /// applied, uv exits with an error without running the command. Only supported on Unix.
1420 #[attr_added_in("0.12.3")]
1421 pub const UV_RUN_RLIMIT_NOFILE: &'static str = "UV_RUN_RLIMIT_NOFILE";
1422
1423 /// Number of times that `uv run` has been recursively invoked. Used to guard against infinite
1424 /// recursion, e.g., when `uv run` is used in a script shebang.
1425 #[attr_hidden]
1426 #[attr_added_in("0.5.31")]
1427 pub const UV_RUN_RECURSION_DEPTH: &'static str = "UV_RUN_RECURSION_DEPTH";
1428
1429 /// Number of times that `uv run` will allow recursive invocations, before exiting with an
1430 /// error.
1431 #[attr_hidden]
1432 #[attr_added_in("0.5.31")]
1433 pub const UV_RUN_MAX_RECURSION_DEPTH: &'static str = "UV_RUN_MAX_RECURSION_DEPTH";
1434
1435 /// Overrides terminal width used for wrapping. This variable is not read by uv directly.
1436 ///
1437 /// This is a quasi-standard variable, described, e.g., in `ncurses(3x)`.
1438 #[attr_added_in("0.6.2")]
1439 pub const COLUMNS: &'static str = "COLUMNS";
1440
1441 /// The CUDA driver version to assume when inferring the PyTorch backend (e.g., `550.144.03`).
1442 #[attr_hidden]
1443 #[attr_added_in("0.6.9")]
1444 pub const UV_CUDA_DRIVER_VERSION: &'static str = "UV_CUDA_DRIVER_VERSION";
1445
1446 // TODO(konsti): Unhide these NVIDIA provider overrides when wheel variants leave preview.
1447 // TODO(konsti): Adopt clearer override names if the NVIDIA provider defines them upstream.
1448 /// Override the CUDA user-mode driver version for the NVIDIA wheel variant provider
1449 /// (e.g., `12.7`).
1450 #[attr_hidden]
1451 #[attr_added_in("0.13.6")]
1452 pub const NV_VARIANT_PROVIDER_FORCE_CUDA_DRIVER_VERSION: &'static str =
1453 "NV_VARIANT_PROVIDER_FORCE_CUDA_DRIVER_VERSION";
1454
1455 /// Override the GPU compute capability for the NVIDIA wheel variant provider (e.g., `8.9`).
1456 #[attr_hidden]
1457 #[attr_added_in("0.13.6")]
1458 pub const NV_VARIANT_PROVIDER_FORCE_SM_ARCH: &'static str = "NV_VARIANT_PROVIDER_FORCE_SM_ARCH";
1459
1460 /// The AMD GPU architecture to assume when inferring the PyTorch backend (e.g., `gfx1100`).
1461 #[attr_hidden]
1462 #[attr_added_in("0.7.14")]
1463 pub const UV_AMD_GPU_ARCHITECTURE: &'static str = "UV_AMD_GPU_ARCHITECTURE";
1464
1465 /// Equivalent to the `--torch-backend` command-line argument (e.g., `cpu`, `cu126`, or `auto`).
1466 #[attr_added_in("0.6.9")]
1467 pub const UV_TORCH_BACKEND: &'static str = "UV_TORCH_BACKEND";
1468
1469 /// Equivalent to the `--project` command-line argument.
1470 #[attr_added_in("0.4.4")]
1471 pub const UV_PROJECT: &'static str = "UV_PROJECT";
1472
1473 /// Equivalent to the `--no-project` command-line argument.
1474 #[attr_added_in("0.11.8")]
1475 pub const UV_NO_PROJECT: &'static str = "UV_NO_PROJECT";
1476
1477 /// Equivalent to the `--directory` command-line argument. `UV_WORKING_DIRECTORY` (added in
1478 /// v0.9.1) is also supported for backwards compatibility.
1479 #[attr_added_in("0.9.14")]
1480 pub const UV_WORKING_DIR: &'static str = "UV_WORKING_DIR";
1481
1482 /// Equivalent to the `--directory` command-line argument.
1483 #[attr_hidden]
1484 #[attr_added_in("0.9.1")]
1485 pub const UV_WORKING_DIRECTORY: &'static str = "UV_WORKING_DIRECTORY";
1486
1487 /// Disable GitHub-specific requests that allow uv to skip `git fetch` in some circumstances.
1488 #[attr_added_in("0.7.13")]
1489 pub const UV_NO_GITHUB_FAST_PATH: &'static str = "UV_NO_GITHUB_FAST_PATH";
1490
1491 /// Authentication token for Hugging Face requests. When set, uv will use this token
1492 /// when making requests to `https://huggingface.co/` and any subdomains.
1493 #[attr_added_in("0.8.1")]
1494 pub const HF_TOKEN: &'static str = "HF_TOKEN";
1495
1496 /// Disable Hugging Face authentication, even if `HF_TOKEN` is set.
1497 #[attr_added_in("0.8.1")]
1498 pub const UV_NO_HF_TOKEN: &'static str = "UV_NO_HF_TOKEN";
1499
1500 /// The URL to treat as an S3-compatible storage endpoint. Requests to this endpoint
1501 /// will be signed using AWS Signature Version 4 based on the `AWS_ACCESS_KEY_ID`,
1502 /// `AWS_SECRET_ACCESS_KEY`, `AWS_PROFILE`, and `AWS_CONFIG_FILE` environment variables.
1503 #[attr_added_in("0.8.21")]
1504 pub const UV_S3_ENDPOINT_URL: &'static str = "UV_S3_ENDPOINT_URL";
1505
1506 /// The URL to treat as a GCS-compatible storage endpoint. Requests to this endpoint
1507 /// will be signed using Google Cloud authentication based on the `GOOGLE_APPLICATION_CREDENTIALS`
1508 /// environment variable or Application Default Credentials.
1509 #[attr_added_in("0.9.26")]
1510 pub const UV_GCS_ENDPOINT_URL: &'static str = "UV_GCS_ENDPOINT_URL";
1511
1512 /// The URL to treat as an Azure Blob Storage endpoint. Requests to this endpoint will be signed
1513 /// using Azure credentials from the default credential chain, including Azure CLI credentials
1514 /// and workload identity.
1515 #[attr_added_in("0.11.14")]
1516 pub const UV_AZURE_ENDPOINT_URL: &'static str = "UV_AZURE_ENDPOINT_URL";
1517
1518 /// The pyx API key (e.g., `sk-pyx-...`).
1519 #[attr_added_in("0.8.15")]
1520 pub const PYX_API_KEY: &'static str = "PYX_API_KEY";
1521
1522 /// The pyx API key, for backwards compatibility.
1523 #[attr_hidden]
1524 #[attr_added_in("0.8.15")]
1525 pub const UV_API_KEY: &'static str = "UV_API_KEY";
1526
1527 /// The pyx authentication token (e.g., `eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...`), as output by `uv auth token`.
1528 #[attr_added_in("0.8.15")]
1529 pub const PYX_AUTH_TOKEN: &'static str = "PYX_AUTH_TOKEN";
1530
1531 /// The pyx authentication token, for backwards compatibility.
1532 #[attr_hidden]
1533 #[attr_added_in("0.8.15")]
1534 pub const UV_AUTH_TOKEN: &'static str = "UV_AUTH_TOKEN";
1535
1536 /// The AWS region to use when signing S3 requests.
1537 #[attr_added_in("0.8.21")]
1538 pub const AWS_REGION: &'static str = "AWS_REGION";
1539
1540 /// The default AWS region to use when signing S3 requests, if `AWS_REGION` is not set.
1541 #[attr_added_in("0.8.21")]
1542 pub const AWS_DEFAULT_REGION: &'static str = "AWS_DEFAULT_REGION";
1543
1544 /// The AWS access key ID to use when signing S3 requests.
1545 #[attr_added_in("0.8.21")]
1546 pub const AWS_ACCESS_KEY_ID: &'static str = "AWS_ACCESS_KEY_ID";
1547
1548 /// The AWS secret access key to use when signing S3 requests.
1549 #[attr_added_in("0.8.21")]
1550 pub const AWS_SECRET_ACCESS_KEY: &'static str = "AWS_SECRET_ACCESS_KEY";
1551
1552 /// The AWS session token to use when signing S3 requests.
1553 #[attr_added_in("0.8.21")]
1554 pub const AWS_SESSION_TOKEN: &'static str = "AWS_SESSION_TOKEN";
1555
1556 /// The AWS profile to use when signing S3 requests.
1557 #[attr_added_in("0.8.21")]
1558 pub const AWS_PROFILE: &'static str = "AWS_PROFILE";
1559
1560 /// The AWS config file to use when signing S3 requests.
1561 #[attr_added_in("0.8.21")]
1562 pub const AWS_CONFIG_FILE: &'static str = "AWS_CONFIG_FILE";
1563
1564 /// The AWS shared credentials file to use when signing S3 requests.
1565 #[attr_added_in("0.8.21")]
1566 pub const AWS_SHARED_CREDENTIALS_FILE: &'static str = "AWS_SHARED_CREDENTIALS_FILE";
1567
1568 /// Avoid verifying that wheel filenames match their contents when installing wheels. This
1569 /// is not recommended, as wheels with inconsistent filenames should be considered invalid and
1570 /// corrected by the relevant package maintainers; however, this option can be used to work
1571 /// around invalid artifacts in rare cases.
1572 #[attr_added_in("0.8.23")]
1573 pub const UV_SKIP_WHEEL_FILENAME_CHECK: &'static str = "UV_SKIP_WHEEL_FILENAME_CHECK";
1574
1575 /// Suppress output from the build backend when building source distributions, even in the event
1576 /// of build failures.
1577 #[attr_added_in("0.9.15")]
1578 pub const UV_HIDE_BUILD_OUTPUT: &'static str = "UV_HIDE_BUILD_OUTPUT";
1579
1580 /// The time in seconds uv waits for a file lock to become available.
1581 ///
1582 /// Defaults to 300s (5 min).
1583 #[attr_added_in("0.9.4")]
1584 pub const UV_LOCK_TIMEOUT: &'static str = "UV_LOCK_TIMEOUT";
1585}