uv

(★ 88,940)

An extremely fast Python package and project manager, written in Rust.

File Explorer

  • .editorconfig
  • .gitattributes
  • .gitignore
  • .ignore
  • .prettierignore
  • .prettierrc
  • .python-versions
  • _typos.toml
  • AGENTS.md
  • BENCHMARKS.md
  • Cargo.lock
  • Cargo.toml
  • CHANGELOG.md
  • CLAUDE.md
  • clippy.toml
  • CONTRIBUTING.md
  • dist-workspace.toml
  • Dockerfile
  • hawk.toml
  • LICENSE-APACHE
  • LICENSE-MIT
  • mkdocs.yml
  • pyproject.toml
  • README.md
  • ruff.toml
  • rust-toolchain.toml
  • rustfmt.toml
  • SECURITY.md
  • STYLE.md
  • uv.lock
  • uv.schema.json

# Installation Guide

rust
Prerequisites

Setup Steps

cargo build --release

Build the project in release mode.

cargo test

Run tests to verify the build.

Key Commands

cargo build --release

Builds an optimized release binary.

cargo test

Runs all tests in the project.

For standalone installation, it is recommended to use the official curl/powershell scripts.

# 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.

Release Timeline

Actively Maintained

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

pip

View Details ▼

Python package manager.
Some subcommands such as `install` have their own usage documentation.

pip install {{package}}

Install a package (see `pip install` for more install examples):

pip install --user {{package}}

Install a package to the user's directory instead of the system-wide default location:

pip install {{[-U|--upgrade]}} {{package}}

Upgrade a package:

🔍

pipx

View Details ▼

Install and run Python applications in isolated environments.

pipx run {{pycowsay}} {{moo}}

Run an app in a temporary virtual environment:

pipx install {{package}}

Install a package in a virtual environment and add entry points to path:

pipx uninstall {{package}}

Uninstall a package:

🔍

poetry

View Details ▼

Manage Python packages and dependencies.
Some subcommands such as `about`, `check`, `env`, etc. have their own usage documentation.
See also: `asdf`, `pipenv`, `hatch`.

poetry new {{project_name}}

Create a new Poetry project in the directory with a specific name:

poetry add {{dependency}}

Install and add a dependency and its sub-dependencies to the `pyproject.toml` file in the current directory:

poetry install

Install the project dependencies using the `pyproject.toml` file in the current directory:

🔍

powershell

View Details ▼

This command may be mistaken as the cross-platform version of PowerShell (formerly known as PowerShell Core), which uses `pwsh` instead of `powershell`.
The original `powershell` command in Windows is still available to use the legacy Windows version of PowerShell (version 5.1 and below).

tldr pwsh

View the documentation for the command referring to the latest, cross-platform version of PowerShell (version 6 and above):

powershell

Start an interactive shell session:

tldr powershell {{[-p|--platform]}} windows

View the documentation for the command referring to the legacy Windows PowerShell (version 5.1 and below):

🔍

pyenv

View Details ▼

Switch between multiple versions of Python easily.
See also: `asdf`.

pyenv commands

List all available commands:

pyenv versions

List all Python versions under the `${PYENV_ROOT}/versions` directory:

pyenv install --list

List all Python versions that can be installed from upstream:

🔍

ruff

View Details ▼

An extremely fast Python linter and code formatter, written in Rust.
See also: `black`.

tldr ruff check

View documentation for the Ruff linter:

tldr ruff format

View documentation for the Ruff code formatter:

🔍

twine

View Details ▼

Utility for publishing Python packages on PyPI.

twine upload dist/*

Upload to PyPI:

twine upload {{[-r|--repository]}} testpypi dist/*

Upload to the Test PyPI repository to verify things look right:

twine upload {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} dist/*

Upload to PyPI with a specified username and password:

🔍

uv add

View Details ▼

Add package dependencies to the `pyproject.toml` file.
Packages are specified according to <https://peps.python.org/pep-0508/>.

uv add {{package}}

Add the latest version of a package:

uv add {{package1 package2 ...}}

Add multiple packages:

uv add {{package>=1.2.3}}

Add a package with a version requirement:

🔍

uv help

View Details ▼

Display detailed documentation for `uv` commands.

uv help

Display general help for `uv`:

uv help {{command}}

Display help for a specific command:

uv help {{command}} {{subcommand}}

Display help for a subcommand:

🔍

uv init

View Details ▼

Create a new Python project.

uv init

Initialize a project in the current directory:

uv init {{project_name}}

Initialize a project with a certain name:

uv init --directory {{path/to/directory}} {{project_name}}

Create a project in a given directory:

🔍

uv lock

View Details ▼

Update the project's lockfile.

uv lock

Create or update the project's lockfile:

uv lock --check

Check if the lockfile is up-to-date without updating it:

uv lock --check-exists

Assert that a lockfile exists without checking if it's current:

🔍

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 self

View Details ▼

Manage the `uv` executable itself.

uv self update

Update `uv` to the latest version:

uv self update {{0.4.0}}

Update `uv` to a specific version:

uv self update --dry-run

Check for available `uv` updates without installing:

🔍

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:

🔍

uv tool

View Details ▼

Install and run commands provided by Python packages.

uv tool run {{command}}

Run a command from a package, without installing it:

uv tool install {{package}}

Install a Python package system-wide:

uv tool upgrade {{package}}

Upgrade an installed Python package:

🔍

uv venv

View Details ▼

Create an isolated Python environment for installing packages.

uv venv

Create a virtual environment in the default location (`.venv`):

uv venv {{path/to/venv}}

Create a virtual environment at a specific path:

uv venv {{[-p|--python]}} {{3.12}}

Create using a specific Python version:

🔍

uvx

View Details ▼

This command is an alias of `uv tool run`.

tldr uv tool

View documentation for the original command:

🔍

virtualenv

View Details ▼

Create virtual isolated Python environments.

virtualenv {{path/to/venv}}

Create a new environment:

virtualenv --prompt {{prompt_prefix}} {{path/to/venv}}

Customize the prompt prefix:

virtualenv {{[-p|--python]}} {{path/to/pythonbin}} {{path/to/venv}}

Use a different version of Python with virtualenv:

// repository documentation