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.2

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.2
File Size Uploaded
uv_toolbox-0.3.2.tar.gz 20.1 kB Details

Built distribution (wheel)

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

Total release size: 44.3 kB

Release files / uv_toolbox-0.3.2.tar.gz

Download URL uv_toolbox-0.3.2.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
da7760d44fa56fa83e5b7ba7c6b72fe7b447366cfbbc3ef211f6f0a33cc5be40
BLAKE2b-256 checksum
How to use checksums
dfd4f3fdd76c8c3eab0ce0463af185d63742ef69434d40105bd06d38b499d1af
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.2-py3-none-any.whl

Download URL uv_toolbox-0.3.2-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
430e5f49842cef06c14d07e945a2bfe1096a7ba52f0c13c1ce9911e4e9de1ec9
BLAKE2b-256 checksum
How to use checksums
08be3c858dae4dc5727c7462a1012e81f201a5338f2d0cf1de15cd56e2359bed
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

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

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