Skip to main content

Repo Docs PyPI license PyPI version Code style: ruff uv

uv-workon

Command line program uv-workon to work with multiple uv based virtual environments.

Overview

uv has taken the python world by storm, and for good reason. It manages projects, dependencies, virtual environment creation, and much more, all while being blazingly fast. One of the central ideas of uv is that the old method of activating virtual environments should be replace with uv run ... and letting uv figure out the rest. We fully agree with this workflow, but it does run counter to how many have used python virtual environments day to day for data work. For example, many have historically used tools like conda or virtualenvwrapper to manage centrally located python environments, that can be reused for multiple tasks. While we discorage using "mega" environments (i.e., sticking every dependency you'll ever need in a single python environments), there is utility in using a virtual environment for multiple tasks. There is active discussion regarding if and how uv should manage centralized virtual environments.

We takes the perspective that python virtual environments should be managed with uv inside a project. uv-workon allows for the usage of such virtual environments outside the project. The basic workflow is as follows:

  1. Create a project my-project using uv init ...
  2. Create a virtual environment my-project/.venv using uv sync ...
  3. Link to central location using uv-workon link my-project

Now, from anywhere, you can use the virtual environment my-project:

  • Activate with uv-workon activate -n my-project
  • Run python using the my-project virtual environment with uv-workon run -n my-project ...
  • Change to the my-project project directory with uv-workon cd -n my-project

Features

  • Link virtual environment to central location with uv-workon link. These links are located at WORKON_HOME environment variable, defaulting to ~/.virtualenvs.
  • Activate virtual environment with uv-workon activate ... (requires shell integration)
  • Run under virtual environment with uv-workon run ...
  • Change to project directory with uv-workon cd ... (requires shell integration)
  • List available virtual environments with uv-workon list
  • Cleanup missing symlinks with uv-workon clean
  • Manage ipykernel with uv-workon kernels ...
    • Install kernels for linked virtual environments which have ipykernel installed with uv-workon kernels install ...
    • Remove kernels (including remove all missing/broken kernels) with uv-workon kernels remove ...
    • list installed kernels with uv-workon kernels list ...

Status

This package is actively used by the author. Please feel free to create a pull request for wanted features and suggestions!

Quick start

It is recommended to install with uv:

uv tool install uv-workon

To include the ability to manage ipykernel, include the jupyter extra:

uv tool install "uv-workon[jupyter]"

Add autocompletion

Run the following to add autocompletion for uv-workon:

uv-workon --install-completion

Shell integration

To use uv-workon activate and uv-workon cd, you must enable the shell configuration with `eval "$(uv-workon shell-config)", or add it to you config script with:

# for zsh
echo 'eval "$(uv-workon shell-config)"' >> ~/.zshrc
# for bash
echo 'eval "$(uv-workon shell-config)"' >> ~/.bashrc
# for fish
echo 'uv-workon shell-config | source' >> ~/.config/fish/completions/uv-workon.fish

Open a issue if you need support for another shell.

Documentation

See the documentation for further details.

What's new?

See changelog.

License

This is free software. See LICENSE.

Related work

Any other stuff to mention....

Contact

The author can be reached at wpk@nist.gov.

Credits

This package was created using Cookiecutter with the usnistgov/cookiecutter-nist-python template.

Release files for uv-workon 0.8.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-workon 0.8.0
File Size Uploaded
uv_workon-0.8.0.tar.gz 23.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uv-workon 0.8.0
File Interpreter ABI Platform
uv_workon-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.9 kB

Release files / uv_workon-0.8.0.tar.gz

Download URL uv_workon-0.8.0.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b8b1be1d4dc3e8217a5f99da025a64cb90571217be8be4953586775731643908
BLAKE2b-256 checksum
How to use checksums
30fdc71fd33d1ba545778bc615e68521dbbeb048c1f33c382fbf2531b74bbac6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release files / uv_workon-0.8.0-py3-none-any.whl

Download URL uv_workon-0.8.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
811cdafddc52c1fd6b532b34af38249551b87e1a35a61ac2dc3b99336eaf0e23
BLAKE2b-256 checksum
How to use checksums
3dd671d8f5761c0e90c2eced43f918a1003ea9d453943e3a4eccb9100834ef9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

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