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)
- csh, tcsh, cshell (full auto-activation and deactivation)
- nushell, nu (full auto-activation and deactivation)
- powershell, pwsh (full auto-activation, manual deactivation)
- cmd, batch, bat (prints command for manual activation and deactivation)
For detailed shell support and limitations, see docs/user_guide.md.
Supported Environments
- Linux/Unix/macOS: Native support for all major shells.
- Windows (Native): PowerShell and CMD.
- Windows (POSIX Layers): Inside MSYS2 and Git Bash, we support all the same shells that are supported on Linux, Unix, or macOS.
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: -V, --version, --emit [SHELL], --print-path, --install [SHELL].
For advanced usage, examples, and all flags, see docs/user_guide.md.
Development
For development setup, building, and project structure, see docs/development.md.
Contributor Note
envon is in its early phase. Basic functionality is solid, but we welcome help!
- Nushell support needs improvement (auto-activation, overlays).
- Additional shell support (ksh, xonsh, elvish) would be valuable additions.
- If you find issues, please raise an issue.
- If you'd like to contribute, fork and submit a PR—contributions are very welcome!
Let's make envon the best Python venv activator for every shell!
Release Notes
Version 0.2.0
- Full automatic activation and deactivation across all 7 major Unix shells (
bash,sh,zsh,fish,csh,tcsh,nushell). - First-class Nushell support with unbuffered real-time interactive selection menu streaming and dynamic prompt customization (
(venv)prefix). - Out-of-the-box support for stdlib
python -m venvenvironments in Nushell without requiring third-partyvirtualenvoractivate.nu. - Complete C-Shell (
csh) and TC-Shell (tcsh) support with strict variable cleanup and zero environment leakage. - Added deactivation guards across all shell wrappers to prevent collisions with host/system deactivator scripts.
- Hardened filesystem scanning against permission crashes (
PermissionError/OSError) in restricted directories (such as/tmp/systemd-private*). - Resolved
--command-line argument separator handling across all wrapper scripts.
Version 0.1.6
- Added
-V/--versionflag to print the current version ofenvon. - Added robust support for MSYS2 and Git Bash environments on Windows (now supporting all the same shells as on Linux, Unix, or macOS).
- Resolved interactive selection crashes in Mintty-based terminals (Git Bash/MSYS2).
- Fixed Zsh command substitution capturing hidden carriage returns in MSYS2.
- Improved shell detection and activation for all supported shells via explicit
--emitflag in bootstrap wrappers.
Version 0.1.5
- Improved venv resolution logic: defaults to active venv if present before falling back to WORKON_HOME.
- Added WORKON_HOME fallback for default
envoncommand (no arguments). - Auto-selection of single environment in WORKON_HOME.
- Fixed shadowing issues where WORKON_HOME could override active environments.
Version 0.1.4
This is one of the initial releases of envon. A lot of work is still ongoing, especially in the testing, CI, and adding support for missing shells (e.g., full auto-activation for Nushell and csh/tcsh).
If you see any issues, feel free to open an issue. If you're interested in contributing, feel free to submit a PR. If you have ideas or anything regarding the project, feel free to open a discussion or feature request in an issue.
Check out the project on PyPI.
Metadata
Release files for envon 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| envon-0.2.0.tar.gz | 20.7 kB | Without provenance | Details for envon-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| envon-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for envon-0.2.0-py3-none-any.whl |
Total release size: 40.2 kB
Release files / envon-0.2.0.tar.gz
| Download URL | envon-0.2.0.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a8be21788ad83620d0900274a954d5c0432807618746688525d720c0e64c960
|
|
BLAKE2b-256 checksum How to use checksums |
f3f0b5ef7a3fe383b07f45fff45cd5240696da5746f8c861e187a05f38048e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / envon-0.2.0-py3-none-any.whl
| Download URL | envon-0.2.0-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e035b0ca5f266ddaffc625f15ad01f51687155eb789e6695c08f38c1afb9dd6
|
|
BLAKE2b-256 checksum How to use checksums |
510c1e3c0f2e18a9ee8cedbecad5f2379765cf555fa31afc898b44b605850227
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for envon 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.