uv

Manage Python projects and execute code in isolated environments.

3|2|Updated Dec 11, 2024
One-click install
npx skills add https://github.com/PovertyAction/ipa-research-data-science-hub --skill uv-povertyaction
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uv
Source: https://github.com/PovertyAction/ipa-research-data-science-hub/tree/main/.claude/skills/uv
Command: npx skills add https://github.com/PovertyAction/ipa-research-data-science-hub --skill uv-povertyaction

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

uv simplifies Python project management by automating environment handling, dependency resolution, and command execution in isolated project contexts.

Core Features & Use Cases

  • Project and dependency management with uv add, uv lock, uv sync
  • Execute code in isolated environments using uv run
  • Create and manage Python projects with uv init, uv venv, and Python version tools

Quick Start

Initialize a new Python project with uv init, then run a command inside its isolated environment using uv run.

Frequently Asked Questions about uv

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Python project dependencies and virtual environments automatically?

Managing Python project dependencies and virtual environments is automated by initializing projects with pyproject.toml, resolving lockfiles, and executing commands directly within isolated .venv contexts. This approach handles environment setup, dependency resolution, and project workflows seamlessly without manual activation.

How do I run a Python script in an isolated project environment?

To run a Python script in an isolated project environment, use the run command to execute code directly within the project's virtual environment. It automatically coordinates dependencies via the uv.lock file and applies per-invocation dependency overrides using the --with flag for specific execution contexts.

What is the best way to initialize a new Python project with a lockfile?

Initializing a new Python project with a lockfile is best achieved by creating a pyproject.toml structure and generating a synchronized virtual environment. You can initialize the project structure, create the virtual environment, and lock dependencies to ensure consistent, isolated project execution across different setups.

Can I override Python dependencies for a single command execution?

Overriding Python dependencies for a single command execution is supported using the --with flag during invocation. This allows you to apply per-invocation dependency overrides within the isolated project environment, temporarily augmenting the locked dependencies defined in your pyproject.toml without altering the persistent lockfile.

Does Python project management work without manually activating a virtual environment?

Python project management works without manual activation by automatically handling environment setup via a dedicated .venv directory. Commands executed in the project context automatically route through this isolated environment, coordinating dependencies via the lockfile and pyproject.toml without requiring explicit virtual environment activation steps.

Why use an automated CLI for Python project workflows instead of manual environment setup?

Using an automated CLI for Python project workflows eliminates manual environment setup errors by enforcing isolated execution and consistent dependency resolution. It coordinates lockfiles and pyproject.toml configurations automatically, ensuring that project environments are reproducible and dependencies are synchronized without direct user intervention.