A production-grade, cross-platform Python environment manager that enforces clean development practices and streamlines virtual environment workflows with IDE awareness.
Current: 1.1.0 License: MIT
- Automatic IDE Detection: Recognizes VSCode, PyCharm, Cursor, AntiGravity, Windsorf, and Jupyter
- Project Type Detection: Identifies jupyter, data-science, web, and standard projects
- Managed Environments: Centralized venvs in
~/.venvs/*(default, jupyter, IDE-specific) - Smart Priority Logic: Project Root → Jupyter Managed → IDE Managed → Default Fallback
- Host Python Protection: All pip installs go to managed venvs, never to system Python
New CLI Commands:
pem init-venvs # Initialize all managed virtual environments
pem list-venvs # List all managed venvs with Python versionsUniversal package manager abstraction supporting:
- Linux: apt, dnf, yum, pacman, zypper, apk
- macOS: brew
- Windows: choco
All templates now include:
- ✅ Pinned dependency versions for reproducibility
- ✅ Security-focused package selection
- ✅ Testing and code quality tools
Available Templates:
standard: Modern Python with pyproject.toml, pytest, ruff, black, mypyweb: FastAPI stack with uvicorn, pydantic, sqlalchemy, authenticationjupyter: JupyterLab with pandas, matplotlib, plotly, ipywidgetsdata-science: Conda environment with scikit-learn, numpy, seaborndevops: Ansible, boto3, docker, kubernetes, cloud SDKs
- bats-core: Unit testing for shell scripts
- Code Coverage: kcov integration
- Makefile Targets:
test-unit,test-all,test-coverage
- Unified CLI: Single
pemcommand for all operations - Cross-Platform Support: Linux (Debian, RHEL, Arch), macOS, Windows WSL2
- Configuration: Customizable via
~/.config/python-env-manager/config.env - Security: Vulnerability scanning with
pem scan - Health Checks: System diagnostics with
pem doctor - Analytics: Local usage tracking (opt-in)
- Shell Completion: Bash and Zsh support
git clone https://github.com/freddiedfre/python-env-manager.git
cd python-env-manager
make install# Create all managed venvs (~/.venvs/*)
pem init-venvs
# List all managed environments
pem list-venvs# Standard Python project
pem init my-project --type standard
# Jupyter/Data Science project (auto-uses ~/.venvs/jupyter)
pem init my-notebook --type jupyter
# Web application with FastAPI
pem init my-api --type webPEM automatically selects the best virtual environment:
- Project Root (
.venvin project directory) - always first choice - Jupyter Managed (
~/.venvs/jupyter) - for jupyter/data-science projects - IDE Managed (
~/.venvs/vscode,~/.venvs/pycharm, etc.) - for IDE-specific work - Default Fallback (
~/.venvs/default) - keeps host Python clean
- Configurable: Customize default packages, paths, and behavior via
config.env.
-
Clone the repository:
git clone https://github.com/freddiedfre/python-env-manager.git cd python-env-manager -
Install:
make install
This installs
pemto~/.local/binand sets up configuration. -
Shell Completion (Optional): Add the following to your
.bashrcor.zshrc:source ~/.local/share/python-env-manager/scripts/utils/completion.sh
pem init my-app standardCreates a new project with a .venv, installs dependencies, and configures VS Code.
pem listpem doctorpem scanpem backup- Setup Guide
- Architecture & Design
- Command Reference
- IDE Integration
- Advanced Usage
- Troubleshooting
- Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.