uv
TLDR
Create a new Python project
SYNOPSIS
uv command [options] [arguments]
DESCRIPTION
uv is an extremely fast Python package and project manager written in Rust. It replaces pip, pip-tools, pipx, poetry, pyenv, and virtualenv with a single unified tool.
Projects are managed through pyproject.toml with dependencies locked in uv.lock. The uv sync command installs exact versions from the lock file, ensuring reproducible environments.
UV manages Python versions directly—no need for pyenv. Use uv python install to download and manage multiple Python versions.
The tool provides a pip-compatible interface (uv pip) for drop-in replacement in existing workflows, while offering project-based workflows for new projects.
PARAMETERS
init [name]
Create a new Python projectadd package
Add a dependency to pyproject.tomlremove package
Remove a dependencysync
Sync dependencies with lock filelock
Generate/update uv.lock filerun command
Run command in project environmentpython install version
Install a Python versionpython list
List installed Python versionsvenv [path]
Create a virtual environmentpip install package
Install package (pip-compatible interface)tool install tool
Install a CLI tool globallytool run tool
Run a tool without installing--help, -h
Show help--version, -V
Show version
CAVEATS
UV is relatively new (2024) and rapidly evolving. Some edge cases may differ from pip behavior.
Lock files should be committed to version control for reproducibility. Run uv lock after modifying dependencies.
For CI/CD, use uv sync --frozen to fail if lock file is outdated rather than regenerating it.
HISTORY
UV was created by Astral (makers of Ruff) and released in 2024. It achieved 10-100x faster performance than pip by leveraging Rust and parallel downloads. The tool quickly gained adoption as a modern Python toolchain replacement.
