uv is an extremely fast Python package and project manager. This guide will get you from installation to running your first project in minutes.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/astral-sh/uv/llms.txt
Use this file to discover all available pages before exploring further.
Install uv
Create your first project
Initialize a new project
Create a new Python project with This creates a project structure with:
uv init:pyproject.toml- Project metadata and dependencies.python-version- Python version pinmain.py- Sample Python fileREADME.md- Project documentation
Add a dependency
Navigate to your project and add a package:uv automatically:
- Creates a virtual environment (
.venv) - Updates
pyproject.tomlwith the dependency - Generates a lockfile (
uv.lock) - Installs the package
Working with dependencies
Lock and sync workflow
Generate or update the lockfile without installing:Add dependencies with version constraints
Remove dependencies
Manage Python versions
uv can install and manage Python versions for you.Install Python
Use a specific Python version
Pin your project to a specific Python version:View installed Python versions
Run tools with uvx
Execute Python tools without installing them usinguvx (an alias for uv tool run):
Install tools globally
For tools you use frequently, install them to make them available system-wide:Next steps
Now that you have uv set up, explore more capabilities:Working on Projects
Learn about project structure, managing dependencies, and building distributions
Running Scripts
Execute single-file scripts with inline dependency declarations
Python Installation
Deep dive into installing and managing Python versions
Using Tools
Master tool installation and management with uv and uvx