uv Commands
Fast Python package and project manager from Astral.All uv pages
- uv add package: add a dependency to a Python project with uvuv add pkg writes the dependency to pyproject.toml, locks uv.lock and syncs .venv. Dev and named groups, extras, Git and local packages, uv remove and pitfalls.
- uv init: create a new Python project with uvuv init NAME creates a Python project with pyproject.toml, README, .python-version and git. The --app, --lib, --package, --bare and --script layouts compared.
- uv python pin 3.13: set the project's Python version (.python-version)uv python pin 3.13 writes a .python-version file so uv run, uv sync and uv venv use that Python, downloading it if missing. Pin formats and requires-python.
- uv run script.py with inline dependencies (PEP 723)uv add --script writes a PEP 723 dependency block into a single-file Python script; uv run script.py installs those packages in a cached env and runs it.