# uv

> Python package and project manager written in Rust. Replaces pip, pip-tools, pipx, poetry, pyenv, and virtualenv, with lockfiles and Python version management.

Stars: 91.5k · Language: Rust · License: Apache-2.0 · Categories: Dev Tools

- Repository: https://github.com/astral-sh/uv
- Website: https://docs.astral.sh/uv
- Page: https://www.trmn.sh/tools/uv

## Install

- Standalone installer (macOS/Linux): `curl -LsSf https://astral.sh/uv/install.sh | sh`
- Standalone installer (Windows): `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"`
- pip: `pip install uv`

## Overview

uv is a Python package and project manager written in Rust. It is a single tool meant to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and others. The README reports it is 10-100x faster than pip, and it uses a global cache to deduplicate dependencies across environments. It supports macOS, Linux, and Windows.

For project work, `uv init`, `uv add`, `uv lock`, `uv sync`, and `uv run` manage dependencies and virtual environments, with a universal lockfile and Cargo-style workspaces. Single-file scripts can declare dependencies as inline metadata (`uv add --script example.py requests`) and run in an isolated environment with `uv run example.py`. uv can also build and publish projects, including ones not managed with uv.

uv also handles tools and Python versions. `uvx` (an alias for `uv tool run`) runs a package's command-line tool in an ephemeral environment, and `uv tool install` installs it persistently, similar to pipx. `uv python install 3.12 3.13 3.14` downloads interpreters, and `uv python pin` writes a `.python-version` file. For existing workflows, the `uv pip` interface covers common pip, pip-tools, and virtualenv commands (`uv pip compile`, `uv pip sync`, `uv venv`). It adds options such as `--universal` for platform-independent requirements files. It suits Python developers and teams, from individual scripts to multi-package workspaces and existing pip-based setups.

### Installation

```bash
# via Standalone installer (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh
```

```bash
# via Standalone installer (Windows)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```

```bash
# via pip
pip install uv
```

## Alternatives

- [Ruff](https://www.trmn.sh/tools/ruff.md): Python linter and code formatter written in Rust, with 900+ rules, auto-fix, caching, and drop-in parity with Flake8, isort, and Black. (Rust, 50.4k stars)
- [just](https://www.trmn.sh/tools/just.md): Command runner that saves and runs project-specific commands from a justfile with make-inspired syntax (Rust, 36.5k stars)
- [zellij](https://www.trmn.sh/tools/zellij.md): Terminal multiplexer with floating panes, multiplayer collaboration, WebAssembly plugins, and built-in web client (Rust, 35.9k stars)
- [mise](https://www.trmn.sh/tools/mise.md): CLI tool for managing development environments with version-controlled tools, environment variables, and tasks (Rust, 35.7k stars)
- [hyperfine](https://www.trmn.sh/tools/hyperfine.md): Command-line benchmarking tool that runs statistical analysis across multiple timing runs of shell commands (Rust, 29.2k stars)

---

Canonical: https://www.trmn.sh/tools/uv
