How to install jfrog cli
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 4, 2026
Key Facts
- The JFrog CLI is available for Linux, macOS, and Windows.
- Installation can be done via direct binary download or package managers.
- Version 2.x of the JFrog CLI introduced significant improvements and new features.
- After installation, you must configure the CLI with your Artifactory instance details.
- The CLI supports multiple JFrog Platform products, including Artifactory and Xray.
What is the JFrog CLI?
The JFrog CLI is a command-line interface tool that provides a faster, more reliable, and more efficient way to interact with JFrog Artifactory and JFrog Xray. It's designed to streamline DevOps workflows by enabling developers and CI/CD systems to easily manage artifacts, perform builds, scan for vulnerabilities, and more, directly from their terminal.
Why Use the JFrog CLI?
Traditional methods of interacting with artifact repositories, such as using web browsers or complex scripting, can be cumbersome and error-prone. The JFrog CLI offers several advantages:
- Speed: It's optimized for performance, significantly faster than browser-based operations for many tasks.
- Efficiency: Automates complex workflows, reducing manual effort and the potential for human error.
- Reliability: Provides robust error handling and retry mechanisms for critical operations.
- Integration: Seamlessly integrates with popular CI/CD tools like Jenkins, GitLab CI, GitHub Actions, and Azure DevOps.
- Security: Enables security scanning with Xray directly within the build pipeline.
Installation Methods
There are several ways to install the JFrog CLI, catering to different operating system preferences and workflow needs.
1. Direct Binary Download
This is the most straightforward method and works across all supported operating systems (Linux, macOS, Windows).
- Visit the JFrog CLI Releases Page: Navigate to the official JFrog CLI GitHub releases page (often found by searching 'JFrog CLI releases' or checking the JFrog documentation).
- Identify Your Operating System: Choose the correct download link for your OS (e.g.,
jfrog-cli-linux-amd64,jfrog-cli-osx-amd64,jfrog-cli-windows-amd64.zip). - Download the Binary: Click the link to download the compressed file.
- Extract the Binary: Unzip the downloaded file. You will find an executable file (e.g.,
jfrog). - Make it Executable (Linux/macOS): Open your terminal, navigate to the directory where you extracted the file, and run
chmod +x jfrog. - Move to PATH: To use the
jfrogcommand from anywhere in your terminal, you need to move the executable to a directory that is included in your system's PATH environment variable. Common locations include/usr/local/bin(Linux/macOS) or a custom directory you add to your PATH. You might need administrator privileges (usingsudoon Linux/macOS) for this step. For Windows, you can add the directory containing thejfrog.exefile to your system's PATH environment variable.
2. Using Package Managers
For users who prefer package managers, the JFrog CLI can be installed more conveniently.
macOS (using Homebrew)
If you have Homebrew installed, you can install the JFrog CLI with a single command:
brew install jfrog-cliTo upgrade an existing installation:
brew upgrade jfrog-cliLinux (using Snap - for supported distributions)
On Linux distributions that support Snap (like Ubuntu), you can install it via:
sudo snap install jfrog-cli --classicWindows (using Chocolatey)
If you use Chocolatey on Windows:
choco install jfrog-cliPost-Installation: Configuration
Once the JFrog CLI is installed and accessible from your terminal, the next crucial step is to configure it to connect to your JFrog Artifactory instance.
- Run the Setup Command: Execute the following command in your terminal:
Replacejfrog config add <server-id><server-id>with a unique name for this Artifactory connection (e.g.,my-artifactory). - Enter Artifactory URL: The CLI will prompt you for the URL of your Artifactory instance (e.g.,
https://mycompany.jfrog.ioorhttp://artifactory.local:8081). - Enter Credentials: You will be asked for your Artifactory username and password, or an access token. Using an access token is generally recommended for better security and automation.
After completing these steps, the JFrog CLI will be configured to communicate with your specified Artifactory instance. You can verify the connection by running jfrog rt ping.
Verification
To ensure the installation was successful and the CLI is correctly set up, run the following command:
jfrog --versionThis command should output the installed version of the JFrog CLI. If you configured a server, you can also test the connection with jfrog rt ping.
Troubleshooting Common Issues
- Command Not Found: If you get a 'command not found' error, it usually means the JFrog CLI executable is not in your system's PATH. Ensure you moved it to a directory listed in your PATH or added its location to the PATH.
- Permissions Denied: On Linux/macOS, ensure the binary has execute permissions (
chmod +x jfrog) and that you have the necessary permissions to move it to system directories. - Connection Errors: Double-check the Artifactory URL, username, password, or access token provided during configuration. Ensure your network allows access to the Artifactory instance.
By following these steps, you can successfully install and configure the JFrog CLI to enhance your DevOps workflows.
More How To in Daily Life
Also in Daily Life
More "How To" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
Missing an answer?
Suggest a question and we'll generate an answer for it.