Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.uv.enable

Whether to enable uv.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.uv.package

The uv package to use.

Type: null or package

Default:

pkgs.uv

Declared by:

programs.uv.python.default

Versions from programs.uv.python.versions to set as default Python versions, each installed with uv python install --default.

--default provides the unversioned executable for the request’s implementation, so defaults of different implementations do not conflict: a CPython request provides python and python3, a PyPy request provides pypy and pypy3, a GraalPy request provides graalpy and graalpy3. List one request per implementation to set them all. A bare string is accepted as a single-element list.

Type: (list of string) or string convertible to it

Default:

[ ]

Example:

[
  "3.13"
  "pypy@3.11"
]

Declared by:

programs.uv.python.prune

Whether to make the set of managed Python versions fully declarative.

When enabled, uv python uninstall --all is run before installing programs.uv.python.versions, so versions that are no longer listed are removed.

Warning: uv has no declarative install command, so this uninstalls and reinstalls all listed versions on every activation, which is slow. Versions installed manually with uv python install are also removed.

Type: boolean

Default:

false

Declared by:

programs.uv.python.versions

Python versions to install with uv python during activation. Each entry is passed verbatim to uv python install, so any request it accepts works (e.g. "3.13", "3.12.4", "pypy@3.11", "cpython-3.14.5+freethreaded").

Entries without a patch component (e.g. "3.13", "pypy@3.11") are installed with --upgrade, so on every activation they track the latest patch release. Entries pinned to an exact patch (e.g. "3.12.4") are installed as requested and never upgraded, since uv rejects upgrading them. See https://docs.astral.sh/uv/concepts/python-versions/ for more information.

Type: list of string

Default:

[ ]

Example:

[
  "3.13"
  "3.12"
  "pypy@3.11"
]

Declared by:

programs.uv.settings

Configuration written to $XDG_CONFIG_HOME/uv/uv.toml. See https://docs.astral.sh/uv/configuration/files/ and https://docs.astral.sh/uv/reference/settings/ for more information.

Type: TOML value

Default:

{ }

Example:

{
  python-downloads = "never";
  python-preference = "only-system";
  pip.index-url = "https://test.pypi.org/simple";
}

Declared by:

programs.uv.tool.packages

Tools to install with uv tool during activation. Each entry is passed verbatim to uv tool install, so version specifiers and extras work (e.g. "black==24.1.0", "poetry[plugin]").

On every activation uv tool upgrade is run for the listed tools, which upgrades them to the latest version allowed by the constraints they were installed with (e.g. "black==24.1.0" stays pinned). Tools that are not listed are left untouched. See https://docs.astral.sh/uv/concepts/tools/ for more information.

Type: list of string

Default:

[ ]

Example:

[
  "ruff"
  "black==24.1.0"
  "poetry[plugin]"
]

Declared by:

programs.uv.tool.prune

Whether to make the set of installed tools fully declarative.

When enabled, uv tool uninstall --all is run before installing programs.uv.tool.packages, so tools that are no longer listed are removed.

Warning: uv has no declarative install command, so this uninstalls and reinstalls all listed tools on every activation, which is slow. Tools installed manually with uv tool install are also removed.

Type: boolean

Default:

false

Declared by: