Newer Version Available
CLI Environment Variables
You can set environment variables to configure some CLI behaviors.
| Environment Variable | Description |
|---|---|
| FORCE_OPEN_URL | Specifies the web page that opens in your browser when you run force:org:open. For example, to open Lightning
Experience, set to one/one.app. Equivalent to the --path parameter of force:org:open. |
| FORCE_SHOW_SPINNER | Set to true to show a spinner animation on the command line when running asynchronous CLI commands. Default is false. |
| FORCE_SPINNER_DELAY | Specifies the speed of the spinner in milliseconds. Default is 60. |
| SFDX_AUTOUPDATE_DISABLE | Set to true to disable the auto-update feature of the CLI. By default, the CLI periodically checks for and installs updates. |
| SFDX_CODE_COVERAGE_REQUIREMENT | Specifies the code coverage percentages that are displayed in green when you run
force:apex:test:run or force:apex:test:report with the --codecoverage parameter. If the code coverage percentage for an Apex test is equal to or higher than this setting, it is displayed in green. If the percent is lower, it is displayed in red. Applies only to human-readable output. Default is 70%. |
| SFDX_CONTENT_TYPE | All CLI commands output results in JSON format. |
| SFDX_DEFAULT_USERNAME | Specifies the username of your default org so you don’t have to use the --targetusername CLI parameter. Overrides the value of the defaultusername runtime configuration value. |
| SFDX_DOMAIN_RETRY |
Specifies the time, in
seconds, that the CLI waits for the Lightning Experience custom domain to resolve
and become available in a newly-created scratch org.
The default value is 240 (4 minutes). Set the variable to 0 to bypass the Lightning Experience custom domain check entirely. |
| SFDX_LOG_LEVEL | Sets the level of messages that the CLI writes to the log file. |
| SFDX_PRECOMPILE_ENABLE | Set to true to enable Apex pre-compile before the tests are run. This variable works with the force:apex:test:run command. Default is false. |
| SFDX_USE_GENERIC_UNIX_KEYCHAIN | (Linux and macOS only) Set to true if you want to use the generic UNIX keychain instead of the Linux libsecret library or macOS keychain. Specify this variable when using the CLI with ssh or "headless" in a CI environment. |