auto-uv-env 🐍

License: MIT UV

Automatic UV-based Python virtual environment management for your shell. No more manual source .venv/bin/activate!

Why auto-uv-env?

Quick Start

1. Install auto-uv-env

Quick install (any system):

curl -LsSf https://auto-uv-env.ashwch.com/install.sh | sh

macOS with Homebrew (recommended for Mac):

brew tap ashwch/tap
brew install auto-uv-env

2. Add to your shell

Zsh (~/.zshrc):

source $(brew --prefix)/share/auto-uv-env/auto-uv-env.zsh

Bash (~/.bashrc):

source $(brew --prefix)/share/auto-uv-env/auto-uv-env.bash

Fish (~/.config/fish/config.fish):

source (brew --prefix)/share/auto-uv-env/auto-uv-env.fish

3. Start using it!

cd my-python-project/
# 🐍 Setting up Python 3.11 with UV...
# βœ… Virtual environment created
# πŸš€ UV environment activated (Python 3.11.5)

How It Works

  1. When you cd into a directory, auto-uv-env checks for pyproject.toml
  2. If no pyproject.toml exists, it skips processing (fast-path optimization)
  3. If found, it reads the requires-python field
  4. Uses UV to create a virtual environment with the correct Python version
  5. Activates the environment automatically
  6. Tracks which directory activated the environment
  7. When you leave the project tree, it deactivates the environment
  8. Manual virtual environments are never deactivated

Features

πŸš€ Performance Optimized (v1.0.7)

🎯 Intelligent Activation

πŸ›‘οΈ Security First

Requirements