astral-sh /uv
An extremely fast Python package and project manager, written in Rust.
★ 91,840⑂ 3,785👁 216⑃ 13,469● 9,450▤ 330◈ 0
91,840
stars
+49
3,785
forks
216
watchers
13,469
prs
9,450
issues
330
releases
0
discussions
README
uv
An extremely fast Python package and project manager, written in Rust.
Installing Trio's dependencies with a warm cache.
Highlights
- A single tool to replace pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and
more.
- 10-100x faster than pip.
- Provides comprehensive project management, with a
universal lockfile.
- Runs scripts, with support for
inline dependency metadata.
- Installs and manages Python versions.
- Runs and installs tools published as Python packages.
- Includes a pip-compatible interface for a performance boost with a familiar
CLI.
- Supports Cargo-style workspaces for
scalable projects.
- Disk-space efficient, with a global cache for
dependency deduplication.
- Installable without Rust or Python via curl or pip.
- Supports macOS, Linux, and Windows.
uv is backed by Astral, the creators of
Ruff and ty.
Installation
Install uv with our standalone installers:
bash
On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
bash
On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Or, from PyPI:
bash
With pip.
pip install uv
bash
Or pipx.
pipx install uv
If installed via the standalone installer, uv can update itself to the latest version:
bash
uv self update
See the installation documentation for
details and alternative installation methods.
Documentation
uv's documentation is available at docs.astral.sh/uv.
Additionally, the command line reference documentation can be viewed with uv help.
Features
Projects
uv manages project dependencies and environments, with support for lockfiles, workspaces, and more,
similar to rye or poetry:
console
$ uv init example
Initialized project example at /home/user/example
$ cd example
$ uv add ruff
Creating virtual environment at: .venv
Resolved 2 packages in 170ms
Built example @ file:///home/user/example
Prepared 2 packages in 627ms
Installed 2 packages in 1ms
+ example==0.1.0 (from file:///home/user/example)
+ ruff==0.5.0
$ uv run ruff check
All checks passed!
$ uv lock
Resolved 2 packages in 0.33ms
$ uv sync
Resolved 2 packages in 0.70ms
Checked 1 package in 0.02ms
See the project documentation to get started.
uv also supports building and publishing projects, even if they're not managed with uv. See the
publish guide to learn more.
Scripts
uv manages dependencies and environments for single-file scripts.
Create a new script and add inline metadata declaring its dependencies:
console
$ echo 'import requests; print(requests.get("https://astral.sh"))' example.py
$ uv add --script example.py requests
Updated example.py
Then, run the script in an isolated virtual environment:
console
$ uv run example.py
Reading inline script metadata from: example.py
Installed 5 packages in 12ms
See the scripts documentation to get started.
Tools
uv executes and installs command-line tools provided by Python packages, similar to pipx.
Run a tool Top issues
#5903Using `uv run` as a task runner258 comments · 2024-08-08#5605Documentation feedback136 comments · 2024-07-30#1910Add a command to activate the virtual environment, e.g., `uv shell`120 comments · 2024-02-23#6794Upgrade dependencies in `pyproject.toml` (`uv upgrade`)88 comments · 2024-08-29#6349Request for `uv.lock` to support different index urls across different developer machines and CI environments78 comments · 2024-08-21#5802Suggestion: `uv bundle`, `uv build --release` or similar to create a contained executable a la pyinstaller, py2exe70 comments · 2024-08-05#1419Add option to upgrade all packages in the environment, e.g., `upgrade --all`65 comments · 2024-02-16#18506Roadmap: `uv audit`64 comments · 2026-03-16
Latest release
0.13.7 0.13.7 2026-11-03Release Notes Released on 2026-11-03. Preview features - Add --output-version to uv workspace metadata for requesting a specific schema version (22958) - Report aliased OSV records as a single vulnerability in uv audit (22990) Bug fixes - Treat workspace member paths added by uv init or uv add as literals instead of glob patterns (23008) - Prevent uv's Windows trampolines from closing handles they did not inherit (22977) - Allow uvx to run tools with CPython builds whose versions contain local identifiers (23013) - Generate valid module names when uv init creates packaged projects whose
相关报道 (5)
News & coverage (9)
Hacker Newsuv: An extremely fast Python package and project manager, written in Rust▲ 753 · 336 comments · 2025-06-23Hacker NewsWarn about PyPy being unmaintained▲ 326 · 175 comments · 2026-03-08Hacker Newsuv: Deduplicate all files in the wheel cache▲ 231 · 121 comments · 2026-08-31Hacker NewsUv 0.12.0▲ 131 · 43 comments · 2026-07-28Hacker NewsYou can now uv run a GitHub gist▲ 33 · 30 comments · 2025-08-06Hacker NewsShow HN: Score any URL against a quality profile with one curl command▲ 1 · 0 comments · 2026-03-14Hacker NewsAsk HN: How to determine company's long term dependability? (Ello, Astral)▲ 1 · 0 comments · 2024-02-18noteRunning and verifying uv 0.13.6, fixes for those using --active or large workspaces2026-10-26note[2026 Edition] How to Build ComfyUI Safely and Quickly with Git + uv | Practical Implementation on RTX 50802026-06-14