| created | "2025-12-16T00:00:00.000Z" |
| modified | "2026-05-09T00:00:00.000Z" |
| reviewed | "2026-04-25T00:00:00.000Z" |
| name | uv-project-management |
| description | Python project setup, deps, and lockfiles with uv. Use when the user mentions uv, creating Python projects, managing dependencies, lockfiles, or pyproject.toml. |
| user-invocable | false |
| allowed-tools | Bash, Read, Grep, Glob |
UV Project Management
Quick reference for UV project setup, dependencies, and lockfiles.
When to Use This Skill
| Use this skill when... | Use a focused sibling instead when... |
|---|
Running uv init, uv add, uv remove, uv lock, or uv sync for everyday dependency management | Running a script or one-off command โ use uv-run |
Authoring or editing pyproject.toml [project] and [tool.uv] sections | Wiring git/path/editable deps or workspace inheritance โ use uv-advanced-dependencies |
| Bootstrapping a new single-package Python project | Splitting a repo into multi-package workspaces โ use uv-workspaces |
When This Skill Applies
- Initializing new Python projects (
uv init)
- Adding, removing, or updating dependencies (
uv add, uv remove)
- Managing lockfiles (
uv lock)
- Syncing project environments (
uv sync)
- Configuring pyproject.toml
For running scripts, see uv-run skill.
Quick Reference
Project Initialization
uv init my-project
cd my-project
uv init
uv init --python 3.11 my-app
Dependency Management
uv add requests
uv add 'flask>=2.0'
uv add 'django>=4.0,<5.0'
uv add --dev pytest pytest-cov black
uv add --group docs sphinx sphinx-rtd-theme
uv remove requests flask
uv add -r requirements.txt
Lockfile Operations
uv lock
uv lock --upgrade-package requests
uv lock --upgrade
uv lock --frozen
Environment Synchronization
uv sync
uv sync --frozen
uv sync --locked
Project Structure
UV projects follow this standard structure:
my-project/
โโโ pyproject.toml # Project metadata and dependencies
โโโ uv.lock # Locked dependency versions
โโโ .venv/ # Virtual environment (auto-created)
โโโ README.md
โโโ src/
โโโ my_project/
โโโ __init__.py
Generated pyproject.toml
[project]
name = "my-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
dependencies = []
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
Common Workflows
Starting a New Project
uv init my-app && cd my-app
uv add ruff pytest
uv run pytest
Adding Multiple Dependencies
uv add fastapi uvicorn 'pydantic>=2.0'
uv add --dev pytest pytest-cov ruff ty
uv add --group docs sphinx mkdocs-material
Updating Dependencies
uv lock --upgrade-package requests
uv lock --upgrade
uv sync
Key Features
- Fast: 10-100x faster than pip
- Deterministic: Lockfile ensures reproducible installs
- Automatic: Creates and manages virtual environments
- Modern: Uses pyproject.toml for configuration
- Compatible: Works with pip, Poetry, and other tools
See Also
- uv-run - Running scripts, temporary dependencies, PEP 723
- uv-python-versions - Managing Python interpreter versions
- uv-workspaces - Monorepo and multi-package projects
- uv-advanced-dependencies - Git, path, and constraint dependencies
- uv-tool-management - Installing CLI tools globally
- python-testing - Running tests with pytest
- python-code-quality - Linting and formatting with ruff
References