Skip to main content

Emit the activation command for the nearest Python virtual environment and install shell bootstrap wrappers.

Project description

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.

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!

  • TCSH/cshell and Nushell support need improvement (auto-activation, overlays).
  • 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.1.6

  • Added -V / --version flag to print the current version of envon.
  • 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 --emit flag 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 envon command (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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

envon-0.1.6.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

envon-0.1.6-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file envon-0.1.6.tar.gz.

File metadata

  • Download URL: envon-0.1.6.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for envon-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a8f5aacc42dac3b96f1f95dd306a10ce9ac8ca8289c38066fdb92a90baf61a21
MD5 2b1998242e8003dd266a4b1569ecf6c2
BLAKE2b-256 9bc3e005978a59b810b49d891114ec805d0662d313ac56adbb514eab7a49a01f

See more details on using hashes here.

File details

Details for the file envon-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: envon-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for envon-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e53f5b5915ff177a573408eddebc0976c7192366ce9c00ffd98eca6b23b898a1
MD5 32bbdf2dc6571dcd60327db03c66d16d
BLAKE2b-256 03e0440e11f58bde6250656c35f466870afb659ff7def0ed51768a4434aa5324

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page