jfvm Wiki ‐ Comprehensive Guide - bhanurp/jfvm GitHub Wiki
- Overview
- Installation
- Core Commands
- Advanced Features
- Video Tutorials
- Configuration
- Use Cases
- Troubleshooting
- Contributing
jfvm (JFrog CLI Version Manager) is a powerful CLI tool designed to simplify the management of multiple JFrog CLI versions. Inspired by popular version managers like nvm
, sdkman
, and volta
, jfvm provides:
- 🔄 Version Management: Install, switch, and remove JFrog CLI versions
- 🏷️ Aliasing: Create meaningful names for versions (e.g.,
prod
,dev
) - 🔗 Local Linking: Use custom-built JFrog CLI binaries
- 📁 Project-specific Versions: Automatic version switching via
.jfrog-version
files - ⚡ Performance Analysis: Benchmark commands across versions
- 🔍 Version Comparison: Side-by-side command output comparison
- 📊 Usage Analytics: Track command usage and patterns
- 🎯 Shim Integration: Transparent command redirection
- Command Comparison: Compare outputs between versions with git-like diffs
- Performance Benchmarking: Statistical analysis across multiple versions
- Usage History: Comprehensive tracking with analytics
- Enhanced Shim: Automatic timing and history recording
- Rich Terminal Output: Colored output with multiple formats
# Add the tap
brew tap bhanurp/jfvm
# Install jfvm
brew install jfvm
brew install https://raw.githubusercontent.com/bhanureddy/homebrew-jfvm/main/jfvm.rb
# Clone the repository
git clone https://github.com/bhanurp/jfvm.git
cd jfvm
# Build and install
make install
Add jfvm's shim to your PATH by adding this to your shell profile (.zshrc
, .bashrc
, etc.):
export PATH="$HOME/.jfvm/shim:$PATH"
Reload your shell or run:
source ~/.zshrc # or your shell's config file
Install a specific version of JFrog CLI from JFrog's release server.
# Install specific version
jfvm install 2.74.0
# Install latest version
jfvm install latest
Switch to a specific version or alias. Supports project-specific versions via .jfrog-version
files.
# Use specific version
jfvm use 2.74.0
# Use alias
jfvm use prod
# Use version from .jfrog-version file
jfvm use
Display all installed versions with the currently active version highlighted.
jfvm list
**📹 Video: Installing JFrog CLI Versions, listing installed Versions and switching Between Versions **
jfvm-demo-01.mov
Remove a specific version from your system.
# Remove specific version
jfvm remove 2.72.1
# Remove linked version
jfvm remove local-dev
Remove all installed versions (irreversible action).
jfvm clear
Create meaningful aliases for versions.
# Create development alias
jfvm alias dev 2.74.0
# Create production alias
jfvm alias prod 2.73.0
# Create staging alias
jfvm alias staging latest
📹 Video: Creating and Using Aliases
jfvm.alias.mov
Link locally built JFrog CLI binaries for development and testing.
# Link local binary
jfvm link --from /Users/dev/go/bin/jf --name local-dev
# Link relative path binary
jfvm link --from ./jf --name custom-build
# Use linked version
jfvm use local-dev
📹 Video: Linking Local Binaries [Video showing how to link and use custom-built JFrog CLI binaries]
Compare command outputs between two versions with sophisticated diff visualization.
# Compare version information
jfvm compare 2.74.0 2.73.0 -- --version
# Compare configuration outputs
jfvm compare prod dev -- config show
# Compare with unified diff format
jfvm compare 2.74.0 2.73.0 -- config show --unified
# Disable colors and timing for automation
jfvm compare old new -- rt search "*.jar" --no-color --timing=false
Features:
- ⚡ Parallel execution for speed
- 🎨 Colored diff output (side-by-side and unified)
- ⏱️ Execution timing comparison
- 🚦 Exit code and error output comparison
- 📊 Statistical summary
📹 Video: Comparing Version Outputs [Video demonstrating various comparison modes, diff formats, and real-world scenarios]

