LinuxCommandLibrary

uv

TLDR

Create a new Python project

$ uv init [project_name]
copy
Add a dependency
$ uv add [package]
copy
Remove a dependency
$ uv remove [package]
copy
Sync dependencies from pyproject.toml
$ uv sync
copy
Run a command in the project environment
$ uv run [command]
copy
Install a Python version
$ uv python install [3.12]
copy
Create a virtual environment
$ uv venv
copy
Install a tool globally
$ uv tool install [ruff]
copy

SYNOPSIS

uv command [options] [arguments]

DESCRIPTION

uv is an extremely fast Python package and project manager written in Rust. It replaces pip, pip-tools, pipx, poetry, pyenv, and virtualenv with a single unified tool.
Projects are managed through pyproject.toml with dependencies locked in uv.lock. The uv sync command installs exact versions from the lock file, ensuring reproducible environments.
UV manages Python versions directly—no need for pyenv. Use uv python install to download and manage multiple Python versions.
The tool provides a pip-compatible interface (uv pip) for drop-in replacement in existing workflows, while offering project-based workflows for new projects.

PARAMETERS

init [name]

Create a new Python project
add package
Add a dependency to pyproject.toml
remove package
Remove a dependency
sync
Sync dependencies with lock file
lock
Generate/update uv.lock file
run command
Run command in project environment
python install version
Install a Python version
python list
List installed Python versions
venv [path]
Create a virtual environment
pip install package
Install package (pip-compatible interface)
tool install tool
Install a CLI tool globally
tool run tool
Run a tool without installing
--help, -h
Show help
--version, -V
Show version

CAVEATS

UV is relatively new (2024) and rapidly evolving. Some edge cases may differ from pip behavior.
Lock files should be committed to version control for reproducibility. Run uv lock after modifying dependencies.
For CI/CD, use uv sync --frozen to fail if lock file is outdated rather than regenerating it.

HISTORY

UV was created by Astral (makers of Ruff) and released in 2024. It achieved 10-100x faster performance than pip by leveraging Rust and parallel downloads. The tool quickly gained adoption as a modern Python toolchain replacement.

SEE ALSO

pip(1), poetry(1), pipx(1), python(1)

> TERMINAL_GEAR

Curated for the Linux community

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

$16.99
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
Raspberry Pi 5 8GB

Raspberry Pi 5 8GB

$134.50
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

$1,589.00