{"id":31769931,"url":"https://github.com/jfrog/jfrog-cli-manager","last_synced_at":"2025-10-10T02:55:47.452Z","repository":{"id":302879397,"uuid":"994608069","full_name":"jfrog/jfrog-cli-manager","owner":"jfrog","description":"jfcm is a powerful CLI tool that helps you manage JFrog CLI on your system.","archived":false,"fork":false,"pushed_at":"2025-10-07T06:06:07.000Z","size":17649,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T07:22:26.236Z","etag":null,"topics":["golang","jfrog","jfrog-cli","manager"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfrog.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-02T07:47:56.000Z","updated_at":"2025-10-07T06:06:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"edcbba63-32cd-4162-93f7-47dc712f1b7d","html_url":"https://github.com/jfrog/jfrog-cli-manager","commit_stats":null,"previous_names":["jfrog/jfrog-cli-vm","jfrog/jfrog-cli-manager"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/jfrog/jfrog-cli-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fjfrog-cli-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fjfrog-cli-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fjfrog-cli-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fjfrog-cli-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfrog","download_url":"https://codeload.github.com/jfrog/jfrog-cli-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfrog%2Fjfrog-cli-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002527,"owners_count":26083403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","jfrog","jfrog-cli","manager"],"created_at":"2025-10-10T02:55:45.082Z","updated_at":"2025-10-10T02:55:47.446Z","avatar_url":"https://github.com/jfrog.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jfcm - JFrog CLI Manager\n\n[![CI](https://github.com/jfrog/jfrog-cli-manager/actions/workflows/release.yml/badge.svg)](https://github.com/jfrog/jfrog-cli-manager/actions/workflows/release.yml)\n[![Latest Release](https://img.shields.io/github/v/release/jfrog/jfrog-cli-manager)](https://github.com/jfrog/jfrog-cli-manager/releases)\n[![License](https://img.shields.io/github/license/jfrog/jfrog-cli-manager)](https://github.com/jfrog/jfrog-cli-manager/blob/main/LICENSE)\n[![homebrew installs](https://img.shields.io/badge/homebrew-installs-brightgreen?logo=homebrew)](https://github.com/jfrog/homebrew-jfrog-cli-manager)\n\n**jfcm** is a powerful CLI tool that helps you manage multiple versions of the [JFrog CLI](https://jfrog.com/getcli/) on your system. It supports auto-installation, version switching, project-specific defaults, local binary linking, aliasing, parallel version comparison, performance benchmarking, and usage analytics — all inspired by tools like `nvm`, `sdkman`, and `volta`.\n\n## 🎥 Demo\n\nhttps://github.com/user-attachments/assets/6984077c-72ab-4f8c-a11c-671e72870efe\n\nhttps://github.com/user-attachments/assets/32ce3eb1-4f69-49bd-bdc7-9f95cd9ead34\n\n\n## 🚀 Why jfcm?\n\nManaging different versions of the JFrog CLI across multiple projects and environments can be challenging. `jfcm` simplifies this by:\n\n- Installing any released version of the `jf` binary\n- Automatically fetching and using the latest version with `jfcm use latest`\n- Allowing you to link locally built versions\n- Automatically switching versions based on a `.jfrog-version` file\n- Letting you define named aliases (e.g., `prod`, `dev`)\n- Providing a smooth `jf` shim for command redirection\n- Parallel command comparison between versions with diff visualization\n- Performance benchmarking across multiple versions\n- Usage history tracking and analytics\n\nNo more symlink hacking or hardcoded paths.\n\n---\n\n## 🛠️ Installation\n\n### Via Homebrew (with tap):\n```bash\nbrew tap jfrog/jfrog-cli-manager\nbrew install jfcm\n```\n\n### Via one-liner:\n```bash\nbrew install https://raw.githubusercontent.com/jfrog/homebrew-jfrog-cli-manager/main/Formula/jfcm.rb\n```\n\n### Or Build From Source:\n```bash\ngit clone https://github.com/jfrog/jfrog-cli-manager.git\ncd jfrog-cli-manager\nmake install\n```\n\n**Note**: Use `make build` instead of `go build` to ensure the executable is named `jfcm` (not `jfrog-cli-manager`).\n\n---\n\n## 📦 Commands\n\n### Core Version Management\n\n#### `jfcm install \u003cversion\u003e`\nInstalls the specified version of JFrog CLI (`jf`) from JFrog's public release server.\n```bash\njfcm install 2.74.0\n```\n\n#### `jfcm use \u003cversion or alias\u003e`\nActivates the given version or alias. If `.jfrog-version` exists in the current directory, that will be used if no argument is passed. Use `latest` to automatically fetch and activate the most recent JFrog CLI version (downloads if not already installed). Automatically sets up PATH priority so jfcm-managed `jf` takes precedence over system-installed versions.\n```bash\njfcm use 2.74.0\njfcm use latest\njfcm use prod\n```\n\n#### `jfcm list`\nShows all installed versions and the currently active one.\n```bash\njfcm list\n```\n\n#### `jfcm remove \u003cversion\u003e`\nRemoves a specific version of `jf`.\n```bash\njfcm remove 2.72.1\n```\n\n#### `jfcm clear`\nRemoves **all** installed versions.\n```bash\njfcm clear\n```\n\n#### `jfcm alias \u003cn\u003e \u003cversion\u003e`\nDefines an alias for a specific version.\n```bash\njfcm alias dev 2.74.0\n```\n\n#### `jfcm link --from \u003cpath\u003e --name \u003cn\u003e`\nLinks a **locally built `jf` binary** to be used via `jfcm`.\n```bash\njfcm link --from /Users/Jfrog/go/bin/jf --name local-dev\njfcm use local-dev\n```\n\n#### `jfcm health-check`\nPerforms comprehensive health check of jfcm installation with various options.\n```bash\n# Basic health check\njfcm health-check\n\n# Detailed health check with verbose output\njfcm health-check --verbose\n\n# Health check with automatic fixes\njfcm health-check --fix\n\n# Include performance and security checks\njfcm health-check --performance --security\n\n# All options combined\njfcm health-check --verbose --fix --performance --security\n```\n\n\n\n### Advanced Features\n\n#### `jfcm compare \u003csubcommand\u003e`\nCompare JFrog CLI versions with specialized subcommands for different comparison types.\n\n##### CLI Command Comparison (`jfcm compare cli`)\nCompare JFrog CLI command output between two versions in parallel with git-like diff visualization.\n\n```bash\n# Compare version output\njfcm compare cli 2.74.0 2.73.0 -- --version\n\n# Compare command outputs with side-by-side diff\njfcm compare cli prod dev -- rt ping\n\n# Show unified diff format\njfcm compare cli 2.74.0 2.73.0 --unified -- config show\n\n# Disable colored output and timing\njfcm compare cli old new --no-color --timing -- rt search \"*.jar\"\n```\n\n##### Server Comparison (`jfcm compare rt`)\nCompare JFrog CLI command execution between different server configurations.\n\n```bash\n# Compare rt ping command across two servers\njfcm compare rt server1 server2 -- rt ping\n\n# Compare search results across server configurations\njfcm compare rt prod dev -- rt search \"*.jar\"\n\n# Show unified diff format for server comparison\njfcm compare rt server1 server2 -- config show --unified\n\n# Server comparison with custom timeout\njfcm compare rt main backup -- rt repos show --timeout 60\n```\n\n##### Changelog Comparison (`jfcm compare changelog`)\nCompare release notes and changelogs between two JFrog CLI versions.\n\n```bash\n# Compare release notes between versions\njfcm compare changelog v2.75.1 v2.76.0\n\n# Compare changelogs with custom options\njfcm compare changelog v2.74.0 v2.73.0 --no-color --timeout 60\n```\n\n**Features:**\n- Parallel execution for faster results\n- Side-by-side and unified diff formats\n- Colored output highlighting differences\n- Execution timing comparison\n- Exit code and error output comparison\n\n#### `jfcm benchmark \u003cversions\u003e -- \u003ccommand\u003e`\nRun performance benchmarks across multiple JFrog CLI versions with detailed statistics.\n\n```bash\n# Benchmark across multiple versions\njfcm benchmark 2.74.0,2.73.0,2.72.0 -- --version\n\n# Custom iterations and detailed output\njfcm benchmark prod,dev,latest -- rt ping --iterations 10 --detailed\n\n# Export results as JSON or CSV\njfcm benchmark 2.74.0,2.73.0 -- config show --format json\njfcm benchmark 2.74.0,2.73.0 -- rt search \"*.jar\" --format csv\n```\n\n**Features:**\n- Configurable iteration counts\n- Statistical analysis (min, max, average, success rate)\n- Multiple output formats (table, JSON, CSV)\n- Parallel execution across versions\n- Detailed execution logs\n- Performance ranking and speed comparisons\n\n#### `jfcm history`\nTrack and analyze version usage patterns with comprehensive statistics.\n\n```bash\n# Show recent usage history\njfcm history\n\n# Show detailed statistics\njfcm history --stats\n\n# Filter by specific version\njfcm history --version 2.74.0\n\n# Limit number of entries\njfcm history --limit 20\n\n# Export as JSON\njfcm history --format json\n\n# Clear history (cannot be undone)\njfcm history --clear\n\n# Reexecute a specific history entry by ID\njfcm history '!2'  # Reexecute history entry with ID 2\njfcm history '!5'  # Reexecute history entry with ID 5\n```\n\n**Features:**\n- Automatic usage tracking through the shim\n- Command execution timing\n- Most used versions and commands\n- Usage trends and timeline analysis\n- Configurable history limits\n- **History replay**: Reexecute any previous command using `!{id}` syntax\n\n---\n\n## 📁 Project-specific Version\n\nAdd a `.jfrog-version` file to your repo:\n```bash\necho \"2.74.0\" \u003e .jfrog-version\n```\nThen run:\n```bash\njfcm use\n```\n\n---\n\n## ⚙️ Shell Integration \u0026 Priority Management\njfcm automatically configures your shell to ensure jfcm-managed `jf` binaries have **highest priority** over system-installed versions. When you run `jfcm use \u003cversion\u003e`, it:\n\n1. **Creates a shim** at `~/.jfcm/shim/jf` that redirects to the active version\n2. **Updates your PATH** to prioritize the jfcm shim directory (prepends to PATH)\n3. **Adds a shell function** for enhanced priority handling (similar to nvm)\n4. **Verifies priority** to ensure jfcm-managed versions take precedence over Homebrew or system-installed jf\n\nThe configuration is automatically added to your shell profile (`.zshrc`, `.bashrc`, etc.):\n```bash\n# jfcm PATH configuration - ensures jfcm-managed jf takes highest priority\nexport PATH=\"$HOME/.jfcm/shim:$PATH\"\n\n# jfcm shell function for enhanced priority (similar to nvm approach)\njf() {\n    # Check if jfcm shim exists and is executable\n    if [ -x \"$HOME/.jfcm/shim/jf\" ]; then\n        # Execute jfcm-managed jf with highest priority\n        \"$HOME/.jfcm/shim/jf\" \"$@\"\n    else\n        # Fallback to system jf if jfcm shim not available\n        command jf \"$@\"\n    fi\n}\n```\n\n\n\n### Debug Mode\nSet `jfcm_DEBUG=1` to see detailed shim execution information:\n```bash\nexport jfcm_DEBUG=1\n# Will show which version is being executed\njf --version\n```\n\n### Troubleshooting PATH Issues\n\nIf `jf` is still using the system version instead of jfcm-managed version:\n\n1. **Run the health check command:**\n   ```bash\n   jfcm health-check --fix\n   # This will verify all aspects of jfcm setup and attempt to fix issues\n   ```\n\n2. **Check which jf is being used:**\n   ```bash\n   which jf\n   # Should show: /Users/username/.jfcm/shim/jf\n   ```\n\n3. **Verify PATH order:**\n   ```bash\n   echo $PATH\n   # ~/.jfcm/shim should appear before /usr/local/bin or /opt/homebrew/bin\n   ```\n\n4. **Re-run use command:**\n   ```bash\n   jfcm use \u003cversion\u003e\n   source ~/.zshrc  # or ~/.bashrc\n   ```\n\n5. **Manual PATH fix:**\n   ```bash\n   # Add this to your shell profile\n   export PATH=\"$HOME/.jfcm/shim:$PATH\"\n   ```\n\n6. **Check for shell function conflicts:**\n   ```bash\n   type jf\n   # Should show the jfcm shell function, not a system binary\n```\n\n---\n\n## 🧪 Advanced Examples\n\n### Comparing Configuration Changes\n```bash\n# Compare configuration differences between versions\njfcm compare cli 2.74.0 2.73.0 -- config show --format json\n\n# Check if a specific feature works across versions\njfcm compare cli old new -- rt search \"libs-release-local/*.jar\" --limit 5\n\n# Compare release notes and changelogs\njfcm compare changelog v2.75.1 v2.76.0\n```\n\n### Performance Analysis\n```bash\n# Benchmark search performance across versions\njfcm benchmark 2.74.0,2.73.0,2.72.0 -- rt search \"*\" --limit 100 --iterations 3\n\n# Test upload performance\njfcm benchmark prod,dev -- rt upload test.txt my-repo/ --iterations 5 --detailed\n```\n\n### Usage Analytics\n```bash\n# See your most used JFrog CLI commands\njfcm history --stats\n\n# Track version adoption over time\njfcm history --version 2.74.0\n```\n\n### Automation and CI/CD\n```bash\n# Export benchmark results for CI analysis\njfcm benchmark $OLD_VERSION,$NEW_VERSION -- rt ping --format json \u003e performance.json\n\n# Compare outputs in automated testing\njfcm compare cli baseline canary --unified --no-color -- rt search \"*.jar\"\n\n# Always use the latest version in CI/CD pipelines\njfcm use latest\njf --version\n```\n\n---\n\n## 🧼 Uninstall\n```bash\nrm -rf ~/.jfcm\n # if installed via Homebrew\nbrew uninstall jfcm\n```\n\n---\n\n## 🔧 Advanced Configuration\n\n### History Management\n- History is automatically tracked in `~/.jfcm/history.json`\n- Limited to 1000 entries to prevent unlimited growth\n- Includes command execution timing and metadata\n\n### Health Check Features\n- **System Environment**: OS compatibility, architecture support, shell detection\n- **Installation Status**: jfcm directories, shim setup, PATH configuration\n- **Priority Verification**: Ensures jfcm-managed `jf` has highest priority\n- **Binary Execution**: Tests both `jfcm` and `jf` command execution\n- **Network Connectivity**: GitHub API and JFrog releases connectivity\n- **Performance Benchmarks**: Command execution timing and performance analysis\n- **Security Checks**: File permissions and suspicious file detection\n- **Auto-Fix Capability**: Automatically fixes common configuration issues\n- **JSON Output**: Machine-readable output for CI/CD integration\n\n### Performance Optimization\n- Commands run in parallel when possible\n- Configurable timeouts for long-running operations\n- Efficient diff algorithms for large outputs\n\n---\n\n## 📝 Use Cases\n\n### Development Teams\n- **Version Testing**: Compare behavior across JFrog CLI versions before upgrading\n- **Performance Monitoring**: Track performance regressions between releases\n- **Usage Analytics**: Understand which commands and versions are used most\n- **Latest Features**: Easily switch to the latest version with `jfcm use latest` to test new features\n\n### DevOps Engineers\n- **CI/CD Integration**: Automate version comparison in deployment pipelines\n- **Performance Benchmarks**: Ensure new versions meet performance requirements\n- **Migration Planning**: Analyze compatibility before major version upgrades\n- **Automated Updates**: Use `jfcm use latest` in deployment scripts to always use the most recent stable version\n\n### Enterprise Environments\n- **Compliance Tracking**: Monitor which versions are being used across teams\n- **Performance Optimization**: Identify and optimize slow operations\n- **Training Insights**: Understand which commands teams use most frequently\n\n---\n\n## 📬 Feedback / Contributions\nPRs and issues welcome! Open source, MIT licensed.\n\n**GitHub:** https://github.com/jfrog/jfrog-cli-manager\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrog%2Fjfrog-cli-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfrog%2Fjfrog-cli-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfrog%2Fjfrog-cli-manager/lists"}