uv
A reference page for the uv resource
The uv resource installs uv, an extremely fast Python package and project manager from Astral. uv can replace pip, pip-tools, pyenv, virtualenv, and Poetry in a single tool. On macOS it is installed via Homebrew; on Linux the official install script is used.
Parameters:
-
pythonVersions: (array[string]) Python versions to install via
uv python install(e.g.["3.12", "3.11"]). Codify adds missing versions and removes versions that are no longer listed. -
global: (string) The Python version to set as the global default. This runs
uv python pin --global <version>with the--defaultflag, which exposespythonandpython3on PATH as shims pointing to the selected version. -
tools: (array[string]) Global CLI tools to install via
uv tool install(e.g.["ruff", "black", "httpie"]). Each tool is installed into its own isolated environment and exposed on PATH. Codify adds missing tools and removes tools that are no longer listed.
Example usage:
Install uv with Python versions and set a global default
[
{
"type": "uv",
"pythonVersions": ["3.12", "3.11"],
"global": "3.12"
}
]Install uv with Python and global CLI tools
[
{
"type": "uv",
"pythonVersions": ["3.12"],
"global": "3.12",
"tools": ["ruff", "black", "httpie"]
}
]Install uv only (no Python versions)
[
{
"type": "uv"
}
]Notes:
- On macOS, Homebrew must be installed before applying the uv resource. The homebrew resource can install it.
- On Linux, the official install script places the
uvanduvxbinaries in~/.local/bin. Codify adds this directory toPATHin your shell RC file automatically. - The
globalparameter requires the version to be installed (either viapythonVersionsor already present on the system). - Tools installed via
toolsare managed as a stateful list — tools present in your configuration are added; tools removed from the list are uninstalled. - uv is compatible with existing
pyproject.toml,requirements.txt, andpipworkflows. It does not conflict with pip or virtualenv.