diff --git a/Cargo.lock b/Cargo.lock index 4ffc7beef67d5..fc2d998d38b09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2062,6 +2062,17 @@ dependencies = [ "quoted_printable", ] +[[package]] +name = "markdown" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef3aab6a1d529b112695f72beec5ee80e729cb45af58663ec902c8fac764ecdd" +dependencies = [ + "lazy_static", + "pipeline", + "regex", +] + [[package]] name = "matchers" version = "0.1.0" @@ -2563,6 +2574,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pipeline" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15b6607fa632996eb8a17c9041cb6071cb75ac057abd45dece578723ea8c7c0" + [[package]] name = "pkg-config" version = "0.3.30" @@ -2711,7 +2728,7 @@ dependencies = [ "indexmap", "log", "priority-queue", - "rustc-hash 1.1.0", + "rustc-hash 2.0.0", "thiserror", ] @@ -4689,6 +4706,7 @@ dependencies = [ "fs-err", "install-wheel-rs", "itertools 0.13.0", + "markdown", "mimalloc", "owo-colors", "pep508_rs", @@ -4709,6 +4727,7 @@ dependencies = [ "tracing-subscriber", "uv-build", "uv-cache", + "uv-cli", "uv-client", "uv-configuration", "uv-dispatch", diff --git a/crates/uv-cli/Cargo.toml b/crates/uv-cli/Cargo.toml index 063490dd1fa68..2a1504205545e 100644 --- a/crates/uv-cli/Cargo.toml +++ b/crates/uv-cli/Cargo.toml @@ -29,7 +29,7 @@ uv-warnings = { workspace = true } anstream = { workspace = true } anyhow = { workspace = true } -clap = { workspace = true, features = ["derive"] } +clap = { workspace = true, features = ["derive", "string"] } clap_complete_command = { workspace = true } serde = { workspace = true } url = { workspace = true } diff --git a/crates/uv-dev/Cargo.toml b/crates/uv-dev/Cargo.toml index 02b5331412eff..3549bdb085700 100644 --- a/crates/uv-dev/Cargo.toml +++ b/crates/uv-dev/Cargo.toml @@ -23,6 +23,7 @@ pep508_rs = { workspace = true } pypi-types = { workspace = true } uv-build = { workspace = true } uv-cache = { workspace = true, features = ["clap"] } +uv-cli = { workspace = true } uv-client = { workspace = true } uv-configuration = { workspace = true } uv-dispatch = { workspace = true } @@ -43,6 +44,7 @@ anyhow = { workspace = true } clap = { workspace = true, features = ["derive", "wrap_help"] } fs-err = { workspace = true, features = ["tokio"] } itertools = { workspace = true } +markdown = "0.3.0" owo-colors = { workspace = true } poloto = { version = "19.1.2", optional = true } pretty_assertions = { version = "1.4.0" } diff --git a/crates/uv-dev/src/generate_cli_reference.rs b/crates/uv-dev/src/generate_cli_reference.rs new file mode 100644 index 0000000000000..f5a31aec487a7 --- /dev/null +++ b/crates/uv-dev/src/generate_cli_reference.rs @@ -0,0 +1,253 @@ +//! Generate a Markdown-compatible reference for the uv command-line interface. +use std::cmp::max; +use std::path::PathBuf; + +use anstream::println; +use anyhow::{bail, Result}; +use clap::{Command, CommandFactory}; +use itertools::Itertools; +use pretty_assertions::StrComparison; + +use crate::generate_all::Mode; +use crate::ROOT_DIR; + +use uv_cli::Cli; + +#[derive(clap::Args)] +pub(crate) struct Args { + /// Write the generated output to stdout (rather than to `settings.md`). + #[arg(long, default_value_t, value_enum)] + pub(crate) mode: Mode, +} + +pub(crate) fn main(args: &Args) -> Result<()> { + let reference_string = generate(); + let filename = "cli.md"; + let reference_path = PathBuf::from(ROOT_DIR) + .join("docs") + .join("reference") + .join(filename); + + match args.mode { + Mode::DryRun => { + println!("{reference_string}"); + } + Mode::Check => match fs_err::read_to_string(reference_path) { + Ok(current) => { + if current == reference_string { + println!("Up-to-date: {filename}"); + } else { + let comparison = StrComparison::new(¤t, &reference_string); + bail!("{filename} changed, please run `cargo dev generate-cli-reference`:\n{comparison}"); + } + } + Err(err) if err.kind() == std::io::ErrorKind::NotFound => { + bail!("{filename} not found, please run `cargo dev generate-cli-reference`"); + } + Err(err) => { + bail!("{filename} changed, please run `cargo dev generate-cli-reference`:\n{err}"); + } + }, + Mode::Write => match fs_err::read_to_string(&reference_path) { + Ok(current) => { + if current == reference_string { + println!("Up-to-date: {filename}"); + } else { + println!("Updating: {filename}"); + fs_err::write(reference_path, reference_string.as_bytes())?; + } + } + Err(err) if err.kind() == std::io::ErrorKind::NotFound => { + println!("Updating: {filename}"); + fs_err::write(reference_path, reference_string.as_bytes())?; + } + Err(err) => { + bail!("{filename} changed, please run `cargo dev generate-cli-reference`:\n{err}"); + } + }, + } + + Ok(()) +} + +fn generate() -> String { + let mut output = String::new(); + + let mut uv = Cli::command(); + + // It is very important to build the command before beginning inspection or subcommands + // will be missing all of the propagated options. + uv.build(); + + let mut parents = Vec::new(); + + output.push_str("# CLI Reference\n\n"); + generate_command(&mut output, &uv, &mut parents); + + output +} + +fn generate_command<'a>(output: &mut String, command: &'a Command, parents: &mut Vec<&'a Command>) { + if command.is_hide_set() { + return; + } + + // Generate the command header. + let name = if parents.is_empty() { + command.get_name().to_string() + } else { + format!( + "{} {}", + parents.iter().map(|cmd| cmd.get_name()).join(" "), + command.get_name() + ) + }; + + // Display the top-level `uv` command at the same level as its children + let level = max(2, parents.len() + 1); + output.push_str(&format!("{} {name}\n\n", "#".repeat(level))); + + // Display the command description. + if let Some(about) = command.get_long_about().or_else(|| command.get_about()) { + output.push_str(&about.to_string()); + output.push_str("\n\n"); + }; + + // Display the usage + { + // This appears to be the simplest way to get rendered usage from Clap, + // it is complicated to render it manually. It's annoying that it + // requires a mutable reference but it doesn't really matter. + let mut command = command.clone(); + output.push_str("
{subcommand_name}
{}
",
+ arg.get_id().to_string().to_uppercase()
+ ));
+ output.push_str("--{long}
"));
+ if let Some(short) = opt.get_short() {
+ output.push_str(&format!(", -{short}
"));
+ }
+ output.push_str("uv pip
Resolve and install Python packages
+uv tool
Run and manage executable Python packages
+uv python
Manage Python installations
+uv venv
Create a virtual environment
+uv cache
Manage the cache
+uv version
Display uv’s version
+uv help
Display documentation for a command
+uv pip compile
Compile a requirements.in
file to a requirements.txt
file
uv pip sync
Sync an environment with a requirements.txt
file
uv pip install
Install packages into an environment
+uv pip uninstall
Uninstall packages from an environment
+uv pip freeze
List, in requirements format, packages installed in an environment
+uv pip list
List, in tabular format, packages installed in an environment
+uv pip show
Show information about one or more installed packages
+uv pip tree
Display the dependency tree for an environment
+uv pip check
Verify installed packages have compatible dependencies
+SRC_FILE
Include 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.
--constraint
, -c
Constrain 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.
--override
Override 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.
+ +--extra
Include optional dependencies from the extra group name; may be provided more than once.
+ +Only applies to pyproject.toml
, setup.py
, and setup.cfg
sources.
--index-url
, -i
The 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.
--extra-index-url
Extra 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.
--find-links
, -f
Locations 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 (.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.
+ +--upgrade-package
, -P
Allow upgrades for a specific package, ignoring pinned versions in any existing output file
+ +--index-strategy
The 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.
--keyring-provider
Attempt 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
.
--resolution
The 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
).
--prerelease
The 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
).
--config-setting
, -C
Settings to pass to the PEP 517 build backend, specified as KEY=VALUE
pairs
--exclude-newer
Limit 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 UTC dates in the same format (e.g., 2006-12-02
).
--link-mode
The 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.
--refresh-package
Refresh cached data for a specific package
+ +--output-file
, -o
Write 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.
--annotation-style
The style of the annotation comments included in the output file, used to indicate the source of each package.
+ +Defaults to split
.
--custom-compile-command
The 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
.
--python
The Python interpreter against which to compile the requirements.
+ +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 --python
option allows you to specify a different interpreter.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--no-binary
Don’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:
.
--only-binary
Only 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:
.
--python-version
, -p
The minimum Python version that should be supported by the resolved requirements (e.g., 3.8
or 3.8.17
).
If a patch version is omitted, the minimum patch version is assumed. For example, 3.8
is mapped to 3.8.0
.
--python-platform
The 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 aaarch64-apple-darwin
.
--no-emit-package
Specify 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
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
SRC_FILE
Include 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.
--constraint
, -c
Constrain 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.
--index-url
, -i
The 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.
--extra-index-url
Extra 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.
--find-links
, -f
Locations 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 (.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.
+ +--reinstall-package
Reinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--index-strategy
The 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.
--keyring-provider
Attempt 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
.
--config-setting
, -C
Settings to pass to the PEP 517 build backend, specified as KEY=VALUE
pairs
--exclude-newer
Limit 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 UTC dates in the same format (e.g., 2006-12-02
).
--link-mode
The 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.
--refresh-package
Refresh cached data for a specific package
+ +--python
, -p
The Python interpreter into which packages should be installed.
+ +By default, uv installs into the virtual environment in the current working directory or any parent directory. The --python
option allows you to specify a different interpreter, which is intended for use in continuous integration (CI) environments or other automated workflows.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--target
Install 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
+ +--prefix
Install 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.
--no-binary
Don’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:
.
--only-binary
Only 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:
.
--python-version
The 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
.
--python-platform
The 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 aaarch64-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.
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
PACKAGE
Install all listed packages
+ +--requirement
, -r
Install 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.
--editable
, -e
Install the editable package based on the provided local file path
+ +--constraint
, -c
Constrain 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.
--override
Override 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.
+ +--extra
Include optional dependencies from the extra group name; may be provided more than once.
+ +Only applies to pyproject.toml
, setup.py
, and setup.cfg
sources.
--index-url
, -i
The 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.
--extra-index-url
Extra 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.
--find-links
, -f
Locations 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 (.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.
+ +--upgrade-package
, -P
Allow upgrades for a specific package, ignoring pinned versions in any existing output file
+ +--reinstall-package
Reinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--index-strategy
The 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.
--keyring-provider
Attempt 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
.
--resolution
The 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
).
--prerelease
The 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
).
--config-setting
, -C
Settings to pass to the PEP 517 build backend, specified as KEY=VALUE
pairs
--exclude-newer
Limit 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 UTC dates in the same format (e.g., 2006-12-02
).
--link-mode
The 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.
--refresh-package
Refresh cached data for a specific package
+ +--python
, -p
The Python interpreter into which packages should be installed.
+ +By default, uv installs into the virtual environment in the current working directory or any parent directory. The --python
option allows you to specify a different interpreter, which is intended for use in continuous integration (CI) environments or other automated workflows.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--target
Install 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
+ +--prefix
Install 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.
--no-binary
Don’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:
.
--only-binary
Only 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:
.
--python-version
The 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
.
--python-platform
The 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 aaarch64-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.
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
PACKAGE
Uninstall all listed packages
+ +--requirement
, -r
Uninstall all packages listed in the given requirements files
+ +--python
, -p
The Python interpreter from which packages should be uninstalled.
+ +By default, uv uninstalls from the virtual environment in the current working directory or any parent directory. The --python
option allows you to specify a different interpreter, which is intended for use in continuous integration (CI) environments or other automated workflows.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--keyring-provider
Attempt 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
.
--target
Uninstall packages from the specified --target
directory
--prefix
Uninstall packages from the specified --prefix
directory
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--python
, -p
The Python interpreter for which packages should be listed.
+ +By default, uv lists packages in the currently activated virtual environment, or a virtual environment (.venv
) located in the current working directory or any parent directory, falling back to the system Python if no virtual environment is found.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--exclude
Exclude the specified package(s) from the output
+ +--format
Select the output format between: columns
(default), freeze
, or json
--python
, -p
The Python interpreter for which packages should be listed.
+ +By default, uv lists packages in the currently activated virtual environment, or a virtual environment (.venv
) located in the current working directory or any parent directory, falling back to the system Python if no virtual environment is found.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
PACKAGE
The package(s) to display
+ +--python
, -p
The Python interpreter for which packages should be listed.
+ +By default, uv lists packages in the currently activated virtual environment, or a virtual environment (.venv
) located in the current working directory or any parent directory, falling back to the system Python if no virtual environment is found.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--depth
, -d
Maximum display depth of the dependency tree
+ +--prune
Prune the given package from the display of the dependency tree
+ +--package
Display only the specified packages
+ +--python
, -p
The Python interpreter for which packages should be listed.
+ +By default, uv lists packages in the currently activated virtual environment, or a virtual environment (.venv
) located in the current working directory or any parent directory, falling back to the system Python if no virtual environment is found.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--python
, -p
The Python interpreter for which packages should be listed.
+ +By default, uv lists packages in the currently activated virtual environment, or a virtual environment (.venv
) located in the current working directory or any parent directory, falling back to the system Python if no virtual environment is found.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
uv tool run
Run a tool
+uv tool install
Install a tool
+uv tool list
List installed tools
+uv tool uninstall
Uninstall a tool
+uv tool update-shell
Ensure that the tool executable directory is on PATH
uv tool dir
Show the tools directory
+--from
Use the given package to provide the command.
+ +By default, the package name is assumed to match the command name.
+ +--with
Run with the given packages installed
+ +--with-requirements
Run with all packages listed in the given requirements.txt
files
--index-url
, -i
The 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.
--extra-index-url
Extra 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.
--find-links
, -f
Locations 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 (.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.
+ +--upgrade-package
, -P
Allow upgrades for a specific package, ignoring pinned versions in any existing output file
+ +--reinstall-package
Reinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--index-strategy
The 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.
--keyring-provider
Attempt 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
.
--resolution
The 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
).
--prerelease
The 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
).
--config-setting
, -C
Settings to pass to the PEP 517 build backend, specified as KEY=VALUE
pairs
--exclude-newer
Limit 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 UTC dates in the same format (e.g., 2006-12-02
).
--link-mode
The 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.
--no-build-package
Don’t build source distributions for a specific package
+ +--no-binary-package
Don’t install pre-built wheels for a specific package
+ +--refresh-package
Refresh cached data for a specific package
+ +--python
, -p
The Python interpreter to use to build the run 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 --python
option allows you to specify a different interpreter.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
PACKAGE
The package to install commands from
+ +--with
Include the following extra requirements
+ +--with-requirements
Run all requirements listed in the given requirements.txt
files
--index-url
, -i
The 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.
--extra-index-url
Extra 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.
--find-links
, -f
Locations 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 (.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.
+ +--upgrade-package
, -P
Allow upgrades for a specific package, ignoring pinned versions in any existing output file
+ +--reinstall-package
Reinstall a specific package, regardless of whether it’s already installed. Implies --refresh-package
--index-strategy
The 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.
--keyring-provider
Attempt 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
.
--resolution
The 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
).
--prerelease
The 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
).
--config-setting
, -C
Settings to pass to the PEP 517 build backend, specified as KEY=VALUE
pairs
--exclude-newer
Limit 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 UTC dates in the same format (e.g., 2006-12-02
).
--link-mode
The 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.
--no-build-package
Don’t build source distributions for a specific package
+ +--no-binary-package
Don’t install pre-built wheels for a specific package
+ +--refresh-package
Refresh cached data for a specific package
+ +--python
, -p
The Python interpreter to use to build the tool environment.
+ +By default, uv will search for a Python executable in the PATH
. uv ignores virtual environments while looking for interpreter for tools. The --python
option allows you to specify a different interpreter.
Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
NAME
The name of the tool to uninstall
+ +--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
uv python list
List the available Python installations
+uv python install
Download and install Python versions
+uv python find
Search for a Python installation
+uv python pin
Pin to a specific Python version
+uv python dir
Show the uv Python installation directory
+uv python uninstall
Uninstall Python versions
+--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
TARGETS
The 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.
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
REQUEST
The Python request
+ +--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
REQUEST
The Python version
+ +--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
TARGETS
The Python version(s) to uninstall
+ +--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
NAME
The path to the virtual environment to create
+ +--python
, -p
The Python interpreter to use for the virtual environment.
+ +Supported formats:
+ +3.10
looks for an installed Python 3.10 using py --list-paths
on Windows, or python3.10
on Linux and macOS.python3.10
or python.exe
looks for a binary with the given name in PATH
./home/ferris/.local/bin/python3.10
uses the exact Python at the given path.Note that this is different from --python-version
in pip compile
, which takes 3.10
or 3.10.13
and doesn’t look for a Python interpreter on disk.
--prompt
Provide an alternative prompt prefix for the virtual environment.
+ +The default behavior depends on whether the virtual environment path is provided:
+ +uv venv project
), the prompt is set to the virtual environment’s directory name.uv venv
), the prompt is set to the current directory’s name.Possible values:
+ +.
: Use the current directory name.--index-url
, -i
The 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.
--extra-index-url
Extra 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.
--find-links
, -f
Locations 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 (.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.
+ +--index-strategy
The 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.
--keyring-provider
Attempt 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
.
--exclude-newer
Limit 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 UTC dates in the same format (e.g., 2006-12-02
).
--link-mode
The 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.
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
uv cache clean
Clear the cache, removing all entries or those linked to specific packages
+uv cache prune
Prune all unreachable objects from the cache
+uv cache dir
Show the cache directory
+PACKAGE
The packages to remove from the cache
+ +--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
--output-format
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration
COMMAND
--color
Control colors in output
+ +--python-preference
Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv
+ +--python-fetch
Whether to automatically download Python when required
+ +--cache-dir
Path to the cache directory.
+ +Defaults to $HOME/Library/Caches/uv
on macOS, $XDG_CACHE_HOME/uv
or $HOME/.cache/uv
on Linux, and {FOLDERID_LocalAppData}\uv\cache
on Windows.
--config-file
The path to a uv.toml
file to use for configuration