Fast, precise, and user-friendly Python virtual environment management
Project description
๐ EnvFy - Professional Virtual Environment Manager
EnvFy is a fast, precise, and user-friendly Python virtual environment management tool that makes working with virtual environments as easy as using pip!
โจ Features
- ๐ Lightning-fast environment creation and management
- ๐จ Beautiful CLI with rich output and progress bars
- ๐ Smart Python detection - automatically finds all Python versions
- ๐ฆ Package management - install, uninstall, and manage packages effortlessly
- ๐ฏ Environment templates - quickly create environments from predefined templates
- ๐ Environment cloning - duplicate environments with all packages
- ๐พ Backup & restore - safely backup and restore environments
- ๐ง Advanced configuration - customize everything to your needs
- ๐ Cross-platform - works on Windows, macOS, and Linux
- โก Performance optimized - smart caching for faster operations
๐ Quick Start
Installation
๐ Cross-Platform Installation (Recommended)
One-Line Installation:
# Unix-like systems (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/Pymmdrza/envfy/main/install.sh | bash
# Windows PowerShell
iwr -useb https://raw.githubusercontent.com/Pymmdrza/envfy/main/install.ps1 | iex
๐ฆ Package Manager Installation
๐ง Linux:
# Ubuntu/Debian
sudo apt update && sudo apt install python3-pip
pip install envfy[uv]
# Fedora/RHEL/CentOS
sudo dnf install python3-pip
pip install envfy[uv]
# Arch Linux
sudo pacman -S python-pip
pip install envfy[uv]
# openSUSE
sudo zypper install python3-pip
pip install envfy[uv]
๐ macOS:
# Homebrew (recommended)
brew install python3
pip3 install envfy[uv]
# MacPorts
sudo port install py311-pip
pip install envfy[uv]
# Direct Python installation
pip3 install envfy[uv]
๐ช Windows:
# Using winget (Windows Package Manager)
winget install Python.Python.3.11
pip install envfy[uv]
# Using Chocolatey
choco install python3
pip install envfy[uv]
# Using Scoop
scoop install python
pip install envfy[uv]
# Direct pip installation
pip install envfy[uv]
๐ Manual Installation
# Basic installation
pip install envfy
# With UV support (ultra-fast package installation)
pip install envfy[uv]
# Development version with all features
pip install envfy[all]
# From source
git clone https://github.com/Pymmdrza/envfy.git
cd envfy
pip install -e .[uv]
โ Verify Installation
# Check installation
envfy --version
# Show platform information
envfy platform
# Test basic functionality
envfy create test-env --packages requests
envfy list
envfy delete test-env --force
Basic Usage
# Create a new environment
envfy create myproject
# Create with shorthand syntax
envfy --create --new myproject
envfy -c -n myproject
# Create with specific Python version
envfy create myproject --python 3.9
envfy --create --new myproject --python 3.9
# Create with packages
envfy create myproject --packages requests pandas numpy
envfy -c -n myproject --packages requests pandas
# Create with UV for ultra-fast installation
envfy create myproject --packages "fastapi uvicorn" --uv
envfy -c -n myproject --packages "django redis" --uv
# Create from requirements file
envfy create myproject --requirements requirements.txt
envfy --create --new myproject --requirements requirements.txt
# Create from requirements with UV
envfy create myproject --requirements requirements.txt --uv
# List all environments
envfy list
# Activate an environment (shows activation command)
envfy activate myproject
# Install packages in an environment
envfy install myproject requests beautifulsoup4
# Install packages with UV (ultra-fast!)
envfy install myproject --packages "numpy scipy matplotlib" --uv
# Clone an environment
envfy clone myproject myproject-backup
# Delete an environment
envfy delete myproject
๐ Documentation
Environment Management
Creating Environments
# Basic environment
envfy create webproject
# Basic environment (shorthand)
envfy --create --new webproject
envfy -c -n webproject
# With specific Python version
envfy create webproject --python 3.10
envfy -c -n webproject --python 3.10
# With description
envfy create webproject --description "Web scraping project"
envfy -c -n webproject --description "Web scraping project"
# With template
envfy create webproject --template web
envfy -c -n webproject --template web
# With packages and requirements
envfy create webproject \
--packages flask requests \
--requirements requirements.txt \
--python 3.9
# Shorthand with packages and requirements
envfy -c -n webproject \
--packages flask requests \
--requirements requirements.txt \
--python 3.9
Environment Information
# List all environments
envfy list
# Detailed listing
envfy list --detailed
# JSON output
envfy list --json
# Show specific environment info
envfy info webproject
Environment Operations
# Clone environment
envfy clone webproject webproject-v2
# Backup environment
envfy backup webproject
# Restore from backup
envfy restore backup.tar.gz newproject
# Delete environment
envfy delete webproject
# Rename environment
envfy rename oldname newname
Package Management
# Install packages
envfy install myproject requests pandas
# Install with options
envfy install myproject --upgrade requests
envfy install myproject --editable ./my-package
# Install from requirements
envfy install myproject --requirements requirements.txt
# Uninstall packages
envfy uninstall myproject requests
# Export requirements
envfy freeze myproject > requirements.txt
envfy freeze myproject --output requirements.txt
Python Version Management
# Show available Python versions
envfy python
# Create environment with specific version
envfy create project39 --python 3.9.7
envfy create project310 --python python3.10
Configuration
# Show current configuration
envfy config show
# Set configuration values
envfy config set default_python_version 3.9
envfy config set show_banner false
# Reset configuration
envfy config reset
Maintenance
# Diagnose issues
envfy doctor
# Clean caches
envfy clean
# Clean specific caches
envfy clean --environments
envfy clean --downloads
๐ฏ Advanced Usage
Environment Templates
Create reusable environment templates:
# ~/.envfy/templates/web.toml
[template]
name = "web"
description = "Web development environment"
python_version = "3.9"
[packages]
base = [
"flask>=2.0.0",
"requests>=2.25.0",
"beautifulsoup4",
"pytest",
"black",
"flake8"
]
[optional]
database = ["sqlalchemy", "alembic"]
async = ["aiohttp", "asyncio"]
Use template:
envfy create mywebapp --template web
Configuration File
Customize EnvFy behavior:
# ~/.envfy/config/config.toml
[global]
default_python_version = "3.9"
auto_activate = false
show_banner = true
colored_output = true
parallel_installs = true
max_workers = 4
[network]
timeout = 30
retries = 3
index_url = "https://pypi.org/simple/"
[cache]
enabled = true
ttl = 3600
Programmatic Usage
Use EnvFy in your Python scripts:
from envfy import EnvironmentManager, Environment
# Create manager
manager = EnvironmentManager()
# Create environment
env = manager.create_environment(
name="myproject",
python_version="3.9",
packages=["requests", "pandas"]
)
# Use environment
if env:
env.install_package("numpy")
packages = env.get_packages()
print(f"Installed packages: {len(packages)}")
# List environments
environments = manager.list_environments()
for env_name in environments:
env = manager.get_environment(env_name)
info = env.get_info()
print(f"{env_name}: {info.python_version}")
๐ ๏ธ Commands Reference
Core Commands
| Command | Description | Cross-Platform |
|---|---|---|
create |
Create a new virtual environment | โ All platforms |
delete |
Delete a virtual environment | โ All platforms |
list |
List all environments | โ All platforms |
info |
Show detailed environment information | โ All platforms |
activate |
Show activation command | โ All platforms |
clone |
Clone an environment | โ All platforms |
Package Commands
| Command | Description | Cross-Platform |
|---|---|---|
install |
Install packages in environment | โ All platforms |
uninstall |
Uninstall packages from environment | โ All platforms |
freeze |
Export environment packages | โ All platforms |
System Commands
| Command | Description | Cross-Platform |
|---|---|---|
python |
Show available Python versions | โ All platforms |
platform |
Show platform info and installation methods | โ All platforms |
config |
Configuration management | โ All platforms |
clean |
Clean caches and temporary files | โ All platforms |
doctor |
Diagnose and fix issues | โ All platforms |
Platform-Specific Features
Windows:
- PowerShell and Command Prompt support
- Windows Terminal integration
- Automatic PATH configuration
- UAC-aware installation
macOS:
- Homebrew integration
- Apple Silicon (M1/M2) support
- Xcode command line tools detection
- Framework Python support
Linux:
- Distribution package manager integration
- Snap/Flatpak support
- pyenv compatibility
- SELinux compatibility
Command Options
Most commands support these common options:
| Option | Description |
|---|---|
--force |
Force operation without confirmation |
--verbose |
Enable verbose output |
--help |
Show command help |
๐ง Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
ENVFY_HOME |
EnvFy home directory | ~/.envfy |
ENVFY_CONFIG |
Configuration file path | ~/.envfy/config/config.toml |
Directory Structure
~/.envfy/
โโโ config/
โ โโโ config.toml # Global configuration
โ โโโ environments/ # Environment-specific configs
โโโ environments/ # Virtual environments
โโโ templates/ # Environment templates
โโโ cache/ # Cache and temporary files
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Clone repository
git clone https://github.com/pymmdrza/envfy.git
cd envfy
# Create development environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install in development mode
pip install -e .[dev]
# Run tests
pytest
# Format code
black envfy/
isort envfy/
# Lint code
flake8 envfy/
mypy envfy/
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
- ๐ Documentation
- ๐ Issue Tracker
- ๐ฌ Discussions
- ๐ง Email Support
๐ Acknowledgments
- Built with Click for the CLI
- Beautiful output powered by Rich
- Virtual environments created with virtualenv
- Configuration management using TOML
โก UV Integration - Ultra-Fast Package Installation
EnvFy integrates seamlessly with UV, the ultra-fast Python package installer and resolver written in Rust. UV can be 10-100x faster than pip for package installation!
๐ Why Use UV with EnvFy?
- ๐ฅ Blazing Fast: 10-100x faster than pip
- ๐ง Smart Caching: Intelligent dependency resolution
- ๐ Reliable: Production-ready with excellent compatibility
- ๐ชถ Lightweight: Minimal overhead, maximum performance
๐ฆ Installation
# Install EnvFy with UV support
pip install envfy[uv]
# Or install UV separately
pip install uv
# Or use UV to install EnvFy itself!
uv pip install envfy
๐ฏ Usage Examples
Environment Creation with UV
# Create environment and install packages with UV
envfy create myproject --packages "fastapi uvicorn" --uv
# Shorthand with UV
envfy -c -n myproject --packages "django psycopg2-binary" --uv
# From requirements file with UV
envfy create webapp --requirements requirements.txt --uv
Package Management with UV
# Install packages using UV (ultra-fast!)
envfy install myproject --packages "numpy pandas matplotlib" --uv
# Upgrade packages with UV
envfy install myproject --upgrade "requests aiohttp" --uv
# Install from requirements with UV
envfy install myproject --requirements requirements.txt --uv
โก Performance Comparison
| Operation | pip | UV | Speedup |
|---|---|---|---|
| Install numpy | 8.2s | 0.9s | 9.1x |
| Install Django | 12.4s | 1.2s | 10.3x |
| Install 50 packages | 3m 21s | 24s | 8.4x |
| Cold dependency resolution | 45s | 3s | 15x |
๐ง Configuration
You can set UV as the default package manager:
# Set UV as default for new environments
envfy config set default_package_manager uv
# Always use UV for installations
envfy config set always_use_uv true
๐ก Pro Tips
-
First-time setup: Install UV globally for maximum benefit
curl -LsSf https://astral.sh/uv/install.sh | sh
-
Hybrid approach: Use UV for fast installs, pip for compatibility
envfy install myproject --packages "common-package" --uv envfy install myproject --packages "edge-case-package" # uses pip
-
CI/CD optimization: UV dramatically speeds up CI pipelines
# .github/workflows/test.yml - name: Create test environment run: envfy create test-env --requirements requirements.txt --uv
๐ค UV + EnvFy Integration Features
- ๐ Automatic fallback: Falls back to pip if UV is not available
- ๐ฏ Selective usage: Choose UV per command with
--uvflag - ๐ Performance monitoring: Track installation speeds
- ๐ง Full compatibility: All EnvFy features work with UV
- โ๏ธ Configuration: Set UV as default in global config
๐ ๏ธ Advanced UV Usage
# Create environment with UV and specific Python version
envfy -c -n ml-project --python 3.11 --packages "torch tensorflow" --uv
# Clone environment and upgrade all packages with UV
envfy clone old-env new-env
envfy install new-env --upgrade-all --uv
# Export and recreate with UV for faster setup
envfy freeze old-env > requirements.txt
envfy create fast-env --requirements requirements.txt --uv
Made with โค๏ธ by the EnvFy team
Fast, Precise, Professional Virtual Environment Management
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file envfy-1.0.6.tar.gz.
File metadata
- Download URL: envfy-1.0.6.tar.gz
- Upload date:
- Size: 46.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b0c0b66cbe83330644136d170d779367fa81540950492bc19d83d9883e4311
|
|
| MD5 |
a41b694505312a758cf8d37d5e92129b
|
|
| BLAKE2b-256 |
b59efe35efb5221999c87b698d5dd54a84da3c2e9939ca2711c226c174e6c0a9
|
File details
Details for the file envfy-1.0.6-py3-none-any.whl.
File metadata
- Download URL: envfy-1.0.6-py3-none-any.whl
- Upload date:
- Size: 47.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ce4ba8afe47e8367af555a0ed939cade168b41b94e4a8431d2e40e60901b957
|
|
| MD5 |
bd0c549cbed1b4fc7aa983b680b2abaf
|
|
| BLAKE2b-256 |
e9576e7bb4da018e63d2d299fc6c651afc89aafca363be799490d30375f46313
|