JFrog CLI environment variables
The JFrog CLI reads standard shell environment variables to control logging, build metadata, server selection, encryption, and other behavior. This reference lists each variable and how it affects the CLI. If you are new to the CLI, install it (or download the binary), place it on your PATH, then return here to tune runtime options.
The jf options command displays all supported environment variables with their default values and descriptions. The following table lists the available variables.
Environment Variables Reference
| Variable Name | Description |
|---|---|
JFROG_CLI_LOG_LEVEL | [Default: INFO] Determines the log level of the JFrog CLI. Possible values are: DEBUG, INFO, WARN, and ERROR. If set to ERROR, JFrog CLI logs error messages only. It is useful when you wish to read or parse the JFrog CLI output and do not want any other information logged. |
JFROG_CLI_LOG_TIMESTAMP | [Default: TIME] Controls the log messages timestamp format. Possible values are: TIME, DATE_AND_TIME, and OFF. |
JFROG_CLI_HOME_DIR | [Default: ~/.jfrog] Defines the JFrog CLI home directory path. |
JFROG_CLI_TEMP_DIR | [Default: The operating system's temp directory] Defines the temp directory used by JFrog CLI. |
JFROG_CLI_BUILD_NAME | Build name to be used by commands which expect a build name, unless sent as a command argument or option. |
JFROG_CLI_BUILD_NUMBER | Build number to be used by commands which expect a build number, unless sent as a command argument or option. |
JFROG_CLI_BUILD_PROJECT | Artifactory project key. |
JFROG_CLI_SERVER_ID | Server ID configured using the config command. |
CI | [Default: false] If true, disables interactive prompts and progress bar. |
JFROG_CLI_PLUGINS_SERVER | [Default: Official JFrog CLI Plugins registry] Configured Artifactory server ID from which to download JFrog CLI Plugins. |
JFROG_CLI_PLUGINS_REPO | [Default: 'jfrog-cli-plugins'] Can be optionally used with the JFROG_CLI_PLUGINS_SERVER environment variable. Determines the name of the local repository to use. |
JFROG_CLI_TRANSITIVE_DOWNLOAD | [Default: false] Set this option to true to include remote repositories in artifact searches when using the 'rt download' command. The search will target the first five remote repositories within the virtual repository. This feature is available starting from Artifactory version 7.17.0. Note: Enabling this option may increase the load on Artifactory instances that are proxied by multiple remote repositories. |
JFROG_CLI_RELEASES_REPO | Configured Artifactory repository name from which to download the jar needed by the mvn/gradle command. The value format should be <server ID configured by the 'jf c add' command>/<repo name>. The repository should proxy https://releases.jfrog.io. This environment variable is used by the 'jf mvn' and 'jf gradle' commands, and also by the 'jf audit' command when used for maven or gradle projects. |
JFROG_CLI_DEPENDENCIES_DIR | [Default: $JFROG_CLI_HOME_DIR/dependencies] Defines the directory to which JFrog CLI's internal dependencies are downloaded. Supported by the following commands: maven and gradle. |
JFROG_CLI_MIN_CHECKSUM_DEPLOY_SIZE_KB | [Default: 10] Minimum file size in KB for which JFrog CLI performs checksum deploy optimization. Supported by the upload command. |
JFROG_CLI_UPLOAD_EMPTY_ARCHIVE | [Default: false] Set to true to upload an empty archive when '--archive' is set but all files were excluded by exclusion patterns. Supported by the upload command. |
JFROG_CLI_BUILD_URL | Sets the CI server build URL in the build-info. The 'jf rt build-publish' command uses the value of this environment variable, unless the --build-url command option is sent. |
JFROG_CLI_ENV_EXCLUDE | [Default: *password*;*psw*;*secret*;*key*;*token*;*auth*] List of case-insensitive semicolon-separated patterns in the form of "value1;value2;...". Environment variables matching those patterns will be excluded. This environment variable is used by the 'jf rt build-publish' command, in case the --env-exclude command option is not sent. |
JFROG_CLI_FAIL_NO_OP | [Default: false] Set to true if you want the command to return exit code 2 when no files are affected. Supported by the following commands: copy, delete, delete-props, set-props, download, move, search, and upload. |
JFROG_CLI_ENCRYPTION_KEY | If provided, encrypts the sensitive data stored in the config with the provided key. Must be exactly 32 characters. Must be set before running jf config add for the first time. Applying this variable to an existing unencrypted configuration will cause all server configurations to be lost. |
JFROG_CLI_AVOID_NEW_VERSION_WARNING | [Default: false] Set to true to avoid checking the latest available JFrog CLI version and printing a warning when a newer version exists. |
JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR | Defines the directory path where the command summaries data is stored. Every command will have its own individual directory within this base directory. |
JFROG_CLI_ANALYZER_MANAGER_VERSION | Specifies the version of Analyzer Manager to be used for security commands, provided in semantic versioning format (for example, 1.13.4). By default, the latest stable version is used. |
JFROG_CLI_GITHUB_TOKEN | [Default: None] Specifies the GitHub token to be used for CLI version check on the GitHub repository. |
JFROG_CLI_HIDE_SURVEY | [Default: false] Set to true to hide the survey link that appears after successful command execution. |
Examples
This topic covers:
- Log and debug CLI output
- Configure CI/CD pipelines
- Apply security best practices for build-info
- Encrypt the CLI configuration
- Configure custom paths
- Maven and Gradle-related variables
- Optimize uploads and downloads
Log and Debug
To enable debug logging:
-
Run:
export JFROG_CLI_LOG_LEVEL=DEBUG
To include timestamps with date for audit trails:
-
Run:
export JFROG_CLI_LOG_TIMESTAMP=DATE_AND_TIME
To suppress all non-error output when parsing CLI output:
-
Run:
export JFROG_CLI_LOG_LEVEL=ERROR
Configure CI/CD Pipelines
To disable interactive prompts in automated environments:
-
Run:
export CI=true
To set build information for published build-info (${BUILD_NUMBER} and ${BUILD_URL} are provided by your CI system; outside CI, substitute literals or omit):
-
Run:
export JFROG_CLI_BUILD_NAME="<build-name>" export JFROG_CLI_BUILD_NUMBER="${BUILD_NUMBER}" export JFROG_CLI_BUILD_URL="${BUILD_URL}"Where:
<build-name>: Logical name for the build.
For example:
export JFROG_CLI_BUILD_NAME="my-project" export JFROG_CLI_BUILD_NUMBER="${BUILD_NUMBER}" export JFROG_CLI_BUILD_URL="${BUILD_URL}" -
To associate the build with an Artifactory project, run:
export JFROG_CLI_BUILD_PROJECT="<project-key>"Where:
<project-key>: Artifactory project key.
For example:
export JFROG_CLI_BUILD_PROJECT="myproject" -
To suppress version warnings and survey prompts in CI, run:
export JFROG_CLI_AVOID_NEW_VERSION_WARNING=true export JFROG_CLI_HIDE_SURVEY=true
Apply Security Best Practices
To extend the default exclusion patterns for sensitive environment variables in build-info:
-
Run:
export JFROG_CLI_ENV_EXCLUDE="<pattern-list>"Where:
<pattern-list>: Semicolon-separated case-insensitive patterns. The default already includes*psw*; extend rather than replace if you need extra coverage.
For example:
export JFROG_CLI_ENV_EXCLUDE="*password*;*psw*;*secret*;*key*;*token*;*auth*;*credential*"
Encrypting the CLI Configuration
JFROG_CLI_ENCRYPTION_KEYmust be set before runningjf config addfor the first time. Setting this variable on an already-configured CLI will causejf config showto fail withcipher: message authentication failedand all existing server configurations will be lost. If you have an existing configuration, remove it first and then reconfigure with the key set.
To encrypt your CLI configuration from scratch:
-
Remove any existing configuration:
jf config rm --quiet -
Set the encryption key. The value must be exactly 32 characters.
export JFROG_CLI_ENCRYPTION_KEY="<encryption-key>"Where:
<encryption-key>: A stable 32-character secret. Store it securely; loss of the key means you must reconfigure.
-
Add your server so the configuration is stored encrypted. See jf config add for flags; a minimal interactive add is:
jf config add
Configure Custom Paths
To use a custom JFrog CLI home directory (choose a user-writable path; /opt/... often requires elevated permissions):
-
Run:
export JFROG_CLI_HOME_DIR="$HOME/.jfrog-custom"
To use a custom temp directory:
-
Run:
export JFROG_CLI_TEMP_DIR="/tmp/jfrog-cli"
To store internal dependencies in a custom location:
-
Run:
export JFROG_CLI_DEPENDENCIES_DIR="$HOME/.jfrog-custom/deps"
Maven and Gradle Configuration
To point Maven/Gradle commands at an internal releases repository (format <server-id>/<repository-name>):
-
Run:
export JFROG_CLI_RELEASES_REPO="<server-id>/<repository-name>"Where:
<server-id>: Server ID fromjf config add.<repository-name>: Repository key that proxies JFrog releases if applicable.
For example:
export JFROG_CLI_RELEASES_REPO="my-server/jfrog-releases"
Optimize Uploads and Downloads
To include remote repositories in artifact searches for jf rt download:
-
Run:
export JFROG_CLI_TRANSITIVE_DOWNLOAD=true
To change the minimum file size (KB) for checksum deploy optimization:
-
Run:
export JFROG_CLI_MIN_CHECKSUM_DEPLOY_SIZE_KB=50
To return exit code 2 when no files are affected (supported commands include copy, delete, delete-props, set-props, download, move, search, and upload):
-
Run:
export JFROG_CLI_FAIL_NO_OP=true
- Always consider security best practices when handling sensitive information, particularly when using environment variables in CI/CD pipelines.
- Environment variables set in your shell session will override default values.
- For persistent configuration, add these exports to your shell profile (for example,
~/.bashrc,~/.zshrc).- The
jf optionscommand lists supported environment variables, defaults, and descriptions. Theenv | grep JFROG_CLIcommand shows values currently active in your shell.
Discovering Environment Variables
The jf options command lists every supported environment variable together with its default value and description:
jf optionsThat output reflects built-in defaults, not necessarily the values exported in your current shell. To inspect the values active in the current session:
-
Run:
env | grep JFROG_CLI
Environment Variable Categories
For easier reference, the variables above fall into these categories:
| Category | Variables |
|---|---|
| Logging | JFROG_CLI_LOG_LEVEL, JFROG_CLI_LOG_TIMESTAMP |
| Build Information | JFROG_CLI_BUILD_NAME, JFROG_CLI_BUILD_NUMBER, JFROG_CLI_BUILD_PROJECT, JFROG_CLI_BUILD_URL, JFROG_CLI_ENV_EXCLUDE |
| Server Configuration | JFROG_CLI_SERVER_ID, JFROG_CLI_HOME_DIR, JFROG_CLI_TEMP_DIR, JFROG_CLI_ENCRYPTION_KEY |
| Plugin Configuration | JFROG_CLI_PLUGINS_SERVER, JFROG_CLI_PLUGINS_REPO |
| Behavior Modifiers | CI, JFROG_CLI_FAIL_NO_OP, JFROG_CLI_TRANSITIVE_DOWNLOAD, JFROG_CLI_AVOID_NEW_VERSION_WARNING, JFROG_CLI_HIDE_SURVEY, JFROG_CLI_UPLOAD_EMPTY_ARCHIVE |
| CI/CD Integration | JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR, JFROG_CLI_GITHUB_TOKEN |
| Build Tool Dependencies | JFROG_CLI_RELEASES_REPO, JFROG_CLI_DEPENDENCIES_DIR, JFROG_CLI_MIN_CHECKSUM_DEPLOY_SIZE_KB |
| Security | JFROG_CLI_ANALYZER_MANAGER_VERSION |
Glossary
| Term | Definition |
|---|---|
| Artifactory | JFrog's universal binary repository manager that stores, manages, and distributes software packages |
| Build-info | A JSON record that captures everything about a build: dependencies resolved, artifacts produced, environment variables, and source code details |
| JPD | JFrog Platform Deployment — a single instance of the JFrog Platform containing Artifactory, Xray, and other services |
| OIDC | OpenID Connect — an identity protocol used for token-based authentication in CI/CD pipelines |
| Xray | JFrog's security scanning service that analyzes artifacts for vulnerabilities and license compliance |
| Distribution | JFrog's service for distributing release bundles to edge nodes |
| Mission Control | JFrog's service for managing multiple JPD instances, licenses, and platform deployments |
| File Spec | A JSON file that defines patterns and properties for bulk file operations (upload, download, search) |
| Build-info | Metadata capturing dependencies, artifacts, environment variables, and Git information for a build |
| Access Token | A JWT-format credential issued by the JFrog Platform for authenticating CLI and API requests |
Updated 13 days ago
