Intelligent Python virtual environment manager
Project description
venvy - Python Virtual Environment Manager
The smartest way to manage Python virtual environments
What is venvy?
venvy is an intelligent command-line tool that automatically discovers, analyzes, and manages Python virtual environments across your entire system. Stop manually hunting for forgotten environments, wondering which ones are safe to delete, or struggling with disk space issues.
Key Features
- 🔍 Smart Discovery - Automatically finds all Python environments (venv, conda, pyenv, virtualenv)
- 📊 Intelligent Analysis - Shows usage patterns, disk space, health status, and cleanup suggestions
- 🧹 Safe Cleanup - Remove unused environments with confidence using AI-powered recommendations
- 💾 Space Management - Identify space hogs and duplicate environments
- 🏥 Health Monitoring - Detect broken, outdated, or corrupted environments
- 🎨 Beautiful Interface - Rich terminal output with tables, progress bars, and colors
- ⚡ Cross-Platform - Works seamlessly on Windows, macOS, and Linux
Installation
pip install venvy
That's it! No complex setup, no configuration files needed.
Quick Start
# List all virtual environments
venvy list
# Show disk usage analysis
venvy size
# Get intelligent cleanup suggestions
venvy suggest
# Remove unused environments safely
venvy clean --unused 90
# Get detailed info about an environment
venvy info myproject-env
Why Choose venvy?
Problem: Virtual Environment Chaos
- Forgotten environments scattered across your system
- Gigabytes of disk space wasted on unused environments
- No easy way to identify which environments are safe to remove
- Broken environments that cause mysterious errors
- Time wasted manually hunting for environment locations
Solution: Intelligent Management
venvy solves these problems with smart automation:
$ venvy list
Environment Type Python Size Health Last Used
project1-venv venv 3.9.7 245 MB Healthy 2 days ago
old-django-project venv 3.8.0 1.2 GB Broken 4 months ago
data-science conda 3.10.2 892 MB Healthy 1 week ago
temp-test venv 3.9.7 156 MB Outdated 6 months ago
$ venvy suggest
Cleanup Suggestions:
Environment Reason Space Risk Confidence
old-django-project Broken and unused for 120 days 1.2 GB Low 95%
temp-test Unused for 180 days 156 MB Low 87%
Potential space savings: 1.4 GB
Core Commands
Environment Discovery
venvy list # List all environments
venvy list --type conda # Filter by type (venv, conda, pyenv)
venvy list --sort size # Sort by size, age, or usage
venvy list --format json # Machine-readable output
Space Analysis
venvy size # Show environments by size
venvy size --top 5 # Show 5 largest environments
venvy duplicates # Find similar environments
Health & Maintenance
venvy health # Overall health report
venvy doctor myenv # Deep health check for specific environment
venvy stats # System-wide statistics
Smart Cleanup
venvy suggest # Get cleanup recommendations
venvy clean --unused 30 # Remove environments unused for 30+ days
venvy clean --dry-run # Preview what would be removed
venvy remove myenv # Remove specific environment
Advanced Features
Intelligent Analysis
venvy doesn't just list environments - it provides insights:
- Usage Tracking: Knows which environments you actually use
- Health Monitoring: Detects broken Python executables, missing dependencies
- Space Optimization: Identifies duplicate packages and cache bloat
- Project Association: Links environments to their projects automatically
- Security Scanning: Finds environments with outdated packages
Safe Operations
Every destructive operation includes safety measures:
- Automatic Backups: Creates backups before removal
- Confidence Scoring: AI-powered risk assessment for cleanup suggestions
- Dry Run Mode: Preview changes before applying them
- Confirmation Prompts: Prevents accidental deletions
Professional Output
Beautiful, informative displays that work great in terminals and CI/CD:
- Rich Tables: Sortable columns with color-coded health indicators
- Progress Bars: Visual feedback for long operations
- JSON Export: Perfect for scripting and automation
- Cross-Platform: Consistent experience across operating systems
Use Cases
For Individual Developers
- Clean up development machine: Remove old project environments safely
- Disk space management: Identify and remove space-wasting environments
- Environment health: Find and fix broken development environments
- Project organization: See which environments belong to which projects
For Development Teams
- Standardize environment management: Consistent cleanup policies across team
- CI/CD integration: Automated environment cleanup in build pipelines
- Onboarding: Help new developers clean up their development setup
- Documentation: Generate environment inventory reports
For System Administrators
- Server maintenance: Clean up unused environments on shared development servers
- Disk space monitoring: Proactive identification of space usage issues
- Environment auditing: Security and compliance reporting
- Automated cleanup: Scheduled cleanup of unused environments
Technical Details
Supported Environment Types
- venv - Python 3.3+ built-in virtual environments
- virtualenv - Traditional virtual environment tool
- conda - Anaconda/Miniconda environments
- pyenv - Python version management environments
Detection Methods
- Smart Scanning: Looks in common locations (
~/venvs,~/.virtualenvs, etc.) - Configuration Files: Reads
pyvenv.cfg,conda-meta/,.python-version - Custom Paths: Supports user-defined search locations
- Symbolic Link Resolution: Handles complex directory structures
Performance Optimizations
- Parallel Processing: Multi-threaded environment scanning
- Smart Caching: Avoids re-analyzing unchanged environments
- Lazy Loading: Only analyzes environments when needed
- Memory Efficient: Minimal memory footprint even with hundreds of environments
Safety Features
- Backup Creation: Automatic backups before destructive operations
- Permission Handling: Graceful handling of permission-denied scenarios
- Error Recovery: Robust error handling and reporting
- Verification: Confirms successful operations
Configuration
venvy works perfectly out-of-the-box, but can be customized:
# Add custom search paths
venvy config --add-path ~/my-projects/envs
# Set default cleanup threshold
venvy config --set default-unused-days 60
# Configure output format
venvy config --set output-format table
Configuration is stored in your system's standard config directory and syncs across sessions.
Python Virtual Environment Management Best Practices
venvy embodies Python virtual environment best practices:
- Regular Cleanup: Remove unused environments to free disk space
- Health Monitoring: Keep environments updated and functional
- Organization: Maintain clear project-environment associations
- Documentation: Know what environments you have and why
- Automation: Use tools like venvy instead of manual management
FAQ
Q: Is it safe to use venvy to delete environments?
A: Yes! venvy creates automatic backups and uses confidence scoring to ensure safe cleanup recommendations.
Q: Will venvy work with my existing environments?
A: Absolutely. venvy works with all standard Python environment tools and doesn't modify your existing setup.
Q: Can I use venvy in scripts or CI/CD?
A: Yes! venvy supports JSON output, quiet modes, and non-interactive operation perfect for automation.
Q: Does venvy require admin/root privileges?
A: No. venvy only needs access to your user directories and respects file permissions.
Contributing
We welcome contributions! venvy is open source and community-driven.
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Code Contributions: Pull Requests
License
MIT License - see LICENSE file for details.
Keywords
Python virtual environment manager, venv cleanup, conda environment management, Python development tools, disk space cleanup, environment health monitoring, Python project management, development workflow optimization, virtual environment discovery, Python environment analysis
Made with ❤️ by Pranav Kumaar
venvy - Because managing Python virtual environments should be intelligent, not manual.
Project details
Release history Release notifications | RSS feed
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 venvy-0.1.1.tar.gz.
File metadata
- Download URL: venvy-0.1.1.tar.gz
- Upload date:
- Size: 41.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3739dec17c854113cac63facd88115584f8518879752b5e7ba83e0f6c2b726c4
|
|
| MD5 |
bcaa0d14131de589ef022dffb357abea
|
|
| BLAKE2b-256 |
b221796608a17a7dff05d6ee35b21109225c392894a1b9da05ce02b9706d5fd5
|
Provenance
The following attestation bundles were made for venvy-0.1.1.tar.gz:
Publisher:
python-publish.yml on pranavkumaarofficial/venvy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
venvy-0.1.1.tar.gz -
Subject digest:
3739dec17c854113cac63facd88115584f8518879752b5e7ba83e0f6c2b726c4 - Sigstore transparency entry: 465985667
- Sigstore integration time:
-
Permalink:
pranavkumaarofficial/venvy@2891b4f65303a59c83258fa7b394df8232a569c1 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/pranavkumaarofficial
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2891b4f65303a59c83258fa7b394df8232a569c1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file venvy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: venvy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 39.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ae73d80fe1ee849877bc9d8f2ab7e0aa5bd67aad03295de37aaf807602f1e00
|
|
| MD5 |
72469e2736ae488913e4d32d095096bb
|
|
| BLAKE2b-256 |
3bfccd6f9b80ea698fc17c6f9759a3176852a89c8a3cecfc1ca8f85a833d097c
|
Provenance
The following attestation bundles were made for venvy-0.1.1-py3-none-any.whl:
Publisher:
python-publish.yml on pranavkumaarofficial/venvy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
venvy-0.1.1-py3-none-any.whl -
Subject digest:
7ae73d80fe1ee849877bc9d8f2ab7e0aa5bd67aad03295de37aaf807602f1e00 - Sigstore transparency entry: 465985692
- Sigstore integration time:
-
Permalink:
pranavkumaarofficial/venvy@2891b4f65303a59c83258fa7b394df8232a569c1 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/pranavkumaarofficial
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2891b4f65303a59c83258fa7b394df8232a569c1 -
Trigger Event:
release
-
Statement type: