To use the CLI, install it on your local machine, or download its executable, place it anywhere in your file system and add its location to your PATH environment variable.
The jf options command displays all the supported environment variables. The following table lists the available variables.
Variable Name | Description | Usage Example |
|---|---|---|
JFROG_CLI_LOG_LEVEL | Determines the log level of the JFrog CLI. Possible values are: DEBUG, INFO, WARN, and ERROR. If set to ERROR, logs contain error messages only. This is useful for reading or parsing CLI output without additional information. | This can be useful in troubleshooting issues or monitoring CLI activity more closely during artifact uploads or downloads. |
JFROG_CLI_LOG_TIMESTAMP | Controls the log messages timestamp format. Possible values are: TIME, DATE_AND_TIME, and OFF. | This is useful for maintaining logs that show when each command was executed, which is helpful for audit trails. |
JFROG_CLI_HOME_DIR | Defines the JFrog CLI home directory path. | This changes the default configuration and cache location, useful for organizing settings when working on multiple projects. |
JFROG_CLI_TEMP_DIR | Defines the temp directory used by JFrog CLI. The default is the operating system's temp directory. | If you wish to use a specific temporary directory for CLI operations, use this variable. |
JFROG_CLI_BUILD_NAME | Specifies the build name used by commands expecting a build name unless sent as a command argument or option. | This enables tracking and associating artifacts with a specific build in CI/CD pipelines. |
JFROG_CLI_BUILD_NUMBER | Specifies the build number used by commands expecting a build number unless sent as a command argument or option. | This is generally paired with the build name to track build artifacts in CI/CD workflows. |
JFROG_CLI_BUILD_PROJECT | Sets the Artifactory project key. | This associates your builds with a specific project key in Artifactory, making it easier to manage multiple projects. |
JFROG_CLI_SERVER_ID | Server ID configured using the config command. | This allows you to reference a configured server for all JFrog CLI commands without needing to specify it each time. |
CI | Disables interactive prompts and progress bar when set to true. | Useful for automation in CI/CD pipelines, where user interaction is not possible or desired. |
JFROG_CLI_PLUGINS_SERVER | Configured Artifactory server ID from which to download JFrog CLI Plugins. | Helps configure which server to use when downloading custom plugins. |
JFROG_CLI_PLUGINS_REPO | Determines the name of the local repository for JFrog CLI Plugins. | Pair this with the plugins server to specify a custom repository for plugin management. |
JFROG_CLI_TRANSITIVE_DOWNLOAD | Set this option to true to include remote repositories in artifact searches when using the rt download command. | Useful in CI setups to ensure you're pulling artifacts from all relevant sources, including remote repositories. |
JFROG_CLI_RELEASES_REPO | Configured Artifactory repository name from which to download the jar needed by mvn/gradle. | This allows calling Maven or Gradle related commands through JFrog CLI effectively, ensuring the necessary library jars are accessible. |
JFROG_CLI_DEPENDENCIES_DIR | Defines the directory to which JFrog CLI's internal dependencies are downloaded. | Use this when you have specific requirements or restrictions on where dependencies should be stored. |
JFROG_CLI_MIN_CHECKSUM_DEPLOY_SIZE_KB | Minimum file size in KB for which JFrog CLI performs checksum deploy optimization. | Adjust this if you want to skip checksum operations for smaller files, which can speed up upload operations in certain scenarios. |
JFROG_CLI_UPLOAD_EMPTY_ARCHIVE | Set to true to upload an empty archive when --archive is set but all files are excluded by exclusion patterns. | Helps maintain the structure in Artifactory even when no files need to be included in an upload. |
JFROG_CLI_BUILD_URL | Sets the CI server build URL in the build-info. Used in rt build-publish command unless overridden by the --build-url option. | Enables linking Artifactory items back to the original CI/CD build process. |
JFROG_CLI_ENV_EXCLUDE | List of case-insensitive patterns for environment variables to exclude. | This is important for building security-sensitive projects where you need to hide certain variables from being published as part of build info. |
JFROG_CLI_FAIL_NO_OP | Set to true if you want the command to return exit code 2 when no files are affected. | Valuable in CI pipelines to indicate if a command has executed without affecting any files, allowing you to implement logic based on file mutations. |
JFROG_CLI_ENCRYPTION_KEY | If provided, encrypts sensitive data in the config with the key (must be exactly 32 characters long). | Use this to protect sensitive information such as API keys in your configuration files. |
JFROG_CLI_AVOID_NEW_VERSION_WARNING | Set to true to avoid checking for the latest available JFrog CLI version and printing a warning if a newer version exists. | This can be used in CI environments to prevent unnecessary console output warnings about new versions. |
JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR | Defines the directory path where command summaries data is stored, with every command having its own directory. | This helps in organizing command summaries for review or debugging purposes later on. |
JFROG_CLI_ANALYZER_MANAGER_VERSION | Specifies the version of Analyzer Manager to use for security commands, provided in semantic versioning format (e.g., 1.13.4). By default, the latest stable version is used. | Important for projects where specific analyzer features or behavior in certain versions are required. |
Note: Always consider security best practices when handling sensitive information, particularly when using environment variables in CI/CD pipelines.