LinuxCommandLibrary

uvx

TLDR

View documentation for the original command

$ tldr uv tool
copy

SYNOPSIS

uvx [options] tool_name [tool_arguments]

PARAMETERS

--from
    Install the tool from a specific source (e.g., git+https://… or a local wheel).

--with
    Add extra packages to the temporary environment (comma‑separated list).

--version
    Pin the tool to a particular version (e.g., ruff==0.6.0).

--no-cache
    Do not use the cached build; force a fresh download and install.

--quiet
    Suppress non‑essential output, showing only errors.

--verbose
    Show detailed progress and diagnostic information.

DESCRIPTION

uvx is a convenience alias for uv tool run, the tool‑execution sub‑command of the uv Python package manager. When invoked, uvx creates a short‑lived virtual environment in uv's cache, installs the requested package (or wheel, git URL, etc.) into that environment, and immediately runs the package's console entry‑point with any arguments you supply. This lets you use command‑line utilities such as ruff, black, or custom scripts without polluting your project’s dependencies or your global PATH. The first run of a tool downloads and caches the package; subsequent runs are fast because the cached build is reused unless you request a different version or clear the cache. uvx therefore provides a lightweight, reproducible way to try out tools, test specific versions, or run one‑off commands in CI pipelines while keeping the host environment clean.

CAVEATS

Requires uv (≥ 0.2) to be installed; the temporary environment is removed after the command finishes, so repeated runs incur the initial install cost unless cached. Network access is needed for first‑time installs. Permissions issues can arise when the cache directory is not writable; adjust ownership of ~/.local/share/uv if needed. Tools that expect to be installed globally (e.g., rely on system‑wide configuration files) may not behave identically when run via uvx.

CACHING BEHAVIOR

On first use, uvx downloads and builds the requested package, storing the result in ~/.local/share/uv/tool-cache. Subsequent invocations reuse this cached build unless a different version is requested, --no-cache is used, or the cache is manually pruned.

VERSION PINNING

Specifying --version (or including the version in the tool name, e.g., ruff==0.6.0) forces uvx to install that exact release, ensuring reproducible runs across machines or CI pipelines.

COMPARISON WITH PIPX

Both uvx and pipx provide isolated execution of Python CLI tools. uvx is generally faster because uv uses a compiled resolver and parallel installation, and it shares a single cache for all tools, whereas pipx creates a separate virtual environment per tool.

HISTORY

uv was released by Astral in early 2023 as a fast, Rust‑based alternative to pip and virtualenv. The uv tool sub‑command, and its short alias uvx, were added shortly thereafter to address the common need of running one‑off CLI tools without permanent installation, mirroring the functionality of pipx but with uv's speed and caching model.

SEE ALSO

uv(1), pipx(1), pip(1), python(1)

Copied to clipboard