envon
Emit the activation command for the nearest or specified Python virtual environment, and install shell bootstrap wrappers for seamless activation in your favorite shell.
Features
- Auto-detects and activates Python virtual environments in your project.
- Supports multiple shells: bash, zsh, sh, fish, powershell, pwsh, nushell, cmd, csh/tcsh/cshell.
- Installs a shell bootstrap function for one-command activation.
- Flexible CLI flags for advanced usage.
Supported Shells
- bash (full auto-activation and deactivation)
- zsh (full auto-activation and deactivation)
- sh (full auto-activation and deactivation)
- fish (full auto-activation and deactivation)
- powershell, pwsh (full auto-activation, manual deactivation)
- cmd, batch, bat (prints command for manual activation and deactivation)
- nushell, nu (prints command for manual activation and deactivation)
- csh, tcsh, cshell (prints command for manual activation and deactivation)
For detailed shell support and limitations, see docs/user_guide.md.
Installation
Recommended: Install with pipx for isolated environments:
pipx install envon
Alternative: Install with pip (may fail on some distros like Ubuntu or Windows due to PEP 668):
python3 -m pip install envon
After installation, run:
envon --install
This detects your shell and sets up the bootstrap for auto-activation.
For more detailed installation instructions, see docs/installation.md.
Usage
After installation and bootstrap setup, run:
envon
This will activate the nearest virtual environment in your project.
Supported flags: --emit [SHELL], --print-path, --install [SHELL].
For advanced usage, examples, and all flags, see docs/user_guide.md.
Log in or sign up for Devpost to join the conversation.