Skip to main content

uv-toolbox

CI PyPI Python Version License: MIT codecov

uv-toolbox is a CLI tool for managing Python tool environments. It will help you create multiple virtual environments and manage their dependencies through a declarative configuration file.

Here is an example in YAML format:

environments:
  - name: env1
    requirements: |
      ruff==0.13.0
      black
  - name: env2
    requirements: |
      isort
      flake8

Configuration Options

Virtual Environment Location:

By default, virtual environments are stored in ~/.cache/uv-toolbox/ using content-addressed storage. This means:

  • Automatic deduplication: Identical requirements across projects share the same venv
  • No naming conflicts: Venvs are organized by content hash, not names
  • Works from subdirectories: Run commands from anywhere in your project
# Default: centralized, content-addressed storage
# (no venv_path needed - defaults to ~/.cache/uv-toolbox)
environments:
  - name: formatting
    requirements: ruff==0.13.0
  - name: testing
    requirements: pytest==8.0.0

# Optional: local storage (per-project)
venv_path: .uv-toolbox

How it works:

  • Each environment's venv location is determined by hashing its requirements
  • Projects with identical requirements automatically share the same venv
  • Config files are discovered by walking up the directory tree

Executables:

By default, shims expose the console_scripts declared by first-order requirements. Scripts belonging only to transitive dependencies are excluded. Use omit_executables to hide selected scripts, or executables_override for an exact allowlist:

environments:
  - name: formatting
    requirements: |
      ruff==0.13.0
      black
    omit_executables: [black]
  - name: no-shims
    requirements: pytest
    executables_override: []
  • Automatic: First-order package scripts are exposed without duplication
  • Selective omission: Remove individual automatically discovered scripts
  • Exact override: Use any list, including [] to expose nothing

The legacy executables key emits a deprecation warning and will be removed in uv-toolbox 1.0. Use executables_override instead.

Usage

Install environments:

uv-toolbox install

After the first install, a pinned lockfile is written alongside each venv. Subsequent installs sync from it via uv's local cache — no network, no re-resolution. To upgrade to newer versions:

uv-toolbox install --upgrade   # re-resolve and refresh the lockfile

Generate a committed repo lockfile with hashes for all platform variants:

uv-toolbox lock   # writes uv-toolbox.lock next to your config file
uv-toolbox lock --check  # verifies existing pins remain valid without upgrading

Run a command inside an environment (uses the configured default if set, otherwise pass --env):

uv-toolbox exec --env env1 -- ruff --version

Add shim scripts to your PATH for direct tool access:

eval "$(uv-toolbox shim)"

This creates wrapper scripts for the console scripts declared by each environment's first-order requirements. Transitive package scripts and the venv's Python/pip executables are not exposed.

If you use mise, the mise plugin handles PATH management automatically on every shell activation — see the mise integration docs.

Metadata

Release files for uv-toolbox 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uv-toolbox 0.3.0
File Size Uploaded
uv_toolbox-0.3.0.tar.gz 18.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uv-toolbox 0.3.0
File Interpreter ABI Platform
uv_toolbox-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.7 kB

Release files / uv_toolbox-0.3.0.tar.gz

Download URL uv_toolbox-0.3.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0c09f7369ece52ffe24857b64a33a7432674f8cf89d5e76c211e44bbdab6c49c
BLAKE2b-256 checksum
How to use checksums
e7725fbbe965f4d6c55758e7574ec11df76ed1c3bac250af08a07107582120de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / uv_toolbox-0.3.0-py3-none-any.whl

Download URL uv_toolbox-0.3.0-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa7a03b68ec7f606829e5ee8b7f10811cad6bbc4dc4113ac266a553886affa20
BLAKE2b-256 checksum
How to use checksums
18f9372e91d033acd0f149eeca6146ad59373917e29713f84fed00dbd93f9e4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page