Skip to content

uv

uv documentation

toolroom._stubs.uv.Uv

Bases: Tool[_R]

Add

Bases: Tool[_R2]

__call__

__call__(
    *args: str | PathLike[str],
    active: Flag = ...,
    allow_insecure_host: Value = ...,
    bounds: Bounds | Sequence[Bounds] | None = ...,
    branch: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    constraints: Value = ...,
    default_index: Value = ...,
    dev: Flag = ...,
    directory: Value = ...,
    editable: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    frozen: Flag = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    lfs: Flag = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    locked: Flag = ...,
    managed_python: Flag = ...,
    marker: Value = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_install_local: Flag = ...,
    no_install_package: Value = ...,
    no_install_project: Flag = ...,
    no_install_workspace: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_sync: Flag = ...,
    offline: Flag = ...,
    optional: Value = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    raw: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    requirements: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    rev: Value = ...,
    script: Value = ...,
    system_certs: Flag = ...,
    tag: Value = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    workspace: Flag = ...,
    **flags: Any,
) -> _R2

Add dependencies to the project

Parameters:

Name Type Description Default
active Flag

Prefer the active virtual environment over the project's virtual environment.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
bounds Bounds | Sequence[Bounds] | None

The kind of version specifier to use when adding dependencies.

...
branch Value

Branch to use when adding a dependency from Git.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
constraints Value

Constrain versions using the given requirements files.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
dev Flag

Add the requirements to the development dependency group.

...
directory Value

Change to the given directory prior to running the command.

...
editable Flag

Add the requirements as editable.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra Value

Extras to enable for the dependency.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
frozen Flag

Add dependencies without re-locking the project.

...
group Value

Add the requirements to the specified dependency group.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
lfs Flag

Whether to use Git LFS when adding a dependency from Git.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
locked Flag

Assert that the uv.lock will remain unchanged.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
marker Value

Apply this marker to all added packages.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_install_local Flag

Do not install local path dependencies.

...
no_install_package Value

Do not install the given package(s).

...
no_install_project Flag

Do not install the current project.

...
no_install_workspace Flag

Do not install any workspace members, including the current project.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_sync Flag

Avoid syncing the virtual environment.

...
offline Flag

Disable network access.

...
optional Value

Add the requirements to the package's optional dependencies for the specified extra.

...
package Value

Add the dependency to a specific package in the workspace.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use for resolving and syncing.

...
quiet Flag

Use quiet output.

...
raw Flag

Add a dependency as provided.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
requirements Value

Add the packages listed in the given files.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
rev Value

Commit to use when adding a dependency from Git.

...
script Value

Add the dependency to the specified Python script, rather than to a project.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
tag Value

Tag to use when adding a dependency from Git.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...
workspace Flag

Add the dependency as a workspace member. workspace=off emits --no-workspace.

...

Build

Bases: Tool[_R2]

__call__

__call__(
    *args: str | PathLike[str],
    all_packages: Flag = ...,
    allow_insecure_host: Value = ...,
    build_constraints: Value = ...,
    cache_dir: Value = ...,
    clear: Flag = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    force_pep517: Flag = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_logs: Flag = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_create_gitignore: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_verify_hashes: Flag = ...,
    offline: Flag = ...,
    out_dir: Value = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    require_hashes: Flag = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    sdist: Flag = ...,
    system_certs: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    wheel: Flag = ...,
    **flags: Any,
) -> _R2

Build Python packages into source distributions and wheels

Parameters:

Name Type Description Default
all_packages Flag

Builds all packages in the workspace.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
build_constraints Value

Constrain build dependencies using the given requirements files when building distributions.

...
cache_dir Value

Path to the cache directory.

...
clear Flag

Clear the output directory before the build, removing stale artifacts.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
force_pep517 Flag

Always build through PEP 517, don't use the fast path for the uv build backend.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_logs Flag

Hide logs from the build backend.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_create_gitignore Flag

Do not create a .gitignore file in the output directory.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_verify_hashes Flag

Disable validation of hashes in the requirements file.

...
offline Flag

Disable network access.

...
out_dir Value

The output directory to which distributions should be written.

...
package Value

Build a specific package in the workspace.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use for the build environment.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
require_hashes Flag

Require a matching hash for each requirement.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
sdist Flag

Build a source distribution ("sdist") from the given directory.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...
wheel Flag

Build a binary distribution ("wheel") from the given directory.

...

Export

Bases: Tool[_R2]

__call__

