vx-tool-uv
UV Python tool support for the vx universal tool manager.
Overview
vx-tool-uv provides UV (Extremely fast Python package installer and resolver) support for vx, enabling automatic installation, version management, and execution of UV commands through the vx interface.
Features
- UV Package Manager: Lightning-fast Python package installation
- UVX Support: Python application runner with environment isolation
- Auto-Installation: Automatic download and installation of UV
- Cross-Platform: Windows, macOS, and Linux support
- Virtual Environment: Seamless integration with UV's venv management
- Pip Compatibility: Drop-in replacement for pip commands
- Performance: 10-100x faster than traditional pip
Supported Commands
UV Package Manager
# Package installation
# Package management
# Virtual environments
UVX Application Runner
# Run Python applications
# Run with specific versions
# Install and run
UV Project Management
# Initialize projects
# Add dependencies
# Run commands
Installation
Through vx CLI
# Install latest version
# Install specific version
Version Constraints
# Semantic version ranges
Configuration
Project Configuration (.vx.toml)
[]
= "latest" # Latest stable version
# uv = "0.1.5" # Specific version
# uv = "^0.1.0" # Version range
[]
= true
= "3.11" # Default Python version
Global Configuration
[]
= "latest"
= true
= 300
[]
= "https://pypi.org/simple/"
= []
= []
= "~/.cache/uv"
Python Version Management
Python Discovery
UV automatically discovers Python installations:
# Use system Python
# Use specific Python path
# Use Python from PATH
Virtual Environment Integration
# Create virtual environment
# Activate and use
# Or use uv run directly
Platform Support
Windows
- x64: Full support
- x86: Limited support
- ARM64: Windows 11 ARM support
macOS
- x64: Intel Mac support
- ARM64: Apple Silicon (M1/M2) support
- Universal: Automatic architecture detection
Linux
- x64: All major distributions
- ARM64: ARM-based systems
- musl: Alpine Linux support
Performance Benefits
Speed Comparison
- 10-100x faster than pip for package installation
- Parallel downloads and installations
- Efficient dependency resolution
- Smart caching of packages and metadata
Benchmarks
# Traditional pip
# UV
Integration
With vx-core
use ;
use UvTool;
let uv_tool = new;
let manager = new;
// Install UV
manager.install_tool.await?;
// Execute UV commands
manager.execute_tool.await?;
Plugin Registration
use ;
use UvPlugin;
let plugin = new;
let mut manager = new;
manager.register_plugin?;
Development
Building
Testing
Integration Testing
# Test with actual UV installation
Implementation Details
Tool Structure
- UvTool: Main UV package manager tool
- UvxTool: UVX application runner support
- UvProjectTool: UV project management commands
Version Resolution
- Project Config: Check
.vx.tomlfor version specification - Global Config: Fall back to global default
- Latest Stable: Use latest stable if no version specified
- Auto-Install: Download and install if not available
Installation Process
- Version Lookup: Query UV release API
- Download: Fetch appropriate binary for platform
- Extraction: Extract to vx tools directory
- Verification: Verify installation integrity
- Configuration: Set up UV configuration
Migration from Pip
Command Mapping
# pip commands -> uv equivalents
Configuration Migration
# pip.conf -> uv configuration
# Equivalent UV configuration
Error Handling
Common Errors
- Network Issues: Download failures, index timeouts
- Permission Errors: Installation directory access
- Python Not Found: Missing Python installation
- Package Conflicts: Dependency resolution failures
Recovery
# Reinstall UV
# Clear UV cache
# Use system pip as fallback
Security
- Checksum Verification: SHA256 verification of downloads
- HTTPS Only: Secure downloads from official sources
- Package Verification: Verification of package integrity
- Isolated Execution: Sandboxed package installation
Troubleshooting
Installation Issues
# Check UV installation
# Verify Python availability
# Check UV cache
# Force reinstall
Runtime Issues
# Debug UV commands
# Check UV configuration
# Test with system Python
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please see the contributing guidelines for more information.
Related Crates
vx-core- Core functionalityvx-cli- Command-line interfacevx-tool-node- Node.js toolvx-tool-python- Python tool