Skip to main content

Overview

Many Python packages provide command-line tools. uv has specialized support for easily invoking and installing tools without polluting your project environments.

Running tools with uvx

The uvx command invokes a tool without installing it:
uvx is an alias for uv tool run. Use whichever you prefer!

Passing arguments

Arguments are passed after the tool name:
Tools run in temporary, isolated environments.
If running a tool in a project that requires the project to be installed (e.g., pytest, mypy), use uv run instead. Otherwise, the tool runs in an isolated environment without access to your project.For flat project structures (no src directory), uvx works fine. Use uv run if you want to pin the tool version in project dependencies.

Commands with different package names

Sometimes package and command names differ. Use --from to specify the package:

Requesting specific versions

The @ syntax only works for exact versions. Use --from for version ranges.

Requesting extras

Run tools with optional dependencies:

Requesting different sources

The --from option supports alternative sources:

Commands with plugins

Include additional dependencies:

Installing tools

For frequently-used tools, install them to a persistent environment:
All tool management commands require the full uv tool prefix (except uvx, which is an alias for uv tool run).
1

Install the tool

Tool executables are placed in a bin directory added to your PATH.
2

Verify installation

If it’s not on the PATH, use uv tool update-shell to add it.

Installation behavior

Unlike uv pip install, tool installation:
  • Installs all executables provided by the package
  • Isolates the tool from other environments
  • Does not make modules importable in other environments

Installing with options

Upgrading tools

1

Upgrade a single tool

Upgrades respect the version constraints provided during installation.
2

Replace version constraints

Re-install with new constraints:
3

Upgrade all tools

If you installed ruff>=0.3,<0.4, running uv tool upgrade ruff will upgrade to the latest version within that range, not beyond it.

Requesting Python versions

By default, uv uses your default Python interpreter. Specify a different version:
See Python version requests for more details.

Legacy Windows scripts

Tools support running legacy setuptools scripts on Windows. Scripts are available via $(uv tool dir)\<tool-name>\Scripts when installed.
uvx automatically looks for files ending in .ps1, .cmd, and .bat in that order.

Complete workflow examples

Quick one-off tool usage

Installing frequently-used tools

1

Install your toolchain

2

Use tools directly

3

Keep tools updated

Running tools with plugins

Next steps

Tools concept

Learn more about tool management

Command reference

View all uv tool commands

Working with projects

Manage Python projects

Python versions

Manage Python installations