__call__(
    *,
    all_extras: Flag = ...,
    all_groups: Flag = ...,
    all_packages: Flag = ...,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    emit_find_links: Flag = ...,
    emit_index_url: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    format: Format | Sequence[Format] | None = ...,
    frozen: Flag = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    locked: Flag = ...,
    managed_python: Flag = ...,
    no_annotate: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_default_groups: Flag = ...,
    no_dev: Flag = ...,
    no_editable: Flag = ...,
    no_editable_package: Value = ...,
    no_emit_local: Flag = ...,
    no_emit_package: Value = ...,
    no_emit_project: Flag = ...,
    no_emit_workspace: Flag = ...,
    no_extra: Value = ...,
    no_group: Value = ...,
    no_hashes: Flag = ...,
    no_header: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    offline: Flag = ...,
    only_dev: Flag = ...,
    only_group: Value = ...,
    output_file: Value = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    prune: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    script: Value = ...,
    system_certs: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Export the project's lockfile to an alternate format

Parameters:

Name Type Description Default
all_extras Flag

Include all optional dependencies.

...
all_groups Flag

Include dependencies from all dependency groups.

...
all_packages Flag

Export the entire workspace.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
emit_find_links Flag

Include --find-links entries in the generated output file.

...
emit_index_url Flag

Include --index-url and --extra-index-url entries in the generated output file.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra Value

Include optional dependencies from the specified extra name.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
format Format | Sequence[Format] | None

The format to which uv.lock should be exported.

...
frozen Flag

Do not update the uv.lock before exporting.

...
group Value

Include dependencies from the specified dependency group.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
locked Flag

Assert that the uv.lock will remain unchanged.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_annotate Flag

Exclude comment annotations indicating the source of each package.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_default_groups Flag

Ignore the default dependency groups.

...
no_dev Flag

Disable the development dependency group.

...
no_editable Flag

Export any editable dependencies, including the project and any workspace members, as non-editable.

...
no_editable_package Value

Export the specified editable packages as non-editable.

...
no_emit_local Flag

Do not include local path dependencies in the exported requirements.

...
no_emit_package Value

Do not emit the given package(s).

...
no_emit_project Flag

Do not emit the current project.

...
no_emit_workspace Flag

Do not emit any workspace members, including the root project.

...
no_extra Value

Exclude the specified optional dependencies, if --all-extras is supplied.

...
no_group Value

Disable the specified dependency group.

...
no_hashes Flag

Omit hashes in the generated output.

...
no_header Flag

Exclude the comment header at the top of the generated output file.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
offline Flag

Disable network access.

...
only_dev Flag

Only include the development dependency group.

...
only_group Value

Only include dependencies from the specified dependency group.

...
output_file Value

Write the exported requirements to the given file.

...
package Value

Export the dependencies for specific packages in the workspace.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
prune Value

Prune the given package from the dependency tree.

...
python Value

The Python interpreter to use during resolution.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
script Value

Export the dependencies for the specified PEP 723 Python script, rather than the current project.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

Lock

Bases: Tool[_R2]

__call__

__call__(
    *,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    check: Flag = ...,
    check_exists: Flag = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    dry_run: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    offline: Flag = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    script: Value = ...,
    system_certs: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Update the project's lockfile

Parameters:

Name Type Description Default
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
check Flag

Check if the lockfile is up-to-date.

...
check_exists Flag

Assert that a uv.lock exists without checking if it is up-to-date.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
dry_run Flag

Perform a dry run, without writing the lockfile.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
offline Flag

Disable network access.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use during resolution.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
script Value

Lock the specified Python script, rather than the current project.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

Pip

Bases: Tool[_R2]

Compile

Bases: Tool[_R3]

__call__
__call__(
    *args: str | PathLike[str],
    all_extras: Flag = ...,
    allow_insecure_host: Value = ...,
    annotation_style: AnnotationStyle
    | Sequence[AnnotationStyle]
    | None = ...,
    build_constraints: Value = ...,
    cache_dir: Value = ...,
    cert: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    constraints: Value = ...,
    custom_compile_command: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    emit_build_options: Flag = ...,
    emit_find_links: Flag = ...,
    emit_index_annotation: Flag = ...,
    emit_index_url: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    excludes: Value = ...,
    extra: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    format: Format2 | Sequence[Format2] | None = ...,
    generate_hashes: Flag = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_annotate: Flag = ...,
    no_binary: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_cache: Flag = ...,
    no_deps: Flag = ...,
    no_emit_package: Value = ...,
    no_header: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_strip_extras: Flag = ...,
    no_strip_markers: Flag = ...,
    offline: Flag = ...,
    only_binary: Value = ...,
    output_file: Value = ...,
    overrides: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    python_version: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    system: Flag = ...,
    system_certs: Flag = ...,
    torch_backend: TorchBackend
    | Sequence[TorchBackend]
    | None = ...,
    universal: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R3

Compile a requirements.in file to a requirements.txt or pylock.toml file

Parameters:

Name Type Description Default
all_extras Flag

Include all optional dependencies.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
annotation_style AnnotationStyle | Sequence[AnnotationStyle] | None

The style of the annotation comments included in the output file, used to indicate the source of each package.

...
build_constraints Value

Constrain build dependencies using the given requirements files when building source distributions.

...
cache_dir Value

Path to the cache directory.

...
cert Value

Path to a PEM-encoded CA certificate bundle. Added in 0.12.0.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
constraints Value

Constrain versions using the given requirements files.

...
custom_compile_command Value

The header comment to include at the top of the output file generated by uv pip compile.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
emit_build_options Flag

Include --no-binary and --only-binary entries in the generated output file.

...
emit_find_links Flag

Include --find-links entries in the generated output file.

...
emit_index_annotation Flag

Include comment annotations indicating the index used to resolve each package (e.g., # from https://pypi.org/simple).

...
emit_index_url Flag

Include --index-url and --extra-index-url entries in the generated output file.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
excludes Value

Exclude packages from resolution using the given requirements files.

...
extra Value

Include optional dependencies from the specified extra name; may be provided more than once.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
format Format2 | Sequence[Format2] | None

The format in which the resolution should be output.

...
generate_hashes Flag

Include distribution hashes in the output file.

...
group Value

Install the specified dependency group from a pyproject.toml.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_annotate Flag

Exclude comment annotations indicating the source of each package.

...
no_binary Value

Don't install pre-built wheels.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_deps Flag

Ignore package dependencies, instead only add those packages explicitly listed on the command line to the resulting requirements file.

...
no_emit_package Value

Specify a package to omit from the output resolution.

...
no_header Flag

Exclude the comment header at the top of the generated output file.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_strip_extras Flag

Include extras in the output file.

...
no_strip_markers Flag

Include environment markers in the output file.

...
offline Flag

Disable network access.

...
only_binary Value

Only use pre-built wheels; don't build source distributions.

...
output_file Value

Write the compiled requirements to the given requirements.txt or pylock.toml file.

...
overrides Value

Override versions using the given requirements files.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use during resolution.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be resolved.

...
python_version Value

The Python version to use for resolution.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
system Flag

Install packages into the system Python environment.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
torch_backend TorchBackend | Sequence[TorchBackend] | None

The backend to use when fetching packages in the PyTorch ecosystem (e.g., cpu, cu126, or auto).

...
universal Flag

Perform a universal resolution, attempting to generate a single requirements.txt output file that is compatible with all operating systems, architectures, and Python implementations.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

Install

Bases: Tool[_R3]

__call__
__call__(
    *args: str | PathLike[str],
    all_extras: Flag = ...,
    allow_insecure_host: Value = ...,
    break_system_packages: Flag = ...,
    build_constraints: Value = ...,
    cache_dir: Value = ...,
    cert: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    constraints: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    dry_run: Flag = ...,
    editable: Value = ...,
    exact: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    excludes: Value = ...,
    extra: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_binary: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_deps: Flag = ...,
    no_editable: Flag = ...,
    no_editable_package: Value = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_verify_hashes: Flag = ...,
    offline: Flag = ...,
    only_binary: Value = ...,
    overrides: Value = ...,
    prefix: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    python_version: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    require_hashes: Flag = ...,
    requirements: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    strict: Flag = ...,
    system: Flag = ...,
    system_certs: Flag = ...,
    target: Value = ...,
    torch_backend: TorchBackend
    | Sequence[TorchBackend]
    | None = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    user: Flag = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R3

Install packages into an environment

Parameters:

Name Type Description Default
all_extras Flag

Include all optional dependencies.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
break_system_packages Flag

Allow uv to modify an EXTERNALLY-MANAGED Python installation. break_system_packages=off emits --no-break-system-packages.

...
build_constraints Value

Constrain build dependencies using the given requirements files when building source distributions.

...
cache_dir Value

Path to the cache directory.

...
cert Value

Path to a PEM-encoded CA certificate bundle. Added in 0.12.0.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
constraints Value

Constrain versions using the given requirements files.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
dry_run Flag

Perform a dry run, i.e., don't actually install anything but resolve the dependencies and print the resulting plan.

...
editable Value

Install the editable package based on the provided local file path.

...
exact Flag

Perform an exact sync, removing extraneous packages.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
excludes Value

Exclude packages from resolution using the given requirements files.

...
extra Value

Include optional dependencies from the specified extra name; may be provided more than once.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
group Value

Install the specified dependency group from a pylock.toml or pyproject.toml.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Value

Don't install pre-built wheels.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_deps Flag

Ignore package dependencies, instead only installing those packages explicitly listed on the command line or in the requirements files.

...
no_editable Flag

Install any editable dependencies as non-editable.

...
no_editable_package Value

Install the specified editable packages as non-editable.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_verify_hashes Flag

Disable validation of hashes in the requirements file.

...
offline Flag

Disable network access.

...
only_binary Value

Only use pre-built wheels; don't build source distributions.

...
overrides Value

Override versions using the given requirements files.

...
prefix Value

Install packages into lib, bin, and other top-level folders under the specified directory, as if a virtual environment were present at that location.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter into which packages should be installed.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be installed.

...
python_version Value

The minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
require_hashes Flag

Require a matching hash for each requirement.

...
requirements Value

Install the packages listed in the given files.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
strict Flag

Validate the Python environment after completing the installation, to detect packages with missing dependencies or other issues.

...
system Flag

Install packages into the system Python environment.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
target Value

Install packages into the specified directory, rather than into the virtual or system Python environment.

...
torch_backend TorchBackend | Sequence[TorchBackend] | None

The backend to use when fetching packages in the PyTorch ecosystem (e.g., cpu, cu126, or auto).

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

List

Bases: Tool[_R3]

__call__
__call__(
    *,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    cert: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    editable: Flag = ...,
    exclude: Value = ...,
    exclude_editable: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    format: Format3 | Sequence[Format3] | None = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    managed_python: Flag = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    offline: Flag = ...,
    outdated: Flag = ...,
    prefix: Value = ...,
    project: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    strict: Flag = ...,
    system: Flag = ...,
    system_certs: Flag = ...,
    target: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R3

List, in tabular format, packages installed in an environment

Parameters:

Name Type Description Default
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
cert Value

Path to a PEM-encoded CA certificate bundle. Added in 0.12.0.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
editable Flag

Only include editable projects.

...
exclude Value

Exclude the specified package(s) from the output.

...
exclude_editable Flag

Exclude any editable packages from output.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date. Added in 0.11.33.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
format Format3 | Sequence[Format3] | None

Select the output format. Defaults to columns.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
offline Flag

Disable network access.

...
outdated Flag

List outdated packages.

...
prefix Value

List packages from the specified --prefix directory.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter for which packages should be listed.

...
quiet Flag

Use quiet output.

...
strict Flag

Validate the Python environment, to detect packages with missing dependencies and other issues.

...
system Flag

List packages in the system Python environment.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
target Value

List packages from the specified --target directory.

...
verbose Flag

Use verbose output.

...

Sync

Bases: Tool[_R3]

__call__
__call__(
    *args: str | PathLike[str],
    all_extras: Flag = ...,
    allow_empty_requirements: Flag = ...,
    allow_insecure_host: Value = ...,
    break_system_packages: Flag = ...,
    build_constraints: Value = ...,
    cache_dir: Value = ...,
    cert: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    constraints: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    dry_run: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_binary: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_cache: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_verify_hashes: Flag = ...,
    offline: Flag = ...,
    only_binary: Value = ...,
    prefix: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    python_version: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    require_hashes: Flag = ...,
    strict: Flag = ...,
    system: Flag = ...,
    system_certs: Flag = ...,
    target: Value = ...,
    torch_backend: TorchBackend
    | Sequence[TorchBackend]
    | None = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R3

Sync an environment with a requirements.txt or pylock.toml file

Parameters:

Name Type Description Default
all_extras Flag

Include all optional dependencies.

...
allow_empty_requirements Flag

Allow sync of empty requirements, which will clear the environment of all packages. allow_empty_requirements=off emits --no-allow-empty-requirements.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
break_system_packages Flag

Allow uv to modify an EXTERNALLY-MANAGED Python installation. break_system_packages=off emits --no-break-system-packages.

...
build_constraints Value

Constrain build dependencies using the given requirements files when building source distributions.

...
cache_dir Value

Path to the cache directory.

...
cert Value

Path to a PEM-encoded CA certificate bundle. Added in 0.12.0.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
constraints Value

Constrain versions using the given requirements files.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
dry_run Flag

Perform a dry run, i.e., don't actually install anything but resolve the dependencies and print the resulting plan.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra Value

Include optional dependencies from the specified extra name; may be provided more than once.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
group Value

Install the specified dependency group from a pylock.toml or pyproject.toml.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Value

Don't install pre-built wheels.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_verify_hashes Flag

Disable validation of hashes in the requirements file.

...
offline Flag

Disable network access.

...
only_binary Value

Only use pre-built wheels; don't build source distributions.

...
prefix Value

Install packages into lib, bin, and other top-level folders under the specified directory, as if a virtual environment were present at that location.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter into which packages should be installed.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be installed.

...
python_version Value

The minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
require_hashes Flag

Require a matching hash for each requirement.

...
strict Flag

Validate the Python environment after completing the installation, to detect packages with missing dependencies or other issues.

...
system Flag

Install packages into the system Python environment.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
target Value

Install packages into the specified directory, rather than into the virtual or system Python environment.

...
torch_backend TorchBackend | Sequence[TorchBackend] | None

The backend to use when fetching packages in the PyTorch ecosystem (e.g., cpu, cu126, or auto).

...
verbose Flag

Use verbose output.

...

flags

flags(**flags: Any) -> Self

Bind tool-level global options before the subcommand.

tools.docker.flags(host=...) puts a tool's own options ahead of the verb, where they belong.

Publish

Bases: Tool[_R2]

__call__

__call__(
    *args: str | PathLike[str],
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    check_url: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    directory: Value = ...,
    dry_run: Flag = ...,
    index: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    managed_python: Flag = ...,
    no_attestations: Flag = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    offline: Flag = ...,
    password: Value = ...,
    project: Value = ...,
    publish_url: Value = ...,
    quiet: Flag = ...,
    system_certs: Flag = ...,
    token: Value = ...,
    trusted_publishing: TrustedPublishing
    | Sequence[TrustedPublishing]
    | None = ...,
    username: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Upload distributions to an index

Parameters:

Name Type Description Default
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
check_url Value

Check an index URL for existing files to skip duplicate uploads.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
directory Value

Change to the given directory prior to running the command.

...
dry_run Flag

Perform a dry run without uploading files.

...
index Value

The name of an index in the configuration to use for publishing.

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for remote requirements files.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_attestations Flag

Do not upload attestations for the published files.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
offline Flag

Disable network access.

...
password Value

The password for the upload.

...
project Value

Discover a project in the given directory.

...
publish_url Value

The URL of the upload endpoint (not the index URL).

...
quiet Flag

Use quiet output.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
token Value

The token for the upload.

...
trusted_publishing TrustedPublishing | Sequence[TrustedPublishing] | None

Configure trusted publishing.

...
username Value

The username for the upload.

...
verbose Flag

Use verbose output.

...

Remove

Bases: Tool[_R2]

__call__

__call__(
    *args: str | PathLike[str],
    active: Flag = ...,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    dev: Flag = ...,
    directory: Value = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    frozen: Flag = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    locked: Flag = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_sync: Flag = ...,
    offline: Flag = ...,
    optional: Value = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    script: Value = ...,
    system_certs: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Remove dependencies from the project

Parameters:

Name Type Description Default
active Flag

Prefer the active virtual environment over the project's virtual environment.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
dev Flag

Remove the packages from the development dependency group.

...
directory Value

Change to the given directory prior to running the command.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
frozen Flag

Remove dependencies without re-locking the project.

...
group Value

Remove the packages from the specified dependency group.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
locked Flag

Assert that the uv.lock will remain unchanged.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_sync Flag

Avoid syncing the virtual environment after re-locking the project.

...
offline Flag

Disable network access.

...
optional Value

Remove the packages from the project's optional dependencies for the specified extra.

...
package Value

Remove the dependencies from a specific package in the workspace.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use for resolving and syncing.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
script Value

Remove the dependency from the specified Python script, rather than from a project.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

Run

Bases: Tool[_R2]

__call__

__call__(
    *args: str | PathLike[str],
    active: Flag = ...,
    all_extras: Flag = ...,
    all_groups: Flag = ...,
    all_packages: Flag = ...,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    env_file: Value = ...,
    exact: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    frozen: Flag = ...,
    group: Value = ...,
    gui_script: Flag = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    isolated: Flag = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    locked: Flag = ...,
    managed_python: Flag = ...,
    module: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_default_groups: Flag = ...,
    no_dev: Flag = ...,
    no_editable: Flag = ...,
    no_editable_package: Value = ...,
    no_env_file: Flag = ...,
    no_extra: Value = ...,
    no_group: Value = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_project: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_sync: Flag = ...,
    offline: Flag = ...,
    only_dev: Flag = ...,
    only_group: Value = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    script: Flag = ...,
    system_certs: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    with_: Value = ...,
    with_editable: Value = ...,
    with_requirements: Value = ...,
    **flags: Any,
) -> _R2

Run a command or script

Parameters:

Name Type Description Default
active Flag

Prefer the active virtual environment over the project's virtual environment.

...
all_extras Flag

Include all optional dependencies.

...
all_groups Flag

Include dependencies from all dependency groups.

...
all_packages Flag

Run the command with all workspace members installed.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
env_file Value

Load environment variables from a .env file.

...
exact Flag

Perform an exact sync, removing extraneous packages.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra Value

Include optional dependencies from the specified extra name.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
frozen Flag

Run without updating the uv.lock file.

...
group Value

Include dependencies from the specified dependency group.

...
gui_script Flag

Run the given path as a Python GUI script.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
isolated Flag

Run the command in an isolated virtual environment.

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
locked Flag

Assert that the uv.lock will remain unchanged.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
module Flag

Run a Python module.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_default_groups Flag

Ignore the default dependency groups.

...
no_dev Flag

Disable the development dependency group.

...
no_editable Flag

Install any editable dependencies, including the project and any workspace members, as non-editable.

...
no_editable_package Value

Install the specified editable packages as non-editable.

...
no_env_file Flag

Avoid reading environment variables from a .env file.

...
no_extra Value

Exclude the specified optional dependencies, if --all-extras is supplied.

...
no_group Value

Disable the specified dependency group.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_project Flag

Avoid discovering the project or workspace.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_sync Flag

Avoid syncing the virtual environment.

...
offline Flag

Disable network access.

...
only_dev Flag

Only include the development dependency group.

...
only_group Value

Only include dependencies from the specified dependency group.

...
package Value

Run the command in a specific package in the workspace.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use for the run environment.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be installed.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
script Flag

Run the given path as a Python script.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...
with_ Value

Run with the given packages installed.

...
with_editable Value

Run with the given packages installed in editable mode.

...
with_requirements Value

Run with the packages listed in the given files.

...

Sync

Bases: Tool[_R2]

__call__

__call__(
    *,
    active: Flag = ...,
    all_extras: Flag = ...,
    all_groups: Flag = ...,
    all_packages: Flag = ...,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    check: Flag = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    dry_run: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    frozen: Flag = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    inexact: Flag = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    locked: Flag = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_default_groups: Flag = ...,
    no_dev: Flag = ...,
    no_editable: Flag = ...,
    no_editable_package: Value = ...,
    no_extra: Value = ...,
    no_group: Value = ...,
    no_index: Flag = ...,
    no_install_local: Flag = ...,
    no_install_package: Value = ...,
    no_install_project: Flag = ...,
    no_install_workspace: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    offline: Flag = ...,
    only_dev: Flag = ...,
    only_group: Value = ...,
    output_format: OutputFormat
    | Sequence[OutputFormat]
    | None = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    script: Value = ...,
    system_certs: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Update the project's environment

Parameters:

Name Type Description Default
active Flag

Sync dependencies to the active virtual environment.

...
all_extras Flag

Include all optional dependencies.

...
all_groups Flag

Include dependencies from all dependency groups.

...
all_packages Flag

Sync all packages in the workspace.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
check Flag

Check if the Python environment is synchronized with the project.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
dry_run Flag

Perform a dry run, without writing the lockfile or modifying the project environment.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra Value

Include optional dependencies from the specified extra name.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
frozen Flag

Sync without updating the uv.lock file.

...
group Value

Include dependencies from the specified dependency group.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
inexact Flag

Do not remove extraneous packages present in the environment.

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
locked Flag

Assert that the uv.lock will remain unchanged.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_default_groups Flag

Ignore the default dependency groups.

...
no_dev Flag

Disable the development dependency group.

...
no_editable Flag

Install any editable dependencies, including the project and any workspace members, as non-editable.

...
no_editable_package Value

Install the specified editable packages as non-editable.

...
no_extra Value

Exclude the specified optional dependencies, if --all-extras is supplied.

...
no_group Value

Disable the specified dependency group.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_install_local Flag

Do not install local path dependencies.

...
no_install_package Value

Do not install the given package(s).

...
no_install_project Flag

Do not install the current project.

...
no_install_workspace Flag

Do not install any workspace members, including the root project.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
offline Flag

Disable network access.

...
only_dev Flag

Only include the development dependency group.

...
only_group Value

Only include dependencies from the specified dependency group.

...
output_format OutputFormat | Sequence[OutputFormat] | None

Select the output format. Defaults to text.

...
package Value

Sync for specific packages in the workspace.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use for the project environment.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be installed.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
script Value

Sync the environment for a Python script, rather than the current project.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

Tool

Bases: Tool[_R2]

Install

Bases: Tool[_R3]

__call__
__call__(
    package: str | PathLike[str],
    /,
    *args: str | PathLike[str],
    allow_insecure_host: Value = ...,
    build_constraints: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    constraints: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    editable: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    excludes: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    force: Flag = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    lfs: Flag = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    offline: Flag = ...,
    overrides: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    system_certs: Flag = ...,
    torch_backend: TorchBackend
    | Sequence[TorchBackend]
    | None = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    with_: Value = ...,
    with_editable: Value = ...,
    with_executables_from: Value = ...,
    with_requirements: Value = ...,
    **flags: Any,
) -> _R3

Install commands provided by a Python package

Parameters:

Name Type Description Default
allow_insecure_host Value

Allow insecure connections to a host.

...
build_constraints Value

Constrain build dependencies using the given requirements files when building source distributions.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
constraints Value

Constrain versions using the given requirements files.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
editable Flag

Install the target package in editable mode, such that changes in the package's source directory are reflected without reinstallation.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
excludes Value

Exclude packages from resolution using the given requirements files.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
force Flag

Force installation of the tool.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
lfs Flag

Whether to use Git LFS when adding a dependency from Git.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
offline Flag

Disable network access.

...
overrides Value

Override versions using the given requirements files.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use to build the tool environment.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be installed.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
torch_backend TorchBackend | Sequence[TorchBackend] | None

The backend to use when fetching packages in the PyTorch ecosystem (e.g., cpu, cu126, or auto).

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...
with_ Value

Include the following additional requirements.

...
with_editable Value

Include the given packages in editable mode.

...
with_executables_from Value

Install executables from the following packages.

...
with_requirements Value

Run with the packages listed in the given files.

...

Run

Bases: Tool[_R3]

__call__
__call__(
    *args: str | PathLike[str],
    allow_insecure_host: Value = ...,
    build_constraints: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    constraints: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    env_file: Value = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    from_: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    isolated: Flag = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    lfs: Flag = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_env_file: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    offline: Flag = ...,
    overrides: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    system_certs: Flag = ...,
    torch_backend: TorchBackend
    | Sequence[TorchBackend]
    | None = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    with_: Value = ...,
    with_editable: Value = ...,
    with_requirements: Value = ...,
    **flags: Any,
) -> _R3

Run a command provided by a Python package

Parameters:

Name Type Description Default
allow_insecure_host Value

Allow insecure connections to a host.

...
build_constraints Value

Constrain build dependencies using the given requirements files when building source distributions.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
constraints Value

Constrain versions using the given requirements files.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
env_file Value

Load environment variables from a .env file.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
from_ Value

Use the given package to provide the command.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
isolated Flag

Run the tool in an isolated virtual environment, ignoring any already-installed tools.

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
lfs Flag

Whether to use Git LFS when adding a dependency from Git.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_env_file Flag

Avoid reading environment variables from a .env file.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
offline Flag

Disable network access.

...
overrides Value

Override versions using the given requirements files.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use to build the run environment.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be installed.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
torch_backend TorchBackend | Sequence[TorchBackend] | None

The backend to use when fetching packages in the PyTorch ecosystem (e.g., cpu, cu126, or auto).

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...
with_ Value

Run with the given packages installed.

...
with_editable Value

Run with the given packages installed in editable mode.

...
with_requirements Value

Run with the packages listed in the given files.

...

Upgrade

Bases: Tool[_R3]

__call__
__call__(
    *args: str | PathLike[str],
    all: Flag = ...,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_setting_package: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    offline: Flag = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    quiet: Flag = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    system_certs: Flag = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R3

Upgrade installed tools

Parameters:

Name Type Description Default
all Flag

Upgrade all tools.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_setting_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
offline Flag

Disable network access.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

Upgrade a tool, and specify it to use the given Python interpreter to build its environment.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform for which requirements should be installed.

...
quiet Flag

Use quiet output.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
verbose Flag

Use verbose output.

...

flags

flags(**flags: Any) -> Self

Bind tool-level global options before the subcommand.

tools.docker.flags(host=...) puts a tool's own options ahead of the verb, where they belong.

Tree

Bases: Tool[_R2]

__call__

__call__(
    *,
    all_groups: Flag = ...,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    depth: Value = ...,
    directory: Value = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    format: Format4 | Sequence[Format4] | None = ...,
    frozen: Flag = ...,
    group: Value = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    invert: Flag = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    locked: Flag = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_dedupe: Flag = ...,
    no_default_groups: Flag = ...,
    no_dev: Flag = ...,
    no_group: Value = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    offline: Flag = ...,
    only_dev: Flag = ...,
    only_group: Value = ...,
    outdated: Flag = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    prune: Value = ...,
    python: Value = ...,
    python_platform: PythonPlatform
    | Sequence[PythonPlatform]
    | None = ...,
    python_version: Value = ...,
    quiet: Flag = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    script: Value = ...,
    show_sizes: Flag = ...,
    system_certs: Flag = ...,
    universal: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Display the project's dependency tree

Parameters:

Name Type Description Default
all_groups Flag

Include dependencies from all dependency groups.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
depth Value

Maximum display depth of the dependency tree. Defaults to 255.

...
directory Value

Change to the given directory prior to running the command.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
format Format4 | Sequence[Format4] | None

The format in which to display the dependency graph. Defaults to text. Added in 0.11.29.

...
frozen Flag

Display the requirements without locking the project.

...
group Value

Include dependencies from the specified dependency group.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
invert Flag

Show the reverse dependencies for the given package.

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
locked Flag

Assert that the uv.lock will remain unchanged.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_dedupe Flag

Do not de-duplicate repeated dependencies.

...
no_default_groups Flag

Ignore the default dependency groups.

...
no_dev Flag

Disable the development dependency group.

...
no_group Value

Disable the specified dependency group.

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
offline Flag

Disable network access.

...
only_dev Flag

Only include the development dependency group.

...
only_group Value

Only include dependencies from the specified dependency group.

...
outdated Flag

Show the latest available version of each package in the tree.

...
package Value

Display only the specified packages.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
prune Value

Prune the given package from the display of the dependency tree.

...
python Value

The Python interpreter to use for locking and filtering.

...
python_platform PythonPlatform | Sequence[PythonPlatform] | None

The platform to use when filtering the tree.

...
python_version Value

The Python version to use when filtering the tree.

...
quiet Flag

Use quiet output.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
script Value

Show the dependency tree the specified PEP 723 Python script, rather than the current project.

...
show_sizes Flag

Show compressed wheel sizes for packages in the tree.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
universal Flag

Show a platform-independent dependency tree.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

Venv

Bases: Tool[_R2]

__call__

__call__(
    *args: str | PathLike[str],
    allow_existing: Flag = ...,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    clear: Flag = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    force: Flag = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    managed_python: Flag = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_project: Flag = ...,
    no_python_downloads: Flag = ...,
    offline: Flag = ...,
    project: Value = ...,
    prompt: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    relocatable: Flag = ...,
    seed: Flag = ...,
    system_certs: Flag = ...,
    system_site_packages: Flag = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Create a virtual environment

Parameters:

Name Type Description Default
allow_existing Flag

Preserve any existing files or directories at the target path.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
clear Flag

Remove any existing files or directories at the target path.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
force Flag

Allow --clear to remove a non-virtual environment directory.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_project Flag

Avoid discovering a project or workspace.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
offline Flag

Disable network access.

...
project Value

Discover a project in the given directory.

...
prompt Value

Provide an alternative prompt prefix for the virtual environment.

...
python Value

The Python interpreter to use for the virtual environment.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
relocatable Flag

Make the virtual environment relocatable.

...
seed Flag

Install seed packages (one or more of: pip, setuptools, and wheel) into the virtual environment.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
system_site_packages Flag

Give the virtual environment access to the system site packages directory.

...
verbose Flag

Use verbose output.

...

Version

Bases: Tool[_R2]

__call__

__call__(
    *args: str | PathLike[str],
    active: Flag = ...,
    allow_insecure_host: Value = ...,
    bump: Bump | Sequence[Bump] | None = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    compile_bytecode: Flag = ...,
    config_file: Value = ...,
    config_setting: Value = ...,
    config_settings_package: Value = ...,
    default_index: Value = ...,
    directory: Value = ...,
    dry_run: Flag = ...,
    exclude_newer: Value = ...,
    exclude_newer_package: Value = ...,
    extra_index_url: Value = ...,
    find_links: Value = ...,
    fork_strategy: ForkStrategy
    | Sequence[ForkStrategy]
    | None = ...,
    frozen: Flag = ...,
    index: Value = ...,
    index_strategy: IndexStrategy
    | Sequence[IndexStrategy]
    | None = ...,
    index_url: Value = ...,
    keyring_provider: KeyringProvider
    | Sequence[KeyringProvider]
    | None = ...,
    link_mode: LinkMode | Sequence[LinkMode] | None = ...,
    locked: Flag = ...,
    managed_python: Flag = ...,
    no_binary: Flag = ...,
    no_binary_package: Value = ...,
    no_build: Flag = ...,
    no_build_isolation: Flag = ...,
    no_build_isolation_package: Value = ...,
    no_build_package: Value = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_index: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    no_sources: Flag = ...,
    no_sources_package: Value = ...,
    no_sync: Flag = ...,
    offline: Flag = ...,
    output_format: OutputFormat
    | Sequence[OutputFormat]
    | None = ...,
    package: Value = ...,
    prerelease: Prerelease
    | Sequence[Prerelease]
    | None = ...,
    prerelease_package: Value = ...,
    project: Value = ...,
    python: Value = ...,
    quiet: Flag = ...,
    refresh: Flag = ...,
    refresh_package: Value = ...,
    reinstall: Flag = ...,
    reinstall_package: Value = ...,
    resolution: Resolution
    | Sequence[Resolution]
    | None = ...,
    short: Flag = ...,
    system_certs: Flag = ...,
    upgrade: Flag = ...,
    upgrade_group: Value = ...,
    upgrade_package: Value = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R2

Read or update the project's version

Parameters:

Name Type Description Default
active Flag

Prefer the active virtual environment over the project's virtual environment.

...
allow_insecure_host Value

Allow insecure connections to a host.

...
bump Bump | Sequence[Bump] | None

Update the project version using the given semantics.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
compile_bytecode Flag

Compile Python files to bytecode after installation.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
config_setting Value

Settings to pass to the PEP 517 build backend, specified as KEY=VALUE pairs.

...
config_settings_package Value

Settings to pass to the PEP 517 build backend for a specific package, specified as PACKAGE:KEY=VALUE pairs.

...
default_index Value

The default package index (by default: https://pypi.org/simple).

...
directory Value

Change to the given directory prior to running the command.

...
dry_run Flag

Don't write a new version to the pyproject.toml.

...
exclude_newer Value

Limit candidate packages to those that were uploaded prior to the given date.

...
exclude_newer_package Value

Limit candidate packages for specific packages to those that were uploaded prior to the given date.

...
extra_index_url Value

(Deprecated: use --index instead) Extra URLs of package indexes to use, in addition to --index-url.

...
find_links Value

Locations to search for candidate distributions, in addition to those found in the registry indexes.

...
fork_strategy ForkStrategy | Sequence[ForkStrategy] | None

The strategy to use when selecting multiple versions of a given package across Python versions and platforms.

...
frozen Flag

Update the version without re-locking the project.

...
index Value

The indexes to use when resolving dependencies, in addition to the default index.

...
index_strategy IndexStrategy | Sequence[IndexStrategy] | None

The strategy to use when resolving against multiple index URLs.

...
index_url Value

(Deprecated: use --default-index instead) The URL of the Python package index (by default: https://pypi.org/simple).

...
keyring_provider KeyringProvider | Sequence[KeyringProvider] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode LinkMode | Sequence[LinkMode] | None

The method to use when installing packages from the global cache.

...
locked Flag

Assert that the uv.lock will remain unchanged.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_binary Flag

Don't install pre-built wheels.

...
no_binary_package Value

Don't install pre-built wheels for a specific package.

...
no_build Flag

Don't build source distributions.

...
no_build_isolation Flag

Disable isolation when building source distributions.

...
no_build_isolation_package Value

Disable isolation when building source distributions for a specific package.

...
no_build_package Value

Don't build source distributions for a specific package.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_index Flag

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links.

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
no_sources Flag

Ignore the tool.uv.sources table when resolving dependencies.

...
no_sources_package Value

Don't use sources from the tool.uv.sources table for the specified packages.

...
no_sync Flag

Avoid syncing the virtual environment after re-locking the project.

...
offline Flag

Disable network access.

...
output_format OutputFormat | Sequence[OutputFormat] | None

The format of the output. Defaults to text.

...
package Value

Update the version of a specific package in the workspace.

...
prerelease Prerelease | Sequence[Prerelease] | None

The strategy to use when considering pre-release versions.

...
prerelease_package Value

The strategy to use when considering pre-release versions for a specific package. Added in 0.12.1.

...
project Value

Discover a project in the given directory.

...
python Value

The Python interpreter to use for resolving and syncing.

...
quiet Flag

Use quiet output.

...
refresh Flag

Refresh all cached data.

...
refresh_package Value

Refresh cached data for a specific package.

...
reinstall Flag

Reinstall all packages, regardless of whether they're already installed.

...
reinstall_package Value

Reinstall a specific package, regardless of whether it's already installed.

...
resolution Resolution | Sequence[Resolution] | None

The strategy to use when selecting between the different compatible versions for a given package requirement.

...
short Flag

Only show the version.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
upgrade Flag

Allow package upgrades, ignoring pinned versions in any existing output file.

...
upgrade_group Value

Allow upgrades for all packages in a dependency group, ignoring pinned versions in any existing output file.

...
upgrade_package Value

Allow upgrades for a specific package, ignoring pinned versions in any existing output file.

...
verbose Flag

Use verbose output.

...

__call__

__call__(
    *args: str | PathLike[str],
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    directory: Value = ...,
    managed_python: Flag = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    offline: Flag = ...,
    project: Value = ...,
    quiet: Flag = ...,
    system_certs: Flag = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> _R

An extremely fast Python package manager.

Parameters:

Name Type Description Default
allow_insecure_host Value

Allow insecure connections to a host.

...
cache_dir Value

Path to the cache directory.

...
color Color | Sequence[Color] | None

Control the use of color in output.

...
config_file Value

The path to a uv.toml file to use for configuration.

...
directory Value

Change to the given directory prior to running the command.

...
managed_python Flag

Require use of uv-managed Python versions. managed_python=off emits --no-managed-python.

...
no_cache Flag

Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation.

...
no_config Flag

Avoid discovering configuration files (pyproject.toml, uv.toml).

...
no_progress Flag

Hide all progress outputs.

...
no_python_downloads Flag

Disable automatic downloads of Python.

...
offline Flag

Disable network access.

...
project Value

Discover a project in the given directory.

...
quiet Flag

Use quiet output.

...
system_certs Flag

Whether to load TLS certificates from the platform's native certificate store.

...
verbose Flag

Use verbose output.

...

flags

flags(
    *,
    allow_insecure_host: Value = ...,
    cache_dir: Value = ...,
    color: Color | Sequence[Color] | None = ...,
    config_file: Value = ...,
    directory: Value = ...,
    managed_python: Flag = ...,
    no_cache: Flag = ...,
    no_config: Flag = ...,
    no_progress: Flag = ...,
    no_python_downloads: Flag = ...,
    offline: Flag = ...,
    project: Value = ...,
    quiet: Flag = ...,
    system_certs: Flag = ...,
    verbose: Flag = ...,
    **flags: Any,
) -> Self

Bind tool-level global options before the subcommand.

tools.docker.flags(host=...) puts a tool's own options ahead of the verb, where they belong.