Files
FazleArefin 5b5265d677 feat(uv-env): add plugin for Astral's uv (#13914)
* feat(uv-env): create plugin

This plugin automatically activates/deactivates a uv-managed virtual
environment when you cd into or out of a project directory. It looks
for pyproject.toml and uv.lock to detect a uv project, and reads
UV_PROJECT_ENVIRONMENT to support custom venv locations.

* fix(uv-env): address review feedback from robbyrussell

- Add `local` to venv_dir to prevent leaking into user's shell
- Replace `export` with `typeset -g` for uv_active and uv_dir
- Use `autoload -Uz` to match the style guide
2026-09-05 11:13:45 -07:00

351 B

uv Environment Plugin

This plugin automatically activates the uv virtual environment when you cd into a project directory, and deactivates it when you cd out. Note: Script looks for pyproject.toml and uv.lock files to determine if it's a uv project

To use it, add uv-env to the plugins array in your zshrc file:

plugins=(... uv-env)