# CLI Reference ## uv An extremely fast Python package manager.
uv runRun a command or script
uv initCreate a new project
uv addAdd dependencies to the project
uv removeRemove dependencies from the project
uv syncUpdate the project’s environment
uv lockUpdate the project’s lockfile
uv exportExport the project’s lockfile to an alternate format
uv treeDisplay the project’s dependency tree
uv toolRun and install commands provided by Python packages
uv pythonManage Python versions and installations
uv pipManage Python packages with a pip-compatible interface
uv venvCreate a virtual environment
uv buildBuild Python packages into source distributions and wheels
uv cacheManage uv’s cache
uv versionDisplay uv’s version
uv helpDisplay documentation for a command
--all-extrasInclude all optional dependencies.
Optional dependencies are defined via project.optional-dependencies in a pyproject.toml.
This option is only available when running in a project.
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra extraInclude optional dependencies from the extra group name.
May be provided more than once.
Optional dependencies are defined via project.optional-dependencies in a pyproject.toml.
This option is only available when running in a project.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--frozenRun without updating the uv.lock file.
Instead of checking if the lockfile is up-to-date, uses the versions in the lockfile as the source of truth. If the lockfile is missing, uv will exit with an error. If the pyproject.toml includes changes to dependencies that have not been included in the lockfile yet, they will not be present in the environment.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--isolatedRun the command in an isolated virtual environment.
Usually, the project environment is reused for performance. This option forces a fresh environment to be used for the project, enforcing strict isolation between dependencies and declaration of requirements.
An editable installation is still used for the project.
When used with --with or --with-requirements, the additional dependencies will still be layered in a second environment.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--lockedAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-devOmit development dependencies.
This option is only available when running in a project.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-projectAvoid discovering the project or workspace.
Instead of searching for projects in the current directory and parent directories, run in an isolated, ephemeral environment populated by the --with requirements.
If a virtual environment is active or found in a current or parent directory, it will be used as if there was no project or workspace.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--no-syncAvoid syncing the virtual environment.
Implies --frozen, as the project dependencies will be ignored (i.e., the lockfile will not be updated, since the environment will not be synced regardless).
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--package packageRun the command in a specific package in the workspace.
If the workspace member does not exist, uv will exit with an error.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use for the run environment.
If the interpreter request is satisfied by a discovered environment, the environment will be used.
See uv python to view supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--with withRun with the given packages installed.
When used in a project, these dependencies will be layered on top of the project environment in a separate, ephemeral environment. These dependencies are allowed to conflict with those specified by the project.
--with-editable with-editableRun with the given packages installed as editables
When used in a project, these dependencies will be layered on top of the project environment in a separate, ephemeral environment. These dependencies are allowed to conflict with those specified by the project.
--with-requirements with-requirementsRun with all packages listed in the given requirements.txt files.
The same environment semantics as --with apply.
Using pyproject.toml, setup.py, or setup.cfg files is not allowed.
PATHThe path to use for the project.
Defaults to the current working directory. Accepts relative and absolute paths.
If a pyproject.toml is found in any of the parent directories of the target path, the project will be added as a workspace member of the parent, unless --no-workspace is provided.
--appCreate a project for an application.
This is the default behavior if --lib is not requested.
This project kind is for web servers, scripts, and command-line interfaces.
By default, an application is not intended to be built and distributed as a Python package. The --package option can be used to create an application that is distributable, e.g., if you want to distribute a command-line interface via PyPI.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--libCreate a project for a library.
A library is a project that is intended to be built and distributed as a Python package.
--name nameThe name of the project.
Defaults to the name of the directory.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-packageDo not set up the project to be built as a Python package.
Does not include a [build-system] for the project.
This is the default behavior when using --app.
--no-pin-pythonDo not create a .python-version file for the project.
By default, uv will create a .python-version file containing the minor version of the discovered Python interpreter, which will cause subsequent uv commands to use that version.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-readmeDo not create a README.md file
--no-workspaceAvoid discovering a workspace and create a standalone project.
By default, uv searches for workspaces in the current directory or any parent directory.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--packageSet up the project to be built as a Python package.
Defines a [build-system] for the project.
This is the default behavior when using --lib.
When using --app, this will include a [project.scripts] entrypoint and use a src/ project structure.
--python, -p pythonThe Python interpreter to use to determine the minimum supported Python version.
See uv python to view supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
PACKAGESThe packages to add, as PEP 508 requirements (e.g., ruff==0.5.0)
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--branch branchBranch to use when adding a dependency from Git
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--devAdd the requirements as development dependencies
--editableAdd the requirements as editable
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra extraExtras to enable for the dependency.
May be provided more than once.
To add this dependency to an optional group in the current project instead, see --optional.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--frozenAdd dependencies without re-locking the project.
The project environment will not be synced.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--lockedAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--no-syncAvoid syncing the virtual environment
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--optional optionalAdd the requirements to the specified optional dependency group.
The group may then be activated when installing the project with the --extra flag.
To enable an optional dependency group for this requirement instead, see --extra.
--package packageAdd the dependency to a specific package in the workspace
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use for resolving and syncing.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--raw-sourcesAdd source requirements to project.dependencies, rather than tool.uv.sources.
By default, uv will use the tool.uv.sources section to record source information for Git, local, editable, and direct URL requirements.
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--requirements, -r requirementsAdd all packages listed in the given requirements.txt files
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--rev revCommit to use when adding a dependency from Git
--script scriptAdd the dependency to the specified Python script, rather than to a project.
If provided, uv will add the dependency to the script’s inline metadata table, in adhere with PEP 723. If no such inline metadata table is present, a new one will be created and added to the script. When executed via uv run, uv will create a temporary environment for the script with all inline dependencies installed.
--tag tagTag to use when adding a dependency from Git
--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
PACKAGESThe names of the dependencies to remove (e.g., ruff)
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--devRemove the packages from the development dependencies
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--frozenRemove dependencies without re-locking the project.
The project environment will not be synced.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--lockedAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--no-syncAvoid syncing the virtual environment after re-locking the project
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--optional optionalRemove the packages from the specified optional dependency group
--package packageRemove the dependencies from a specific package in the workspace
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use for resolving and syncing.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--script scriptRemove the dependency from the specified Python script, rather than from a project.
If provided, uv will remove the dependency from the script’s inline metadata table, in adhere with PEP 723.
--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--all-extrasInclude all optional dependencies.
Note that all optional dependencies are always included in the resolution; this option only affects the selection of packages to install.
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra extraInclude optional dependencies from the extra group name.
May be provided more than once.
Note that all optional dependencies are always included in the resolution; this option only affects the selection of packages to install.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--frozenSync without updating the uv.lock file.
Instead of checking if the lockfile is up-to-date, uses the versions in the lockfile as the source of truth. If the lockfile is missing, uv will exit with an error. If the pyproject.toml includes changes to dependencies that have not been included in the lockfile yet, they will not be present in the environment.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--inexactDo not remove extraneous packages present in the environment.
When enabled, uv will make the minimum necessary changes to satisfy the requirements. By default, syncing will remove any extraneous packages from the environment
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--lockedAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-devOmit development dependencies
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-install-package no-install-packageDo not install the given package(s).
By default, all of the project’s dependencies are installed into the environment. The --no-install-package option allows exclusion of specific packages. Note this can result in a broken environment, and should be used with caution.
--no-install-projectDo not install the current project.
By default, the current project is installed into the environment with all of its dependencies. The --no-install-project option allows the project to be excluded, but all of its dependencies are still installed. This is particularly useful in situations like building Docker images where installing the project separately from its dependencies allows optimal layer caching.
--no-install-workspaceDo not install any workspace members, including the root project.
By default, all of the workspace members and their dependencies are installed into the environment. The --no-install-workspace option allows exclusion of all the workspace members while retaining their dependencies. This is particularly useful in situations like building Docker images where installing the workspace separately from its dependencies allows optimal layer caching.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--package packageSync for a specific package in the workspace.
The workspace’s environment (.venv) is updated to reflect the subset of dependencies declared by the specified workspace member package.
If the workspace member does not exist, uv will exit with an error.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use for the project environment.
By default, the first interpreter that meets the project’s requires-python constraint is used.
If a Python interpreter in a virtual environment is provided, the packages will not be synced to the given environment. The interpreter will be used to create a virtual environment in the project.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--frozenAssert that a uv.lock exists, without updating it
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
This option is only used when building source distributions.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--lockedAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use during resolution.
A Python interpreter is required for building source distributions to determine package metadata when there are not wheels.
The interpreter is also used as the fallback value for the minimum Python version if requires-python is not set.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--all-extrasInclude all optional dependencies
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra extraInclude optional dependencies from the extra group name.
May be provided more than once.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--format formatThe format to which uv.lock should be exported.
At present, only requirements-txt is supported.
[default: requirements-txt]
Possible values:
requirements-txt: Export in requirements.txt format--frozenDo not update the uv.lock before exporting.
If a uv.lock does not exist, uv will exit with an error.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
This option is only used when building source distributions.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--lockedAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-devOmit development dependencies
--no-emit-package no-emit-packageDo not emit the given package(s).
By default, all of the project’s dependencies are included in the exported requirements file. The --no-install-package option allows exclusion of specific packages.
--no-emit-projectDo not emit the current project.
By default, the current project is included in the exported requirements file with all of its dependencies. The --no-emit-project option allows the project to be excluded, but all of its dependencies to remain included.
--no-emit-workspaceDo not emit any workspace members, including the root project.
By default, all workspace members and their dependencies are included in the exported requirements file, with all of their dependencies. The --no-emit-workspace option allows exclusion of all the workspace members while retaining their dependencies.
--no-hashesOmit hashes in the generated output
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--output-file, -o output-fileWrite the exported requirements to the given file
--package packageExport the dependencies for a specific package in the workspace.
If the workspace member does not exist, uv will exit with an error.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use during resolution.
A Python interpreter is required for building source distributions to determine package metadata when there are not wheels.
The interpreter is also used as the fallback value for the minimum Python version if requires-python is not set.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--depth, -d depthMaximum display depth of the dependency tree
[default: 255]
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--frozenDisplay the requirements without locking the project.
If the lockfile is missing, uv will exit with an error.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--invertShow the reverse dependencies for the given package. This flag will invert the tree and display the packages that depend on the given package
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
This option is only used when building source distributions.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--lockedAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-dedupeDo not de-duplicate repeated dependencies. Usually, when a package has already displayed its dependencies, further occurrences will not re-display its dependencies, and will include a (*) to indicate it has already been shown. This flag will cause those duplicates to be repeated
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--package packageDisplay only the specified packages
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--prune prunePrune the given package from the display of the dependency tree
--python, -p pythonThe Python interpreter to use for locking and filtering.
By default, the tree is filtered to match the platform as reported by the Python interpreter. Use --universal to display the tree for all platforms, or use --python-version or --python-platform to override a subset of markers.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform to use when filtering the tree.
For example, pass --platform windows to display the dependencies that would be included when installing on Windows.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for Windowslinux: An alias for x86_64-unknown-linux-gnu, the default target for Linuxmacos: An alias for aarch64-apple-darwin, the default target for macOSx86_64-pc-windows-msvc: A 64-bit x86 Windows targeti686-pc-windows-msvc: A 32-bit x86 Windows targetx86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_17aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devicesx86_64-apple-darwin: An x86 macOS targetaarch64-unknown-linux-gnu: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17aarch64-unknown-linux-musl: An ARM64 Linux targetx86_64-unknown-linux-musl: An x86_64 Linux targetx86_64-manylinux_2_17: An x86_64 target for the manylinux_2_17 platformx86_64-manylinux_2_28: An x86_64 target for the manylinux_2_28 platformx86_64-manylinux_2_31: An x86_64 target for the manylinux_2_31 platformaarch64-manylinux_2_17: An ARM64 target for the manylinux_2_17 platformaarch64-manylinux_2_28: An ARM64 target for the manylinux_2_28 platformaarch64-manylinux_2_31: An ARM64 target for the manylinux_2_31 platform--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--python-version python-versionThe Python version to use when filtering the tree.
For example, pass --python-version 3.10 to display the dependencies that would be included when installing on Python 3.10.
Defaults to the version of the discovered Python interpreter.
--quiet, -qDo not print any output
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--universalShow a platform-independent dependency tree.
Shows resolved package versions for all Python versions and platforms, rather than filtering to those that are relevant for the current environment.
Multiple versions may be shown for a each package.
--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
uv tool runRun a command provided by a Python package
uv tool installInstall commands provided by a Python package
uv tool upgradeUpgrade installed tools
uv tool listList installed tools
uv tool uninstallUninstall a tool
uv tool update-shellEnsure that the tool executable directory is on the PATH
uv tool dirShow the path to the uv tools directory
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--from fromUse the given package to provide the command.
By default, the package name is assumed to match the command name.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--isolatedRun the tool in an isolated virtual environment, ignoring any already-installed tools
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use to build the run environment.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--with withRun with the given packages installed
--with-requirements with-requirementsRun with all packages listed in the given requirements.txt files
PACKAGEThe package to install commands from
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--editable, -e--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--forceForce installation of the tool.
Will replace any existing entry points with the same name in the executable directory.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use to build the tool environment.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--with withInclude the following extra requirements
--with-requirements with-requirementsRun all requirements listed in the given requirements.txt files
NAMEThe name of the tool to upgrade
--allUpgrade all tools
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--quiet, -qDo not print any output
--show-pathsWhether to display the path to each tool environment and installed executable
--show-version-specifiersWhether to display the version specifier(s) used to install each tool
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
NAMEThe name of the tool to uninstall
--allUninstall all tools
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--binShow the directory into which uv tool will install executables.
By default, uv tool dir shows the directory into which the tool Python environments themselves are installed, rather than the directory containing the linked executables.
The tool executable directory is determined according to the XDG standard and is derived from the following environment variables, in order of preference:
$UV_TOOL_BIN_DIR$XDG_BIN_HOME$XDG_DATA_HOME/../bin$HOME/.local/bin--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
uv python listList the available Python installations
uv python installDownload and install Python versions
uv python findSearch for a Python installation
uv python pinPin to a specific Python version
uv python dirShow the uv Python installation directory
uv python uninstallUninstall Python versions
--all-platformsList Python downloads for all platforms.
By default, only downloads for the current platform are shown.
--all-versionsList all Python versions, including old patch versions.
By default, only the latest patch version is shown for each minor version.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--only-installedOnly show installed Python versions, exclude available downloads.
By default, available downloads for the current platform are shown.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
TARGETSThe Python version(s) to install.
If not provided, the requested Python version(s) will be read from the .python-versions or .python-version files. If neither file is present, uv will check if it has installed any Python versions. If not, it will install the latest stable version of Python.
See uv python to view supported request formats.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--reinstall, -rReinstall the requested Python version, if it’s already installed.
By default, uv will exit successfully if the version is already installed.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
REQUESTThe Python request.
See uv python to view supported request formats.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-projectAvoid discovering a project or workspace.
Otherwise, when no request is provided, the Python requirement of a project in the current directory or parent directories will be used.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--systemOnly find system Python interpreters.
By default, uv will report the first Python interpreter it would use, including those in an active virtual environment or a virtual environment in the current working directory or any parent directory.
The --system option instructs uv to skip virtual environment Python interpreters and restrict its search to the system path.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
REQUESTThe Python version request.
uv supports more formats than other tools that read .python-version files, i.e., pyenv. If compatibility with those tools is needed, only use version numbers instead of complex requests such as cpython@3.10.
See uv python to view supported request formats.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-projectAvoid validating the Python pin is compatible with the project or workspace.
By default, a project or workspace is discovered in the current directory or any parent directory. If a workspace is found, the Python pin is validated against the workspace’s requires-python constraint.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--resolvedWrite the resolved Python interpreter path instead of the request.
Ensures that the exact same interpreter is used.
This option is usually not safe to use when committing the .python-version file to version control.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
TARGETSThe Python version(s) to uninstall.
See uv python to view supported request formats.
--allUninstall all managed Python versions
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
uv pip compileCompile a requirements.in file to a requirements.txt file
uv pip syncSync an environment with a requirements.txt file
uv pip installInstall packages into an environment
uv pip uninstallUninstall packages from an environment
uv pip freezeList, in requirements format, packages installed in an environment
uv pip listList, in tabular format, packages installed in an environment
uv pip showShow information about one or more installed packages
uv pip treeDisplay the dependency tree for an environment
uv pip checkVerify installed packages have compatible dependencies
SRC_FILEInclude all packages listed in the given requirements.in files.
If a pyproject.toml, setup.py, or setup.cfg file is provided, uv will extract the requirements for the relevant project.
If - is provided, then requirements will be read from stdin.
The order of the requirements files and the requirements in them is used to determine priority during resolution.
--all-extrasInclude all optional dependencies.
Only applies to pyproject.toml, setup.py, and setup.cfg sources.
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--annotation-style annotation-styleThe style of the annotation comments included in the output file, used to indicate the source of each package.
Defaults to split.
Possible values:
line: Render the annotations on a single, comma-separated linesplit: Render each annotation on its own line--build-constraint, -b build-constraintConstrain build dependencies using the given requirements files when building source distributions.
Constraints files are requirements.txt-like files that only control the version of a requirement that’s installed. However, including a package in a constraints file will not trigger the installation of that package.
May also be set with the UV_BUILD_CONSTRAINT environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--constraint, -c constraintConstrain versions using the given requirements files.
Constraints files are requirements.txt-like files that only control the version of a requirement that’s installed. However, including a package in a constraints file will not trigger the installation of that package.
This is equivalent to pip’s --constraint option.
May also be set with the UV_CONSTRAINT environment variable.
--custom-compile-command custom-compile-commandThe header comment to include at the top of the output file generated by uv pip compile.
Used to reflect custom build scripts and commands that wrap uv pip compile.
May also be set with the UV_CUSTOM_COMPILE_COMMAND environment variable.
--emit-build-optionsInclude --no-binary and --only-binary entries in the generated output file
--emit-find-linksInclude --find-links entries in the generated output file
--emit-index-annotationInclude comment annotations indicating the index used to resolve each package (e.g., # from https://pypi.org/simple)
--emit-index-urlInclude --index-url and --extra-index-url entries in the generated output file
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra extraInclude optional dependencies from the extra group name; may be provided more than once.
Only applies to pyproject.toml, setup.py, and setup.cfg sources.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--generate-hashesInclude distribution hashes in the output file
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
This option is only used when building source distributions.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-annotateExclude comment annotations indicating the source of each package
--no-binary no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear previously specified packages with :none:.
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Alias for --only-binary :all:.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-depsIgnore package dependencies, instead only add those packages explicitly listed on the command line to the resulting the requirements file
--no-emit-package no-emit-packageSpecify a package to omit from the output resolution. Its dependencies will still be included in the resolution. Equivalent to pip-compile’s --unsafe-package option
--no-headerExclude the comment header at the top of the generated output file
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--no-strip-extrasInclude extras in the output file.
By default, uv strips extras, as any packages pulled in by the extras are already included as dependencies in the output file directly. Further, output files generated with --no-strip-extras cannot be used as constraints files in install and sync invocations.
--no-strip-markersInclude environment markers in the output file.
By default, uv strips environment markers, as the resolution generated by compile is only guaranteed to be correct for the target environment.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--only-binary only-binaryOnly use pre-built wheels; don’t build source distributions.
When enabled, resolving will not run code from the given packages. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear previously specified packages with :none:.
--output-file, -o output-fileWrite the compiled requirements to the given requirements.txt file.
If the file already exists, the existing versions will be preferred when resolving dependencies, unless --upgrade is also specified.
--override overrideOverride versions using the given requirements files.
Overrides files are requirements.txt-like files that force a specific version of a requirement to be installed, regardless of the requirements declared by any constituent package, and regardless of whether this would be considered an invalid resolution.
While constraints are additive, in that they’re combined with the requirements of the constituent packages, overrides are absolute, in that they completely replace the requirements of the constituent packages.
May also be set with the UV_OVERRIDE environment variable.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python pythonThe Python interpreter to use during resolution.
A Python interpreter is required for building source distributions to determine package metadata when there are not wheels.
The interpreter is also used to determine the default minimum Python version, unless --python-version is provided.
See uv python for details on Python discovery and supported request formats.
--python-platform python-platformThe platform for which requirements should be resolved.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for Windowslinux: An alias for x86_64-unknown-linux-gnu, the default target for Linuxmacos: An alias for aarch64-apple-darwin, the default target for macOSx86_64-pc-windows-msvc: A 64-bit x86 Windows targeti686-pc-windows-msvc: A 32-bit x86 Windows targetx86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_17aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devicesx86_64-apple-darwin: An x86 macOS targetaarch64-unknown-linux-gnu: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17aarch64-unknown-linux-musl: An ARM64 Linux targetx86_64-unknown-linux-musl: An x86_64 Linux targetx86_64-manylinux_2_17: An x86_64 target for the manylinux_2_17 platformx86_64-manylinux_2_28: An x86_64 target for the manylinux_2_28 platformx86_64-manylinux_2_31: An x86_64 target for the manylinux_2_31 platformaarch64-manylinux_2_17: An ARM64 target for the manylinux_2_17 platformaarch64-manylinux_2_28: An ARM64 target for the manylinux_2_28 platformaarch64-manylinux_2_31: An ARM64 target for the manylinux_2_31 platform--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--python-version, -p python-versionThe Python version to use for resolution.
For example, 3.8 or 3.8.17.
Defaults to the version of the Python interpreter used for resolution.
Defines the minimum Python version that must be supported by the resolved requirements.
If a patch version is omitted, the minimum patch version is assumed. For example, 3.8 is mapped to 3.8.0.
--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--systemInstall packages into the system Python environment.
By default, uv uses the virtual environment in the current working directory or any parent directory, falling back to searching for a Python executable in PATH. The --system option instructs uv to avoid using a virtual environment Python and restrict its search to the system path.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--universalPerform a universal resolution, attempting to generate a single requirements.txt output file that is compatible with all operating systems, architectures, and Python implementations.
In universal mode, the current Python version (or user-provided --python-version) will be treated as a lower bound. For example, --universal --python-version 3.7 would produce a universal resolution for Python 3.7 and later.
Implies --no-strip-markers.
--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
SRC_FILEInclude all packages listed in the given requirements.txt files.
If a pyproject.toml, setup.py, or setup.cfg file is provided, uv will extract the requirements for the relevant project.
If - is provided, then requirements will be read from stdin.
--allow-empty-requirementsAllow sync of empty requirements, which will clear the environment of all packages
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--break-system-packagesAllow uv to modify an EXTERNALLY-MANAGED Python installation.
WARNING: --break-system-packages is intended for use in continuous integration (CI) environments, when installing into Python installations that are managed by an external package manager, like apt. It should be used with caution, as such Python installations explicitly recommend against modifications by other package managers (like uv or pip).
May also be set with the UV_BREAK_SYSTEM_PACKAGES environment variable.
--build-constraint, -b build-constraintConstrain build dependencies using the given requirements files when building source distributions.
Constraints files are requirements.txt-like files that only control the version of a requirement that’s installed. However, including a package in a constraints file will not trigger the installation of that package.
May also be set with the UV_BUILD_CONSTRAINT environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--constraint, -c constraintConstrain versions using the given requirements files.
Constraints files are requirements.txt-like files that only control the version of a requirement that’s installed. However, including a package in a constraints file will not trigger the installation of that package.
This is equivalent to pip’s --constraint option.
May also be set with the UV_CONSTRAINT environment variable.
--dry-runPerform a dry run, i.e., don’t actually install anything but resolve the dependencies and print the resulting plan
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-allow-empty-requirements--no-binary no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear previously specified packages with :none:.
--no-break-system-packages--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Alias for --only-binary :all:.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--only-binary only-binaryOnly use pre-built wheels; don’t build source distributions.
When enabled, resolving will not run code from the given packages. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear previously specified packages with :none:.
--prefix prefixInstall packages into lib, bin, and other top-level folders under the specified directory, as if a virtual environment were present at that location.
In general, prefer the use of --python to install into an alternate environment, as scripts and other artifacts installed via --prefix will reference the installing interpreter, rather than any interpreter added to the --prefix directory, rendering them non-portable.
--python, -p pythonThe Python interpreter into which packages should be installed.
By default, syncing requires a virtual environment. A path to an alternative Python can be provided, but it is only recommended in continuous integration (CI) environments and should be used with caution, as it can modify the system Python installation.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
WARNING: When specified, uv will select wheels that are compatible with the target platform; as a result, the installed distributions may not be compatible with the current platform. Conversely, any distributions that are built from source may be incompatible with the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for Windowslinux: An alias for x86_64-unknown-linux-gnu, the default target for Linuxmacos: An alias for aarch64-apple-darwin, the default target for macOSx86_64-pc-windows-msvc: A 64-bit x86 Windows targeti686-pc-windows-msvc: A 32-bit x86 Windows targetx86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_17aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devicesx86_64-apple-darwin: An x86 macOS targetaarch64-unknown-linux-gnu: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17aarch64-unknown-linux-musl: An ARM64 Linux targetx86_64-unknown-linux-musl: An x86_64 Linux targetx86_64-manylinux_2_17: An x86_64 target for the manylinux_2_17 platformx86_64-manylinux_2_28: An x86_64 target for the manylinux_2_28 platformx86_64-manylinux_2_31: An x86_64 target for the manylinux_2_31 platformaarch64-manylinux_2_17: An ARM64 target for the manylinux_2_17 platformaarch64-manylinux_2_28: An ARM64 target for the manylinux_2_28 platformaarch64-manylinux_2_31: An ARM64 target for the manylinux_2_31 platform--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--python-version python-versionThe minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).
If a patch version is omitted, the minimum patch version is assumed. For example, 3.7 is mapped to 3.7.0.
--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--require-hashesRequire a matching hash for each requirement.
Hash-checking mode is all or nothing. If enabled, all requirements must be provided with a corresponding hash or set of hashes. Additionally, if enabled, all requirements must either be pinned to exact versions (e.g., ==1.0.0), or be specified via direct URL.
Hash-checking mode introduces a number of additional constraints:
.whl) or source archive (.zip, .tar.gz), as opposed to a directory.May also be set with the UV_REQUIRE_HASHES environment variable.
--strictValidate the Python environment after completing the installation, to detect and with missing dependencies or other issues
--systemInstall packages into the system Python environment.
By default, uv installs into the virtual environment in the current working directory or any parent directory. The --system option instructs uv to instead use the first Python found in the system PATH.
WARNING: --system is intended for use in continuous integration (CI) environments and should be used with caution, as it can modify the system Python installation.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--target targetInstall packages into the specified directory, rather than into the virtual or system Python environment. The packages will be installed at the top-level of the directory
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--verify-hashesValidate any hashes provided in the requirements file.
Unlike --require-hashes, --verify-hashes does not require that all requirements have hashes; instead, it will limit itself to verifying the hashes of those requirements that do include them.
May also be set with the UV_VERIFY_HASHES environment variable.
--version, -VDisplay the uv version
PACKAGEInstall all listed packages.
The order of the packages is used to determine priority during resolution.
--all-extrasInclude all optional dependencies.
Only applies to pyproject.toml, setup.py, and setup.cfg sources.
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--break-system-packagesAllow uv to modify an EXTERNALLY-MANAGED Python installation.
WARNING: --break-system-packages is intended for use in continuous integration (CI) environments, when installing into Python installations that are managed by an external package manager, like apt. It should be used with caution, as such Python installations explicitly recommend against modifications by other package managers (like uv or pip).
May also be set with the UV_BREAK_SYSTEM_PACKAGES environment variable.
--build-constraint, -b build-constraintConstrain build dependencies using the given requirements files when building source distributions.
Constraints files are requirements.txt-like files that only control the version of a requirement that’s installed. However, including a package in a constraints file will not trigger the installation of that package.
May also be set with the UV_BUILD_CONSTRAINT environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--compile-bytecodeCompile Python files to bytecode after installation.
By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times.
When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors.
May also be set with the UV_COMPILE_BYTECODE environment variable.
--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--constraint, -c constraintConstrain versions using the given requirements files.
Constraints files are requirements.txt-like files that only control the version of a requirement that’s installed. However, including a package in a constraints file will not trigger the installation of that package.
This is equivalent to pip’s --constraint option.
May also be set with the UV_CONSTRAINT environment variable.
--dry-runPerform a dry run, i.e., don’t actually install anything but resolve the dependencies and print the resulting plan
--editable, -e editableInstall the editable package based on the provided local file path
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra extraInclude optional dependencies from the extra group name; may be provided more than once.
Only applies to pyproject.toml, setup.py, and setup.cfg sources.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binary no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear previously specified packages with :none:.
--no-break-system-packages--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Alias for --only-binary :all:.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-depsIgnore package dependencies, instead only installing those packages explicitly listed on the command line or in the requirements files
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--only-binary only-binaryOnly use pre-built wheels; don’t build source distributions.
When enabled, resolving will not run code from the given packages. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
Multiple packages may be provided. Disable binaries for all packages with :all:. Clear previously specified packages with :none:.
--override overrideOverride versions using the given requirements files.
Overrides files are requirements.txt-like files that force a specific version of a requirement to be installed, regardless of the requirements declared by any constituent package, and regardless of whether this would be considered an invalid resolution.
While constraints are additive, in that they’re combined with the requirements of the constituent packages, overrides are absolute, in that they completely replace the requirements of the constituent packages.
May also be set with the UV_OVERRIDE environment variable.
--prefix prefixInstall packages into lib, bin, and other top-level folders under the specified directory, as if a virtual environment were present at that location.
In general, prefer the use of --python to install into an alternate environment, as scripts and other artifacts installed via --prefix will reference the installing interpreter, rather than any interpreter added to the --prefix directory, rendering them non-portable.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter into which packages should be installed.
By default, installation requires a virtual environment. A path to an alternative Python can be provided, but it is only recommended in continuous integration (CI) environments and should be used with caution, as it can modify the system Python installation.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-platform python-platformThe platform for which requirements should be installed.
Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or aarch64-apple-darwin.
WARNING: When specified, uv will select wheels that are compatible with the target platform; as a result, the installed distributions may not be compatible with the current platform. Conversely, any distributions that are built from source may be incompatible with the target platform, as they will be built for the current platform. The --python-platform option is intended for advanced use cases.
Possible values:
windows: An alias for x86_64-pc-windows-msvc, the default target for Windowslinux: An alias for x86_64-unknown-linux-gnu, the default target for Linuxmacos: An alias for aarch64-apple-darwin, the default target for macOSx86_64-pc-windows-msvc: A 64-bit x86 Windows targeti686-pc-windows-msvc: A 32-bit x86 Windows targetx86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to x86_64-manylinux_2_17aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devicesx86_64-apple-darwin: An x86 macOS targetaarch64-unknown-linux-gnu: An ARM64 Linux target. Equivalent to aarch64-manylinux_2_17aarch64-unknown-linux-musl: An ARM64 Linux targetx86_64-unknown-linux-musl: An x86_64 Linux targetx86_64-manylinux_2_17: An x86_64 target for the manylinux_2_17 platformx86_64-manylinux_2_28: An x86_64 target for the manylinux_2_28 platformx86_64-manylinux_2_31: An x86_64 target for the manylinux_2_31 platformaarch64-manylinux_2_17: An ARM64 target for the manylinux_2_17 platformaarch64-manylinux_2_28: An ARM64 target for the manylinux_2_28 platformaarch64-manylinux_2_31: An ARM64 target for the manylinux_2_31 platform--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--python-version python-versionThe minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).
If a patch version is omitted, the minimum patch version is assumed. For example, 3.7 is mapped to 3.7.0.
--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--reinstallReinstall all packages, regardless of whether they’re already installed. Implies --refresh
--reinstall-package reinstall-packageReinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--require-hashesRequire a matching hash for each requirement.
Hash-checking mode is all or nothing. If enabled, all requirements must be provided with a corresponding hash or set of hashes. Additionally, if enabled, all requirements must either be pinned to exact versions (e.g., ==1.0.0), or be specified via direct URL.
Hash-checking mode introduces a number of additional constraints:
.whl) or source archive (.zip, .tar.gz), as opposed to a directory.May also be set with the UV_REQUIRE_HASHES environment variable.
--requirement, -r requirementInstall all packages listed in the given requirements.txt files.
If a pyproject.toml, setup.py, or setup.cfg file is provided, uv will extract the requirements for the relevant project.
If - is provided, then requirements will be read from stdin.
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--strictValidate the Python environment after completing the installation, to detect and with missing dependencies or other issues
--systemInstall packages into the system Python environment.
By default, uv installs into the virtual environment in the current working directory or any parent directory. The --system option instructs uv to instead use the first Python found in the system PATH.
WARNING: --system is intended for use in continuous integration (CI) environments and should be used with caution, as it can modify the system Python installation.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--target targetInstall packages into the specified directory, rather than into the virtual or system Python environment. The packages will be installed at the top-level of the directory
--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--user--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--verify-hashesValidate any hashes provided in the requirements file.
Unlike --require-hashes, --verify-hashes does not require that all requirements have hashes; instead, it will limit itself to verifying the hashes of those requirements that do include them.
May also be set with the UV_VERIFY_HASHES environment variable.
--version, -VDisplay the uv version
PACKAGEUninstall all listed packages
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--break-system-packagesAllow uv to modify an EXTERNALLY-MANAGED Python installation.
WARNING: --break-system-packages is intended for use in continuous integration (CI) environments, when installing into Python installations that are managed by an external package manager, like apt. It should be used with caution, as such Python installations explicitly recommend against modifications by other package managers (like uv or pip).
May also be set with the UV_BREAK_SYSTEM_PACKAGES environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--keyring-provider keyring-providerAttempt to use keyring for authentication for remote requirements files.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-break-system-packages--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--prefix prefixUninstall packages from the specified --prefix directory
--python, -p pythonThe Python interpreter from which packages should be uninstalled.
By default, uninstallation requires a virtual environment. A path to an alternative Python can be provided, but it is only recommended in continuous integration (CI) environments and should be used with caution, as it can modify the system Python installation.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--requirement, -r requirementUninstall all packages listed in the given requirements files
--systemUse the system Python to uninstall packages.
By default, uv uninstalls from the virtual environment in the current working directory or any parent directory. The --system option instructs uv to instead use the first Python found in the system PATH.
WARNING: --system is intended for use in continuous integration (CI) environments and should be used with caution, as it can modify the system Python installation.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--target targetUninstall packages from the specified --target directory
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--exclude-editableExclude any editable packages from output
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python, -p pythonThe Python interpreter for which packages should be listed.
By default, uv lists packages in a virtual environment but will show packages in a system Python environment if no virtual environment is found.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--strictValidate the Python environment, to detect packages with missing dependencies and other issues
--systemList packages in the system Python environment.
Disables discovery of virtual environments.
See uv python for details on Python discovery.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--editable, -eOnly include editable projects
--exclude excludeExclude the specified package(s) from the output
--exclude-editableExclude any editable packages from output
--format formatSelect the output format between: columns (default), freeze, or json
[default: columns]
Possible values:
columns: Display the list of packages in a human-readable tablefreeze: Display the list of packages in a pip freeze-like format, with one package per line alongside its versionjson: Display the list of packages in a machine-readable JSON format--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python, -p pythonThe Python interpreter for which packages should be listed.
By default, uv lists packages in a virtual environment but will show packages in a system Python environment if no virtual environment is found.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--strictValidate the Python environment, to detect packages with missing dependencies and other issues
--systemList packages in the system Python environment.
Disables discovery of virtual environments.
See uv python for details on Python discovery.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
PACKAGEThe package(s) to display
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python, -p pythonThe Python interpreter to find the package in.
By default, uv looks for packages in a virtual environment but will look for packages in a system Python environment if no virtual environment is found.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--strictValidate the Python environment, to detect packages with missing dependencies and other issues
--systemShow a package in the system Python environment.
Disables discovery of virtual environments.
See uv python for details on Python discovery.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--depth, -d depthMaximum display depth of the dependency tree
[default: 255]
--help, -hDisplay the concise help for this command
--invertShow the reverse dependencies for the given package. This flag will invert the tree and display the packages that depend on the given package
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-dedupeDo not de-duplicate repeated dependencies. Usually, when a package has already displayed its dependencies, further occurrences will not re-display its dependencies, and will include a (*) to indicate it has already been shown. This flag will cause those duplicates to be repeated
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-system--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--package packageDisplay only the specified packages
--prune prunePrune the given package from the display of the dependency tree
--python, -p pythonThe Python interpreter for which packages should be listed.
By default, uv lists packages in a virtual environment but will show packages in a system Python environment if no virtual environment is found.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--show-version-specifiersShow the version constraint(s) imposed on each package
--strictValidate the Python environment, to detect packages with missing dependencies and other issues
--systemList packages in the system Python environment.
Disables discovery of virtual environments.
See uv python for details on Python discovery.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python, -p pythonThe Python interpreter for which packages should be checked.
By default, uv checks packages in a virtual environment but will check packages in a system Python environment if no virtual environment is found.
See uv python for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--systemCheck packages in the system Python environment.
Disables discovery of virtual environments.
See uv python for details on Python discovery.
May also be set with the UV_SYSTEM_PYTHON environment variable.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
PATHThe path to the virtual environment to create.
Default to .venv in the working directory.
Relative paths are resolved relative to the working directory.
--allow-existingPreserve any existing files or directories at the target path.
By default, uv venv will remove an existing virtual environment at the given path, and exit with an error if the path is non-empty but not a virtual environment. The --allow-existing option will instead write to the given path, regardless of its contents, and without clearing it beforehand.
WARNING: This option can lead to unexpected behavior if the existing virtual environment and the newly-created virtual environment are linked to different Python interpreters.
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
This option is only used for installing seed packages.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-projectAvoid discovering a project or workspace.
By default, uv searches for projects in the current directory or any parent directory to determine the default path of the virtual environment and check for Python version constraints, if any.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--prompt promptProvide an alternative prompt prefix for the virtual environment.
By default, the prompt is dependent on whether a path was provided to uv venv. If provided (e.g, uv venv project), the prompt is set to the directory name. If not provided (uv venv), the prompt is set to the current directory’s name.
If "." is provided, the the current directory name will be used regardless of whether a path was provided to uv venv.
--python, -p pythonThe Python interpreter to use for the virtual environment.
During virtual environment creation, uv will not look for Python interpreters in virtual environments.
See uv python help for details on Python discovery and supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--relocatableMake the virtual environment relocatable.
A relocatable virtual environment can be moved around and redistributed without invalidating its associated entrypoint and activation scripts.
Note that this can only be guaranteed for standard console_scripts and gui_scripts. Other scripts may be adjusted if they ship with a generic #!python[w] shebang, and binaries are left as-is.
As a result of making the environment relocatable (by way of writing relative, rather than absolute paths), the entrypoints and scripts themselves will not be relocatable. In other words, copying those entrypoints and scripts to a location outside the environment will not work, as they reference paths relative to the environment itself.
--seedInstall seed packages (one or more of: pip, setuptools, and wheel) into the virtual environment.
Note setuptools and wheel are not included in Python 3.12+ environments.
--system-site-packagesGive the virtual environment access to the system site packages directory.
Unlike pip, when a virtual environment is created with --system-site-packages, uv will not take system site packages into account when running commands like uv pip list or uv pip install. The --system-site-packages flag will provide the virtual environment with access to the system site packages directory at runtime, but will not affect the behavior of uv commands.
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
SRCThe directory from which distributions should be built, or a source distribution archive to build into a wheel.
Defaults to the current working directory.
--allow-insecure-host allow-insecure-hostAllow insecure connections to a host.
Can be provided multiple times.
Expects to receive either a hostname (e.g., localhost), a host-port pair (e.g., localhost:8080), or a URL (e.g., https://localhost).
WARNING: Hosts included in this list will not be verified against the system’s certificate store. Only use --allow-insecure-host in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks.
May also be set with the UV_INSECURE_HOST environment variable.
--build-constraint, -b build-constraintConstrain build dependencies using the given requirements files when building distributions.
Constraints files are requirements.txt-like files that only control the version of a build dependency that’s installed. However, including a package in a constraints file will not trigger the inclusion of that package on its own.
May also be set with the UV_BUILD_CONSTRAINT environment variable.
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--config-setting, -C config-settingSettings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs
--exclude-newer exclude-newerLimit candidate packages to those that were uploaded prior to the given date.
Accepts both RFC 3339 timestamps (e.g., 2006-12-02T02:07:43Z) and local dates in the same format (e.g., 2006-12-02) in your system’s configured time zone.
May also be set with the UV_EXCLUDE_NEWER environment variable.
--extra-index-url extra-index-urlExtra URLs of package indexes to use, in addition to --index-url.
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
All indexes provided via this flag take priority over the index specified by --index-url (which defaults to PyPI). When multiple --extra-index-url flags are provided, earlier values take priority.
May also be set with the UV_EXTRA_INDEX_URL environment variable.
--find-links, -f find-linksLocations to search for candidate distributions, in addition to those found in the registry indexes.
If a path, the target must be a directory that contains packages as wheel files (.whl) or source distributions (e.g., .tar.gz or .zip) at the top level.
If a URL, the page must contain a flat list of links to package files adhering to the formats described above.
--help, -hDisplay the concise help for this command
--index-strategy index-strategyThe strategy to use when resolving against multiple index URLs.
By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (first-match). This prevents "dependency confusion" attacks, whereby an attack can upload a malicious package under the same name to a secondary.
May also be set with the UV_INDEX_STRATEGY environment variable.
Possible values:
first-index: Only use results from the first index that returns a match for a given package nameunsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the nextunsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index--index-url, -i index-urlThe URL of the Python package index (by default: <https://pypi.org/simple>).
Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format.
The index given by this flag is given lower priority than all other indexes specified via the --extra-index-url flag.
May also be set with the UV_INDEX_URL environment variable.
--keyring-provider keyring-providerAttempt to use keyring for authentication for index URLs.
At present, only --keyring-provider subprocess is supported, which configures uv to use the keyring CLI to handle authentication.
Defaults to disabled.
May also be set with the UV_KEYRING_PROVIDER environment variable.
Possible values:
disabled: Do not use keyring for credential lookupsubprocess: Use the keyring command for credential lookup--link-mode link-modeThe method to use when installing packages from the global cache.
This option is only used when building source distributions.
Defaults to clone (also known as Copy-on-Write) on macOS, and hardlink on Linux and Windows.
May also be set with the UV_LINK_MODE environment variable.
Possible values:
clone: Clone (i.e., copy-on-write) packages from the wheel into the site-packages directorycopy: Copy packages from the wheel into the site-packages directoryhardlink: Hard link packages from the wheel into the site-packages directorysymlink: Symbolically link packages from the wheel into the site-packages directory--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-binaryDon’t install pre-built wheels.
The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available.
--no-binary-package no-binary-packageDon’t install pre-built wheels for a specific package
--no-buildDon’t build source distributions.
When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error.
--no-build-isolationDisable isolation when building source distributions.
Assumes that build dependencies specified by PEP 518 are already installed.
May also be set with the UV_NO_BUILD_ISOLATION environment variable.
--no-build-isolation-package no-build-isolation-packageDisable isolation when building source distributions for a specific package.
Assumes that the packages’ build dependencies specified by PEP 518 are already installed.
--no-build-package no-build-packageDon’t build source distributions for a specific package
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-indexIgnore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--out-dir, -o out-dirThe output directory to which distributions should be written.
Defaults to the dist subdirectory within the source directory, or the directory containing the source distribution archive.
--package packageBuild a specific package in the workspace.
The workspace will be discovered from the provided source directory, or the current directory if no source directory is provided.
If the workspace member does not exist, uv will exit with an error.
--prerelease prereleaseThe strategy to use when considering pre-release versions.
By default, uv will accept pre-releases for packages that only publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (if-necessary-or-explicit).
May also be set with the UV_PRERELEASE environment variable.
Possible values:
disallow: Disallow all pre-release versionsallow: Allow all pre-release versionsif-necessary: Allow pre-release versions if all versions of a package are pre-releaseexplicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirementsif-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements--python, -p pythonThe Python interpreter to use for the build environment.
By default, builds are executed in isolated virtual environments. The discovered interpreter will be used to create those environments, and will be symlinked or copied in depending on the platform.
See uv python to view supported request formats.
May also be set with the UV_PYTHON environment variable.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--refreshRefresh all cached data
--refresh-package refresh-packageRefresh cached data for a specific package
--require-hashesRequire a matching hash for each build requirement.
Hash-checking mode is all or nothing. If enabled, all build requirements must be provided with a corresponding hash or set of hashes via the --build-constraints argument. Additionally, if enabled, all requirements must either be pinned to exact versions (e.g., ==1.0.0), or be specified via direct URL.
Hash-checking mode introduces a number of additional constraints:
.whl) or source archive (.zip, .tar.gz), as opposed to a directory.May also be set with the UV_REQUIRE_HASHES environment variable.
--resolution resolutionThe strategy to use when selecting between the different compatible versions for a given package requirement.
By default, uv will use the latest compatible version of each package (highest).
May also be set with the UV_RESOLUTION environment variable.
Possible values:
highest: Resolve the highest compatible version of each packagelowest: Resolve the lowest compatible version of each packagelowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies--sdistBuild a source distribution ("sdist") from the given directory
--upgrade, -UAllow package upgrades, ignoring pinned versions in any existing output file. Implies --refresh
--upgrade-package, -P upgrade-packageAllow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies --refresh-package
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--verify-hashesValidate any hashes provided in the build constraints file.
Unlike --require-hashes, --verify-hashes does not require that all requirements have hashes; instead, it will limit itself to verifying the hashes of those requirements that do include them.
May also be set with the UV_VERIFY_HASHES environment variable.
--version, -VDisplay the uv version
--wheelBuild a binary distribution ("wheel") from the given directory
uv cache cleanClear the cache, removing all entries or those linked to specific packages
uv cache prunePrune all unreachable objects from the cache
uv cache dirShow the cache directory
PACKAGEThe packages to remove from the cache
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--ciOptimize the cache for persistence in a continuous integration environment, like GitHub Actions.
By default, uv caches both the wheels that it builds from source and the pre-built wheels that it downloads directly, to enable high-performance package installation. In some scenarios, though, persisting pre-built wheels may be undesirable. For example, in GitHub Actions, it’s faster to omit pre-built wheels from the cache and instead have re-download them on each run. However, it typically is faster to cache wheels that are built from source, since the wheel building process can be expensive, especially for extension modules.
In --ci mode, uv will prune any pre-built wheels from the cache, but retain any wheels that were built from source.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--output-format output-format--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version
SHELLThe shell to generate the completion script for
COMMAND--cache-dir cache-dirPath to the cache directory.
Defaults to $HOME/Library/Caches/uv on macOS, $XDG_CACHE_HOME/uv or $HOME/.cache/uv on Linux, and %LOCALAPPDATA%\uv\cache on Windows.
May also be set with the UV_CACHE_DIR environment variable.
--color color-choiceControl colors in output
[default: auto]
Possible values:
auto: Enables colored output only when the output is going to a terminal or TTY with supportalways: Enables colored output regardless of the detected environmentnever: Disables colored output--config-file config-fileThe path to a uv.toml file to use for configuration.
While uv configuration can be included in a pyproject.toml file, it is not allowed in this context.
May also be set with the UV_CONFIG_FILE environment variable.
--help, -hDisplay the concise help for this command
--native-tlsWhether to load TLS certificates from the platform’s native certificate store.
By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).
However, in some cases, you may want to use the platform’s native certificate store, especially if you’re relying on a corporate trust root (e.g., for a mandatory proxy) that’s included in your system’s certificate store.
May also be set with the UV_NATIVE_TLS environment variable.
--no-cache, -nAvoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation
May also be set with the UV_NO_CACHE environment variable.
--no-configAvoid discovering configuration files (pyproject.toml, uv.toml).
Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.
May also be set with the UV_NO_CONFIG environment variable.
--no-pagerDisable pager when printing help
--no-progressHide all progress outputs.
For example, spinners or progress bars.
--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
When disabled, uv will only use locally cached data and locally available files.
--python-preference python-preferenceWhether to prefer uv-managed or system Python installations.
By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.
May also be set with the UV_PYTHON_PREFERENCE environment variable.
Possible values:
only-managed: Only use managed Python installations; never use system Python installationsmanaged: Prefer managed Python installations over system Python installationssystem: Prefer system Python installations over managed Python installationsonly-system: Only use system Python installations; never use managed Python installations--quiet, -qDo not print any output
--verbose, -vUse verbose output.
You can configure fine-grained logging using the RUST_LOG environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>)
--version, -VDisplay the uv version