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