uv — Fast Python Project Manager
Rust-based tool that replaces pip, poetry, pyenv, pipx, virtualenv, twine. 10–100x faster than pip.
Installation
curl -LsSf https://astral.sh/uv/install.sh | sh
brew install uv
What uv Replaces
| Old |
uv |
pip install |
uv add |
pip-compile |
uv lock |
pip-sync |
uv sync |
python -m venv |
uv venv |
pyenv install |
uv python install |
pipx run |
uvx |
poetry build |
uv build |
twine upload |
uv publish |
Section Map
| File |
Topics |
| 01 Projects & Deps |
init, add/remove, lock/sync, pyproject.toml |
| 02 Scripts & Tools |
uv run, inline scripts, uvx, uv tool install |
| 03 Python & Envs |
Python versions, pinning, venvs |
| 04 Workspaces & Docker |
Monorepo, Docker, CI, env vars |
| 05 Build & Publish |
uv build, uv publish, versioning |
Quick Start
uv init my-project && cd my-project
uv add httpx
uv run python -c "import httpx; print(httpx.__version__)"
Core Workflow
uv init → uv add → uv run → uv lock → uv sync
Quick Rules
uv add keeps pyproject.toml + lockfile in sync automatically.
uv run auto-creates venv and syncs deps before running.
- Commit
uv.lock for reproducible installs.
uvx ruff check . — run tools without global install.
uv python pin 3.13 — pin Python version per project.
uv sync --frozen in CI — no re-resolution.
See also