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
Theuvx 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: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:Installation behavior
Unlikeuv 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
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: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
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