Skip to content

uv

uv documentation

footman._stubs.uv.Uv

Bases: Tool

__call__

__call__(
    *args: str,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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.

...

add

add(
    *args: str,
    active: _Flag = ...,
    allow_insecure_host: _Value = ...,
    bounds: Literal["lower", "major", "minor", "exact"]
    | Sequence[Literal["lower", "major", "minor", "exact"]]
    | None = ...,
    branch: _Value = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    frozen: _Flag = ...,
    group: _Value = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    lfs: _Flag = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    python: _Value = ...,
    quiet: _Flag = ...,
    raw: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    reinstall: _Flag = ...,
    reinstall_package: _Value = ...,
    requirements: _Value = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    rev: _Value = ...,
    script: _Value = ...,
    system_certs: _Flag = ...,
    tag: _Value = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    workspace: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['lower', 'major', 'minor', 'exact'] | Sequence[Literal['lower', 'major', 'minor', 'exact']] | 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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | 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 URLs to use when resolving dependencies, in addition to the default index.

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | 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 Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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

build(
    *args: str,
    all_packages: _Flag = ...,
    allow_insecure_host: _Value = ...,
    build_constraints: _Value = ...,
    cache_dir: _Value = ...,
    clear: _Flag = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    python: _Value = ...,
    quiet: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    require_hashes: _Flag = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    sdist: _Flag = ...,
    system_certs: _Flag = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    wheel: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | None

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

...
index _Value

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

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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

export(
    *,
    all_extras: _Flag = ...,
    all_groups: _Flag = ...,
    all_packages: _Flag = ...,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    format: Literal[
        "requirements.txt", "pylock.toml", "cyclonedx1.5"
    ]
    | Sequence[
        Literal[
            "requirements.txt",
            "pylock.toml",
            "cyclonedx1.5",
        ]
    ]
    | None = ...,
    frozen: _Flag = ...,
    group: _Value = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    prune: _Value = ...,
    python: _Value = ...,
    quiet: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    script: _Value = ...,
    system_certs: _Flag = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | None

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

...
format Literal['requirements.txt', 'pylock.toml', 'cyclonedx1.5'] | Sequence[Literal['requirements.txt', 'pylock.toml', 'cyclonedx1.5']] | 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 URLs to use when resolving dependencies, in addition to the default index.

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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.

...

flags

flags(
    *,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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,
) -> Uv

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.

lock

lock(
    *,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    check: _Flag = ...,
    check_exists: _Flag = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    python: _Value = ...,
    quiet: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    script: _Value = ...,
    system_certs: _Flag = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | None

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

...
index _Value

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

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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.

...

publish

publish(
    *args: str,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    check_url: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | None = ...,
    config_file: _Value = ...,
    directory: _Value = ...,
    dry_run: _Flag = ...,
    index: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | 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: Literal[
        "automatic", "always", "never"
    ]
    | Sequence[Literal["automatic", "always", "never"]]
    | None = ...,
    username: _Value = ...,
    verbose: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | 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 Literal['automatic', 'always', 'never'] | Sequence[Literal['automatic', 'always', 'never']] | None

Configure trusted publishing.

...
username _Value

The username for the upload.

...
verbose _Flag

Use verbose output.

...

remove

remove(
    *args: str,
    active: _Flag = ...,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    frozen: _Flag = ...,
    group: _Value = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    python: _Value = ...,
    quiet: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    reinstall: _Flag = ...,
    reinstall_package: _Value = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    script: _Value = ...,
    system_certs: _Flag = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | 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 URLs to use when resolving dependencies, in addition to the default index.

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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

run(
    *args: str,
    active: _Flag = ...,
    all_extras: _Flag = ...,
    all_groups: _Flag = ...,
    all_packages: _Flag = ...,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    frozen: _Flag = ...,
    group: _Value = ...,
    gui_script: _Flag = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    isolated: _Flag = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    python: _Value = ...,
    python_platform: Literal[
        "windows",
        "linux",
        "macos",
        "x86_64-pc-windows-msvc",
        "aarch64-pc-windows-msvc",
        "i686-pc-windows-msvc",
        "x86_64-unknown-linux-gnu",
        "aarch64-apple-darwin",
        "x86_64-apple-darwin",
        "aarch64-unknown-linux-gnu",
        "aarch64-unknown-linux-musl",
        "x86_64-unknown-linux-musl",
        "riscv64-unknown-linux",
        "x86_64-manylinux2014",
        "x86_64-manylinux_2_17",
        "x86_64-manylinux_2_28",
        "x86_64-manylinux_2_31",
        "x86_64-manylinux_2_32",
        "x86_64-manylinux_2_33",
        "x86_64-manylinux_2_34",
        "x86_64-manylinux_2_35",
        "x86_64-manylinux_2_36",
        "x86_64-manylinux_2_37",
        "x86_64-manylinux_2_38",
        "x86_64-manylinux_2_39",
        "x86_64-manylinux_2_40",
        "aarch64-manylinux2014",
        "aarch64-manylinux_2_17",
        "aarch64-manylinux_2_28",
        "aarch64-manylinux_2_31",
        "aarch64-manylinux_2_32",
        "aarch64-manylinux_2_33",
        "aarch64-manylinux_2_34",
        "aarch64-manylinux_2_35",
        "aarch64-manylinux_2_36",
        "aarch64-manylinux_2_37",
        "aarch64-manylinux_2_38",
        "aarch64-manylinux_2_39",
        "aarch64-manylinux_2_40",
        "aarch64-linux-android",
        "x86_64-linux-android",
        "wasm32-pyodide2024",
        "wasm32-pyodide2025",
        "arm64-apple-ios",
        "arm64-apple-ios-simulator",
        "x86_64-apple-ios-simulator",
    ]
    | Sequence[
        Literal[
            "windows",
            "linux",
            "macos",
            "x86_64-pc-windows-msvc",
            "aarch64-pc-windows-msvc",
            "i686-pc-windows-msvc",
            "x86_64-unknown-linux-gnu",
            "aarch64-apple-darwin",
            "x86_64-apple-darwin",
            "aarch64-unknown-linux-gnu",
            "aarch64-unknown-linux-musl",
            "x86_64-unknown-linux-musl",
            "riscv64-unknown-linux",
            "x86_64-manylinux2014",
            "x86_64-manylinux_2_17",
            "x86_64-manylinux_2_28",
            "x86_64-manylinux_2_31",
            "x86_64-manylinux_2_32",
            "x86_64-manylinux_2_33",
            "x86_64-manylinux_2_34",
            "x86_64-manylinux_2_35",
            "x86_64-manylinux_2_36",
            "x86_64-manylinux_2_37",
            "x86_64-manylinux_2_38",
            "x86_64-manylinux_2_39",
            "x86_64-manylinux_2_40",
            "aarch64-manylinux2014",
            "aarch64-manylinux_2_17",
            "aarch64-manylinux_2_28",
            "aarch64-manylinux_2_31",
            "aarch64-manylinux_2_32",
            "aarch64-manylinux_2_33",
            "aarch64-manylinux_2_34",
            "aarch64-manylinux_2_35",
            "aarch64-manylinux_2_36",
            "aarch64-manylinux_2_37",
            "aarch64-manylinux_2_38",
            "aarch64-manylinux_2_39",
            "aarch64-manylinux_2_40",
            "aarch64-linux-android",
            "x86_64-linux-android",
            "wasm32-pyodide2024",
            "wasm32-pyodide2025",
            "arm64-apple-ios",
            "arm64-apple-ios-simulator",
            "x86_64-apple-ios-simulator",
        ]
    ]
    | None = ...,
    quiet: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    reinstall: _Flag = ...,
    reinstall_package: _Value = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | 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,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | 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 URLs to use when resolving dependencies, in addition to the default index.

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
project _Value

Discover a project in the given directory.

...
python _Value

The Python interpreter to use for the run environment.

...
python_platform Literal['windows', 'linux', 'macos', 'x86_64-pc-windows-msvc', 'aarch64-pc-windows-msvc', 'i686-pc-windows-msvc', 'x86_64-unknown-linux-gnu', 'aarch64-apple-darwin', 'x86_64-apple-darwin', 'aarch64-unknown-linux-gnu', 'aarch64-unknown-linux-musl', 'x86_64-unknown-linux-musl', 'riscv64-unknown-linux', 'x86_64-manylinux2014', 'x86_64-manylinux_2_17', 'x86_64-manylinux_2_28', 'x86_64-manylinux_2_31', 'x86_64-manylinux_2_32', 'x86_64-manylinux_2_33', 'x86_64-manylinux_2_34', 'x86_64-manylinux_2_35', 'x86_64-manylinux_2_36', 'x86_64-manylinux_2_37', 'x86_64-manylinux_2_38', 'x86_64-manylinux_2_39', 'x86_64-manylinux_2_40', 'aarch64-manylinux2014', 'aarch64-manylinux_2_17', 'aarch64-manylinux_2_28', 'aarch64-manylinux_2_31', 'aarch64-manylinux_2_32', 'aarch64-manylinux_2_33', 'aarch64-manylinux_2_34', 'aarch64-manylinux_2_35', 'aarch64-manylinux_2_36', 'aarch64-manylinux_2_37', 'aarch64-manylinux_2_38', 'aarch64-manylinux_2_39', 'aarch64-manylinux_2_40', 'aarch64-linux-android', 'x86_64-linux-android', 'wasm32-pyodide2024', 'wasm32-pyodide2025', 'arm64-apple-ios', 'arm64-apple-ios-simulator', 'x86_64-apple-ios-simulator'] | Sequence[Literal['windows', 'linux', 'macos', 'x86_64-pc-windows-msvc', 'aarch64-pc-windows-msvc', 'i686-pc-windows-msvc', 'x86_64-unknown-linux-gnu', 'aarch64-apple-darwin', 'x86_64-apple-darwin', 'aarch64-unknown-linux-gnu', 'aarch64-unknown-linux-musl', 'x86_64-unknown-linux-musl', 'riscv64-unknown-linux', 'x86_64-manylinux2014', 'x86_64-manylinux_2_17', 'x86_64-manylinux_2_28', 'x86_64-manylinux_2_31', 'x86_64-manylinux_2_32', 'x86_64-manylinux_2_33', 'x86_64-manylinux_2_34', 'x86_64-manylinux_2_35', 'x86_64-manylinux_2_36', 'x86_64-manylinux_2_37', 'x86_64-manylinux_2_38', 'x86_64-manylinux_2_39', 'x86_64-manylinux_2_40', 'aarch64-manylinux2014', 'aarch64-manylinux_2_17', 'aarch64-manylinux_2_28', 'aarch64-manylinux_2_31', 'aarch64-manylinux_2_32', 'aarch64-manylinux_2_33', 'aarch64-manylinux_2_34', 'aarch64-manylinux_2_35', 'aarch64-manylinux_2_36', 'aarch64-manylinux_2_37', 'aarch64-manylinux_2_38', 'aarch64-manylinux_2_39', 'aarch64-manylinux_2_40', 'aarch64-linux-android', 'x86_64-linux-android', 'wasm32-pyodide2024', 'wasm32-pyodide2025', 'arm64-apple-ios', 'arm64-apple-ios-simulator', 'x86_64-apple-ios-simulator']] | 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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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

sync(
    *,
    active: _Flag = ...,
    all_extras: _Flag = ...,
    all_groups: _Flag = ...,
    all_packages: _Flag = ...,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    check: _Flag = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    frozen: _Flag = ...,
    group: _Value = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    inexact: _Flag = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal["text", "json"]
    | Sequence[Literal["text", "json"]]
    | None = ...,
    package: _Value = ...,
    prerelease: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    python: _Value = ...,
    python_platform: Literal[
        "windows",
        "linux",
        "macos",
        "x86_64-pc-windows-msvc",
        "aarch64-pc-windows-msvc",
        "i686-pc-windows-msvc",
        "x86_64-unknown-linux-gnu",
        "aarch64-apple-darwin",
        "x86_64-apple-darwin",
        "aarch64-unknown-linux-gnu",
        "aarch64-unknown-linux-musl",
        "x86_64-unknown-linux-musl",
        "riscv64-unknown-linux",
        "x86_64-manylinux2014",
        "x86_64-manylinux_2_17",
        "x86_64-manylinux_2_28",
        "x86_64-manylinux_2_31",
        "x86_64-manylinux_2_32",
        "x86_64-manylinux_2_33",
        "x86_64-manylinux_2_34",
        "x86_64-manylinux_2_35",
        "x86_64-manylinux_2_36",
        "x86_64-manylinux_2_37",
        "x86_64-manylinux_2_38",
        "x86_64-manylinux_2_39",
        "x86_64-manylinux_2_40",
        "aarch64-manylinux2014",
        "aarch64-manylinux_2_17",
        "aarch64-manylinux_2_28",
        "aarch64-manylinux_2_31",
        "aarch64-manylinux_2_32",
        "aarch64-manylinux_2_33",
        "aarch64-manylinux_2_34",
        "aarch64-manylinux_2_35",
        "aarch64-manylinux_2_36",
        "aarch64-manylinux_2_37",
        "aarch64-manylinux_2_38",
        "aarch64-manylinux_2_39",
        "aarch64-manylinux_2_40",
        "aarch64-linux-android",
        "x86_64-linux-android",
        "wasm32-pyodide2024",
        "wasm32-pyodide2025",
        "arm64-apple-ios",
        "arm64-apple-ios-simulator",
        "x86_64-apple-ios-simulator",
    ]
    | Sequence[
        Literal[
            "windows",
            "linux",
            "macos",
            "x86_64-pc-windows-msvc",
            "aarch64-pc-windows-msvc",
            "i686-pc-windows-msvc",
            "x86_64-unknown-linux-gnu",
            "aarch64-apple-darwin",
            "x86_64-apple-darwin",
            "aarch64-unknown-linux-gnu",
            "aarch64-unknown-linux-musl",
            "x86_64-unknown-linux-musl",
            "riscv64-unknown-linux",
            "x86_64-manylinux2014",
            "x86_64-manylinux_2_17",
            "x86_64-manylinux_2_28",
            "x86_64-manylinux_2_31",
            "x86_64-manylinux_2_32",
            "x86_64-manylinux_2_33",
            "x86_64-manylinux_2_34",
            "x86_64-manylinux_2_35",
            "x86_64-manylinux_2_36",
            "x86_64-manylinux_2_37",
            "x86_64-manylinux_2_38",
            "x86_64-manylinux_2_39",
            "x86_64-manylinux_2_40",
            "aarch64-manylinux2014",
            "aarch64-manylinux_2_17",
            "aarch64-manylinux_2_28",
            "aarch64-manylinux_2_31",
            "aarch64-manylinux_2_32",
            "aarch64-manylinux_2_33",
            "aarch64-manylinux_2_34",
            "aarch64-manylinux_2_35",
            "aarch64-manylinux_2_36",
            "aarch64-manylinux_2_37",
            "aarch64-manylinux_2_38",
            "aarch64-manylinux_2_39",
            "aarch64-manylinux_2_40",
            "aarch64-linux-android",
            "x86_64-linux-android",
            "wasm32-pyodide2024",
            "wasm32-pyodide2025",
            "arm64-apple-ios",
            "arm64-apple-ios-simulator",
            "x86_64-apple-ios-simulator",
        ]
    ]
    | None = ...,
    quiet: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    reinstall: _Flag = ...,
    reinstall_package: _Value = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    script: _Value = ...,
    system_certs: _Flag = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | 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 URLs to use when resolving dependencies, in addition to the default index.

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['text', 'json'] | Sequence[Literal['text', 'json']] | None

Select the output format. Defaults to text.

...
package _Value

Sync for specific packages in the workspace.

...
prerelease Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
project _Value

Discover a project in the given directory.

...
python _Value

The Python interpreter to use for the project environment.

...
python_platform Literal['windows', 'linux', 'macos', 'x86_64-pc-windows-msvc', 'aarch64-pc-windows-msvc', 'i686-pc-windows-msvc', 'x86_64-unknown-linux-gnu', 'aarch64-apple-darwin', 'x86_64-apple-darwin', 'aarch64-unknown-linux-gnu', 'aarch64-unknown-linux-musl', 'x86_64-unknown-linux-musl', 'riscv64-unknown-linux', 'x86_64-manylinux2014', 'x86_64-manylinux_2_17', 'x86_64-manylinux_2_28', 'x86_64-manylinux_2_31', 'x86_64-manylinux_2_32', 'x86_64-manylinux_2_33', 'x86_64-manylinux_2_34', 'x86_64-manylinux_2_35', 'x86_64-manylinux_2_36', 'x86_64-manylinux_2_37', 'x86_64-manylinux_2_38', 'x86_64-manylinux_2_39', 'x86_64-manylinux_2_40', 'aarch64-manylinux2014', 'aarch64-manylinux_2_17', 'aarch64-manylinux_2_28', 'aarch64-manylinux_2_31', 'aarch64-manylinux_2_32', 'aarch64-manylinux_2_33', 'aarch64-manylinux_2_34', 'aarch64-manylinux_2_35', 'aarch64-manylinux_2_36', 'aarch64-manylinux_2_37', 'aarch64-manylinux_2_38', 'aarch64-manylinux_2_39', 'aarch64-manylinux_2_40', 'aarch64-linux-android', 'x86_64-linux-android', 'wasm32-pyodide2024', 'wasm32-pyodide2025', 'arm64-apple-ios', 'arm64-apple-ios-simulator', 'x86_64-apple-ios-simulator'] | Sequence[Literal['windows', 'linux', 'macos', 'x86_64-pc-windows-msvc', 'aarch64-pc-windows-msvc', 'i686-pc-windows-msvc', 'x86_64-unknown-linux-gnu', 'aarch64-apple-darwin', 'x86_64-apple-darwin', 'aarch64-unknown-linux-gnu', 'aarch64-unknown-linux-musl', 'x86_64-unknown-linux-musl', 'riscv64-unknown-linux', 'x86_64-manylinux2014', 'x86_64-manylinux_2_17', 'x86_64-manylinux_2_28', 'x86_64-manylinux_2_31', 'x86_64-manylinux_2_32', 'x86_64-manylinux_2_33', 'x86_64-manylinux_2_34', 'x86_64-manylinux_2_35', 'x86_64-manylinux_2_36', 'x86_64-manylinux_2_37', 'x86_64-manylinux_2_38', 'x86_64-manylinux_2_39', 'x86_64-manylinux_2_40', 'aarch64-manylinux2014', 'aarch64-manylinux_2_17', 'aarch64-manylinux_2_28', 'aarch64-manylinux_2_31', 'aarch64-manylinux_2_32', 'aarch64-manylinux_2_33', 'aarch64-manylinux_2_34', 'aarch64-manylinux_2_35', 'aarch64-manylinux_2_36', 'aarch64-manylinux_2_37', 'aarch64-manylinux_2_38', 'aarch64-manylinux_2_39', 'aarch64-manylinux_2_40', 'aarch64-linux-android', 'x86_64-linux-android', 'wasm32-pyodide2024', 'wasm32-pyodide2025', 'arm64-apple-ios', 'arm64-apple-ios-simulator', 'x86_64-apple-ios-simulator']] | 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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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.

...

tree

tree(
    *,
    all_groups: _Flag = ...,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    format: Literal["text", "json"]
    | Sequence[Literal["text", "json"]]
    | None = ...,
    frozen: _Flag = ...,
    group: _Value = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    invert: _Flag = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    prune: _Value = ...,
    python: _Value = ...,
    python_platform: Literal[
        "windows",
        "linux",
        "macos",
        "x86_64-pc-windows-msvc",
        "aarch64-pc-windows-msvc",
        "i686-pc-windows-msvc",
        "x86_64-unknown-linux-gnu",
        "aarch64-apple-darwin",
        "x86_64-apple-darwin",
        "aarch64-unknown-linux-gnu",
        "aarch64-unknown-linux-musl",
        "x86_64-unknown-linux-musl",
        "riscv64-unknown-linux",
        "x86_64-manylinux2014",
        "x86_64-manylinux_2_17",
        "x86_64-manylinux_2_28",
        "x86_64-manylinux_2_31",
        "x86_64-manylinux_2_32",
        "x86_64-manylinux_2_33",
        "x86_64-manylinux_2_34",
        "x86_64-manylinux_2_35",
        "x86_64-manylinux_2_36",
        "x86_64-manylinux_2_37",
        "x86_64-manylinux_2_38",
        "x86_64-manylinux_2_39",
        "x86_64-manylinux_2_40",
        "aarch64-manylinux2014",
        "aarch64-manylinux_2_17",
        "aarch64-manylinux_2_28",
        "aarch64-manylinux_2_31",
        "aarch64-manylinux_2_32",
        "aarch64-manylinux_2_33",
        "aarch64-manylinux_2_34",
        "aarch64-manylinux_2_35",
        "aarch64-manylinux_2_36",
        "aarch64-manylinux_2_37",
        "aarch64-manylinux_2_38",
        "aarch64-manylinux_2_39",
        "aarch64-manylinux_2_40",
        "aarch64-linux-android",
        "x86_64-linux-android",
        "wasm32-pyodide2024",
        "wasm32-pyodide2025",
        "arm64-apple-ios",
        "arm64-apple-ios-simulator",
        "x86_64-apple-ios-simulator",
    ]
    | Sequence[
        Literal[
            "windows",
            "linux",
            "macos",
            "x86_64-pc-windows-msvc",
            "aarch64-pc-windows-msvc",
            "i686-pc-windows-msvc",
            "x86_64-unknown-linux-gnu",
            "aarch64-apple-darwin",
            "x86_64-apple-darwin",
            "aarch64-unknown-linux-gnu",
            "aarch64-unknown-linux-musl",
            "x86_64-unknown-linux-musl",
            "riscv64-unknown-linux",
            "x86_64-manylinux2014",
            "x86_64-manylinux_2_17",
            "x86_64-manylinux_2_28",
            "x86_64-manylinux_2_31",
            "x86_64-manylinux_2_32",
            "x86_64-manylinux_2_33",
            "x86_64-manylinux_2_34",
            "x86_64-manylinux_2_35",
            "x86_64-manylinux_2_36",
            "x86_64-manylinux_2_37",
            "x86_64-manylinux_2_38",
            "x86_64-manylinux_2_39",
            "x86_64-manylinux_2_40",
            "aarch64-manylinux2014",
            "aarch64-manylinux_2_17",
            "aarch64-manylinux_2_28",
            "aarch64-manylinux_2_31",
            "aarch64-manylinux_2_32",
            "aarch64-manylinux_2_33",
            "aarch64-manylinux_2_34",
            "aarch64-manylinux_2_35",
            "aarch64-manylinux_2_36",
            "aarch64-manylinux_2_37",
            "aarch64-manylinux_2_38",
            "aarch64-manylinux_2_39",
            "aarch64-manylinux_2_40",
            "aarch64-linux-android",
            "x86_64-linux-android",
            "wasm32-pyodide2024",
            "wasm32-pyodide2025",
            "arm64-apple-ios",
            "arm64-apple-ios-simulator",
            "x86_64-apple-ios-simulator",
        ]
    ]
    | None = ...,
    python_version: _Value = ...,
    quiet: _Flag = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    script: _Value = ...,
    show_sizes: _Flag = ...,
    system_certs: _Flag = ...,
    universal: _Flag = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | None

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

...
format Literal['text', 'json'] | Sequence[Literal['text', 'json']] | None

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

...
frozen _Flag

Display the requirements without locking the project.

...
group _Value

Include dependencies from the specified dependency group.

...
index _Value

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

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
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 Literal['windows', 'linux', 'macos', 'x86_64-pc-windows-msvc', 'aarch64-pc-windows-msvc', 'i686-pc-windows-msvc', 'x86_64-unknown-linux-gnu', 'aarch64-apple-darwin', 'x86_64-apple-darwin', 'aarch64-unknown-linux-gnu', 'aarch64-unknown-linux-musl', 'x86_64-unknown-linux-musl', 'riscv64-unknown-linux', 'x86_64-manylinux2014', 'x86_64-manylinux_2_17', 'x86_64-manylinux_2_28', 'x86_64-manylinux_2_31', 'x86_64-manylinux_2_32', 'x86_64-manylinux_2_33', 'x86_64-manylinux_2_34', 'x86_64-manylinux_2_35', 'x86_64-manylinux_2_36', 'x86_64-manylinux_2_37', 'x86_64-manylinux_2_38', 'x86_64-manylinux_2_39', 'x86_64-manylinux_2_40', 'aarch64-manylinux2014', 'aarch64-manylinux_2_17', 'aarch64-manylinux_2_28', 'aarch64-manylinux_2_31', 'aarch64-manylinux_2_32', 'aarch64-manylinux_2_33', 'aarch64-manylinux_2_34', 'aarch64-manylinux_2_35', 'aarch64-manylinux_2_36', 'aarch64-manylinux_2_37', 'aarch64-manylinux_2_38', 'aarch64-manylinux_2_39', 'aarch64-manylinux_2_40', 'aarch64-linux-android', 'x86_64-linux-android', 'wasm32-pyodide2024', 'wasm32-pyodide2025', 'arm64-apple-ios', 'arm64-apple-ios-simulator', 'x86_64-apple-ios-simulator'] | Sequence[Literal['windows', 'linux', 'macos', 'x86_64-pc-windows-msvc', 'aarch64-pc-windows-msvc', 'i686-pc-windows-msvc', 'x86_64-unknown-linux-gnu', 'aarch64-apple-darwin', 'x86_64-apple-darwin', 'aarch64-unknown-linux-gnu', 'aarch64-unknown-linux-musl', 'x86_64-unknown-linux-musl', 'riscv64-unknown-linux', 'x86_64-manylinux2014', 'x86_64-manylinux_2_17', 'x86_64-manylinux_2_28', 'x86_64-manylinux_2_31', 'x86_64-manylinux_2_32', 'x86_64-manylinux_2_33', 'x86_64-manylinux_2_34', 'x86_64-manylinux_2_35', 'x86_64-manylinux_2_36', 'x86_64-manylinux_2_37', 'x86_64-manylinux_2_38', 'x86_64-manylinux_2_39', 'x86_64-manylinux_2_40', 'aarch64-manylinux2014', 'aarch64-manylinux_2_17', 'aarch64-manylinux_2_28', 'aarch64-manylinux_2_31', 'aarch64-manylinux_2_32', 'aarch64-manylinux_2_33', 'aarch64-manylinux_2_34', 'aarch64-manylinux_2_35', 'aarch64-manylinux_2_36', 'aarch64-manylinux_2_37', 'aarch64-manylinux_2_38', 'aarch64-manylinux_2_39', 'aarch64-manylinux_2_40', 'aarch64-linux-android', 'x86_64-linux-android', 'wasm32-pyodide2024', 'wasm32-pyodide2025', 'arm64-apple-ios', 'arm64-apple-ios-simulator', 'x86_64-apple-ios-simulator']] | 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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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

venv(
    *args: str,
    allow_existing: _Flag = ...,
    allow_insecure_host: _Value = ...,
    cache_dir: _Value = ...,
    clear: _Flag = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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,
) -> Result

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 Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 a specific package 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 URLs to use when resolving dependencies, in addition to the default index.

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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

version(
    *args: str,
    active: _Flag = ...,
    allow_insecure_host: _Value = ...,
    bump: Literal[
        "major",
        "minor",
        "patch",
        "stable",
        "alpha",
        "beta",
        "rc",
        "post",
        "dev",
    ]
    | Sequence[
        Literal[
            "major",
            "minor",
            "patch",
            "stable",
            "alpha",
            "beta",
            "rc",
            "post",
            "dev",
        ]
    ]
    | None = ...,
    cache_dir: _Value = ...,
    color: Literal["auto", "always", "never"]
    | Sequence[Literal["auto", "always", "never"]]
    | 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: Literal["fewest", "requires-python"]
    | Sequence[Literal["fewest", "requires-python"]]
    | None = ...,
    frozen: _Flag = ...,
    index: _Value = ...,
    index_strategy: Literal[
        "first-index",
        "unsafe-first-match",
        "unsafe-best-match",
    ]
    | Sequence[
        Literal[
            "first-index",
            "unsafe-first-match",
            "unsafe-best-match",
        ]
    ]
    | None = ...,
    index_url: _Value = ...,
    keyring_provider: Literal["disabled", "subprocess"]
    | Sequence[Literal["disabled", "subprocess"]]
    | None = ...,
    link_mode: Literal[
        "clone", "copy", "hardlink", "symlink"
    ]
    | Sequence[
        Literal["clone", "copy", "hardlink", "symlink"]
    ]
    | 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: Literal["text", "json"]
    | Sequence[Literal["text", "json"]]
    | None = ...,
    package: _Value = ...,
    prerelease: Literal[
        "disallow",
        "allow",
        "if-necessary",
        "explicit",
        "if-necessary-or-explicit",
    ]
    | Sequence[
        Literal[
            "disallow",
            "allow",
            "if-necessary",
            "explicit",
            "if-necessary-or-explicit",
        ]
    ]
    | None = ...,
    project: _Value = ...,
    python: _Value = ...,
    quiet: _Flag = ...,
    refresh: _Flag = ...,
    refresh_package: _Value = ...,
    reinstall: _Flag = ...,
    reinstall_package: _Value = ...,
    resolution: Literal[
        "highest", "lowest", "lowest-direct"
    ]
    | Sequence[
        Literal["highest", "lowest", "lowest-direct"]
    ]
    | None = ...,
    short: _Flag = ...,
    system_certs: _Flag = ...,
    upgrade: _Flag = ...,
    upgrade_group: _Value = ...,
    upgrade_package: _Value = ...,
    verbose: _Flag = ...,
    **flags: Any,
) -> Result

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 Literal['major', 'minor', 'patch', 'stable', 'alpha', 'beta', 'rc', 'post', 'dev'] | Sequence[Literal['major', 'minor', 'patch', 'stable', 'alpha', 'beta', 'rc', 'post', 'dev']] | None

Update the project version using the given semantics.

...
cache_dir _Value

Path to the cache directory.

...
color Literal['auto', 'always', 'never'] | Sequence[Literal['auto', 'always', 'never']] | 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 URL of 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 Literal['fewest', 'requires-python'] | Sequence[Literal['fewest', 'requires-python']] | 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 URLs to use when resolving dependencies, in addition to the default index.

...
index_strategy Literal['first-index', 'unsafe-first-match', 'unsafe-best-match'] | Sequence[Literal['first-index', 'unsafe-first-match', 'unsafe-best-match']] | 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 Literal['disabled', 'subprocess'] | Sequence[Literal['disabled', 'subprocess']] | None

Attempt to use keyring for authentication for index URLs.

...
link_mode Literal['clone', 'copy', 'hardlink', 'symlink'] | Sequence[Literal['clone', 'copy', 'hardlink', 'symlink']] | 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 Literal['text', 'json'] | Sequence[Literal['text', 'json']] | None

The format of the output. Defaults to text.

...
package _Value

Update the version of a specific package in the workspace.

...
prerelease Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit'] | Sequence[Literal['disallow', 'allow', 'if-necessary', 'explicit', 'if-necessary-or-explicit']] | None

The strategy to use when considering pre-release versions.

...
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 Literal['highest', 'lowest', 'lowest-direct'] | Sequence[Literal['highest', 'lowest', 'lowest-direct']] | 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.

...