mvx 0.8.0
mvx 0.8.0
π Major Features
Automatic Tool Commands
- Dynamic Command Generation: All registered tools (go, java, node, maven, mvnd) now automatically generate commands
- Zero Configuration: Run
./mvx go version,./mvx node --version,./mvx java -versionwithout manual setup - Auto-Installation: Tools are automatically installed when first used
- Environment Setup: Proper PATH and environment variables (GOROOT, JAVA_HOME, etc.) configured automatically
- Coexistence: Automatic commands work alongside existing dedicated commands (like
mvn)
Improved Download Strategy
- Maven/Mvnd: Alternating URL strategy instead of exhausting retries on first URL
- Better Reliability: Try both primary and archive URLs with reduced retries per URL
- Faster Fallback: 1 retry per URL, 3 total attempts instead of 3 retries on first URL then fallback
π§ Architecture Improvements
SOLID Principle Compliance
- Interface Consolidation: Merged URLProvider and ChecksumProvider into cohesive Tool interface
- Constants Extraction: Centralized magic numbers, timeouts, and URLs in constants.go
- Configuration Providers: Abstract environment variable access through provider interfaces
- Platform Abstraction: Added PlatformMapper for cross-platform binary handling
- Error Standardization: Unified error types and wrapping across all tools
Tool Implementation Enhancements
- Maven/Mvnd: Added GetChecksum methods with Apache archive SHA512 verification
- Node.js: Enhanced SHASUMS256.txt parsing with better error handling
- Java: Integrated Foojay Disco API checksum verification
- Go: Maintained existing go.dev API integration
- All Tools: Unified URL generation and checksum verification methods
π οΈ Technical Improvements
Download System
- Permissive Size Checks: Made download size validation more permissive to rely on checksums
- Better Validation: Checksums provide superior validation compared to arbitrary size limits
- Compatibility: Supports older tool versions and different distributions
Command System
- Polymorphic Design: Replaced tool-specific switch statements with polymorphic manager methods
- Code Reduction: Eliminated 300+ lines of duplicated tool-specific command handling
- Extensibility: New tools require zero changes to existing command/download code
π Bug Fixes
- Node.js LTS Resolution: Fixed stale cache entries causing incorrect version resolution
- Version Caching: Improved 24-hour cache invalidation for version resolutions
- Environment Variables: Better handling of tool version overrides (MVX_*_VERSION)
π Performance
- Parallel Tool Installation: Improved tool installation performance
- Reduced API Calls: Better caching strategy for version resolutions
- Faster CI: Optimized integration tests with lightweight Maven goals
π Installation
Using the wrapper (recommended):
curl -fsSL https://raw.githubusercontent.com/gnodet/mvx/main/install-wrapper.sh | bash
./mvx versionDirect download:
# Linux x64
curl -fsSL https://github.com/gnodet/mvx/releases/download/v0.8.0/mvx-linux-amd64 -o mvx
chmod +x mvx
# macOS x64
curl -fsSL https://github.com/gnodet/mvx/releases/download/v0.8.0/mvx-darwin-amd64 -o mvx
chmod +x mvx
# Windows x64
curl -fsSL https://github.com/gnodet/mvx/releases/download/v0.8.0/mvx-windows-amd64.exe -o mvx.exeπ¦ Assets
| Platform | Architecture | Binary | Checksum |
|---|---|---|---|
| Linux | x64 | mvx-linux-amd64 |
mvx-linux-amd64.sha256 |
| Linux | ARM64 | mvx-linux-arm64 |
mvx-linux-arm64.sha256 |
| macOS | x64 | mvx-darwin-amd64 |
mvx-darwin-amd64.sha256 |
| macOS | ARM64 | mvx-darwin-arm64 |
mvx-darwin-arm64.sha256 |
| Windows | x64 | mvx-windows-amd64.exe |
mvx-windows-amd64.exe.sha256 |
π Verification
Verify checksums:
curl -fsSL https://github.com/gnodet/mvx/releases/download/v0.8.0/checksums.txt
sha256sum -c checksums.txt