Comprehensive performance analysis across multiple versions with statistical insights.
# Basic benchmark across versions
jfvm benchmark 2.74.0,2.73.0,2.72.0 -- --version
# Custom iterations with detailed output
jfvm benchmark prod,dev,latest -- rt ping --iterations 10 --detailed
# Export results in different formats
jfvm benchmark 2.74.0,2.73.0 -- config show --format json
jfvm benchmark 2.74.0,2.73.0 -- rt search "*.jar" --format csv
Advanced Options:
-
--iterations N
: Number of runs per version (default: 3) -
--detailed
: Show detailed execution logs -
--format json|csv|table
: Output format -
--timeout 30s
: Custom timeout per execution
Metrics Provided:
- 📈 Min/Max/Average execution times
- 📊 Success rate percentage
- 🏆 Performance ranking
- 📉 Speed comparison ratios
- 📋 Statistical summary
📹 Video: Performance Benchmarking [Video showing benchmark setup, execution, and analysis of results]
Track and analyze JFrog CLI usage patterns with comprehensive statistics.
# Show recent usage history
jfvm history
# Show detailed statistics
jfvm history --stats
# Filter by specific version
jfvm history --version 2.74.0
# Limit number of entries
jfvm history --limit 20
# Export as JSON
jfvm history --format json
# Show command outputs (added in unreleased version)
jfvm history --show-output
# Clear history (cannot be undone)
jfvm history --clear
Analytics Features:
- 📊 Command execution frequency
- ⏱️ Execution timing analysis
- 📈 Version usage trends
- 🎯 Most used commands
- 📋 Success/failure rates
- 💾 Command output capture (upcoming)
📹 Video: Usage Analytics and History [Video demonstrating history tracking, statistics, and usage insights]
📹 Part 1: Installation and Basic Setup [10-minute video covering installation, PATH setup, and first version installation]
📹 Part 2: Core Version Management [15-minute video demonstrating install, use, list, remove commands with real examples]
📹 Part 3: Project Workflows with Aliases [12-minute video showing project-specific versions, alias creation, and team workflows]
📹 Part 4: Version Comparison Deep Dive [20-minute video exploring all comparison features, diff formats, and automation scenarios]
📹 Part 5: Performance Benchmarking Guide [18-minute video covering benchmark setup, analysis, and CI/CD integration]
📹 Part 6: Usage Analytics and History [15-minute video showing analytics features, insights, and optimization techniques]
📹 Scenario 1: CI/CD Pipeline Integration [25-minute video showing jfvm in automated testing and deployment pipelines]
📹 Scenario 2: Team Development Workflows [20-minute video demonstrating multi-developer scenarios and best practices]
📹 Scenario 3: Performance Regression Testing [30-minute video covering systematic performance testing across JFrog CLI versions]
Enable detailed debug output for troubleshooting.
export JFVM_DEBUG=1
jf --version # Will show detailed execution info
Override the default jfvm installation directory (default: ~/.jfvm
).
export JFVM_HOME=/custom/path
Project-specific version specification.
# Create project version file
echo "2.74.0" > .jfrog-version
# jfvm will automatically use this version in this directory
jfvm use
History is automatically stored in ~/.jfvm/history.json
with:
- Maximum 1000 entries (auto-rotation)
- Command timing and metadata
- Output capture (upcoming feature)
# Install test versions
jfvm install 2.74.0
jfvm install 2.73.0
# Create aliases for clarity
jfvm alias current 2.74.0
jfvm alias previous 2.73.0
# Compare behavior
jfvm compare current previous -- config show
# Performance testing
jfvm benchmark current,previous -- rt ping --iterations 5
# Set project version
echo "2.74.0" > .jfrog-version
# Team members automatically use correct version
jfvm use # Reads from .jfrog-version
# Performance regression testing in CI
jfvm benchmark $BASELINE_VERSION,$NEW_VERSION -- rt ping --format json > results.json
# Automated compatibility testing
jfvm compare stable canary -- rt search "*.jar" --no-color --unified > diff.txt
# Analyze current usage
jfvm history --stats
# Test migration compatibility
jfvm compare current target -- config show
jfvm benchmark current,target -- rt upload test.txt repo/
# Track version usage across teams
jfvm history --format json | jq '.[] | select(.version == "2.74.0")'
# Performance baseline establishment
jfvm benchmark approved-versions -- rt ping --iterations 10 --format csv
Issue: jfvm
command not found after installation
# Solution: Check PATH configuration
echo $PATH | grep -q ".jfvm" && echo "jfvm in PATH" || echo "Add jfvm to PATH"
# Add to shell profile
echo 'export PATH="$HOME/.jfvm/shim:$PATH"' >> ~/.zshrc
source ~/.zshrc
Issue: Permission denied when installing versions
# Solution: Check directory permissions
ls -la ~/.jfvm/
chmod 755 ~/.jfvm/
Issue: Version not switching properly
# Enable debug mode to diagnose
export JFVM_DEBUG=1
jfvm use 2.74.0
jf --version
Issue: .jfrog-version
file not being respected
# Check file contents and current directory
cat .jfrog-version
pwd
jfvm use # Should read from .jfrog-version
Issue: Slow benchmark execution
# Reduce iterations for faster results
jfvm benchmark 2.74.0,2.73.0 -- --version --iterations 1
# Use timeout for hanging commands
jfvm benchmark versions -- command --timeout 10s
Enable comprehensive debugging:
export JFVM_DEBUG=1
This will show:
- Version resolution process
- Command execution details
- File system operations
- Timing information
Check jfvm logs for issues:
# History and usage logs
cat ~/.jfvm/history.json
# Installation logs (if any issues)
ls -la ~/.jfvm/versions/
# Clone the repository
git clone https://github.com/bhanurp/jfvm.git
cd jfvm
# Install dependencies
go mod download
# Build for development
make build
# Run tests
make test
# Install locally
make install
jfvm/
├── cmd/ # Command implementations
│ ├── install.go # Version installation
│ ├── use.go # Version switching
│ ├── compare.go # Version comparison
│ ├── benchmark.go # Performance testing
│ ├── history.go # Usage analytics
│ └── descriptions/ # Help text and examples
├── internal/ # Internal packages
│ └── downloader.go # Download utilities
├── shim/ # JFrog CLI shim
│ └── main.go # Shim implementation
└── main.go # Entry point
-
Command Implementation: Add new command in
cmd/
-
Help Text: Update
cmd/descriptions/descriptions.go
-
Main Registration: Register command in
main.go
- Testing: Add comprehensive tests
- Documentation: Update README and wiki
# Unit tests
go test ./...
# Integration tests
make test-integration
# Manual testing with different versions
jfvm install 2.74.0
jfvm install 2.73.0
# Test all commands
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Update documentation
- Submit a pull request
- GitHub Repository: https://github.com/bhanurp/jfvm
- Issue Tracker: GitHub Issues
- Homebrew Tap: homebrew-jfvm
- JFrog CLI Documentation: JFrog CLI Guide
- Latest Release: v0.0.2
- Changelog: CHANGELOG.md
- License: MIT License
This wiki is maintained by the jfvm community. For questions or improvements, please open an issue or submit a pull request.