setup-uv

(★ 847)

Set up your GitHub Actions workflow with a specific version of https://docs.astral.sh/uv/

File Explorer

  • .editorconfig
  • .git-blame-ignore-revs
  • .gitattributes
  • .gitignore
  • .npmrc
  • .nvmrc
  • action-types.yml
  • action.yml
  • AGENTS.md
  • biome.json
  • CODEOWNERS
  • jest.config.mjs
  • LICENSE
  • package-lock.json
  • package.json
  • README.md
  • SECURITY.md
  • tsconfig.json

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

python

View Details ▼

Python language interpreter.

python

Start a REPL (interactive shell):

python {{path/to/file.py}}

Execute a specific Python file:

python -i {{path/to/file.py}}

Execute a specific Python file and start a REPL:

🔍

uv pip

View Details ▼

Provides pip-like commands for installing, uninstalling, and managing packages.

uv pip install {{package}}

Install a package:

uv pip install {{[-r|--requirements]}} {{requirements.txt}}

Install packages from a requirements file:

uv pip install {{package==1.2.3}}

Install a package with a specific version:

🔍

uv python

View Details ▼

Manage Python versions and installations.

uv python list

List all available Python installations:

uv python install {{version}}

Install a Python version:

uv python uninstall {{version}}

Uninstall a Python version:

🔍

uv run

View Details ▼

Run a command or script in the project environment.

uv run {{path/to/script.py}}

Run a Python script:

uv run {{[-m|--module]}} {{module_name}}

Run a Python module:

uv run {{[-w|--with]}} {{package}} {{command}}

Run a command with additional packages installed temporarily:

🔍

uv sync

View Details ▼

Update the project's environment to match the lockfile.

uv sync

Sync the project environment with the lockfile:

uv sync --all-extras

Sync and include all optional dependencies:

uv sync --extra {{extra_name}}

Sync with specific optional dependencies:

🔍

venv

View Details ▼

Create lightweight virtual environments in Python.

python -m venv {{path/to/virtual_environment}}

Create a Python virtual environment:

{{[.|source]}} {{path/to/virtual_environment}}/bin/activate

Activate the virtual environment (Linux and macOS):

{{path\to\virtual_environment}}\Scripts\activate.bat

Activate the virtual environment (Windows):

// repository documentation