uv

Execute Python scripts with automatic dependency handling via uv run.

9|14|Updated Mar 22, 2012
One-click install
npx skills add https://github.com/deybhayden/dotfiles --skill uv-deybhayden
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: uv
Source: https://github.com/deybhayden/dotfiles/tree/main/.pi/agent/skills/uv
Command: npx skills add https://github.com/deybhayden/dotfiles --skill uv-deybhayden

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a unified command-line interface to run Python scripts with automatic dependency handling and inline metadata, eliminating manual setup and environment management.

Core Features & Use Cases

  • Run scripts with automatic dependency management: Use 'uv run script.py' to execute scripts with specified or ad-hoc dependencies.
  • Inline script metadata for reproducibility: Embed requires-python and dependencies directly in the script for deterministic runs.
  • Build backend guidance: Provides guidance for Python packaging and build backends like uv_build.

Quick Start

Use the uv skill to run a script with inline metadata: uv run script.py You can initialize a new script with inline metadata using: uv init --script example.py --python 3.12 Add dependencies on the fly with: uv add --script example.py requests rich

Frequently Asked Questions about uv

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

FAQPage Schema
How do I run Python scripts with automatic dependencies?▼

To run Python scripts with automatic dependencies, use the 'uv run script.py' command. This executes your script while automatically resolving and managing the specified or ad-hoc dependencies required for the run.

What is inline script metadata in Python for reproducible runs?▼

Inline script metadata in Python embeds 'requires-python' constraints and dependencies directly within the script file. This mechanism ensures deterministic, reproducible runs by declaring environmental requirements explicitly in the code itself.

How do I add dependencies to a Python script on the fly?▼

You can add dependencies to a Python script on the fly using the 'uv add --script example.py requests rich' command. This updates the inline metadata of the script to include the newly specified packages.

Can I initialize a new Python script with specific version constraints?▼

Yes, you can initialize a new Python script with specific version constraints using 'uv init --script example.py --python 3.12'. This creates a script pre-configured with inline metadata enforcing the desired Python version.

Does uv provide guidance for Python packaging and build backends?▼

Yes, uv provides build backend guidance for Python packaging. It supports configuration and offers direction for utilizing build backends like 'uv_build' to manage your project's packaging process effectively.