Configuration Variables
To set a config variable for the current project:
1sf config set name <value>For local config variables, you must issue the command from within the Salesforce DX project directory.
To set the config variable for all your projects:
1sf config set name <value> --globalYou can issue global commands anywhere or within any Salesforce DX project, yet they apply to all the Salesforce CLI commands you run.
View the local and global config variables that you have set with the config list command. The output lists the local variables for the project directory from which you’re running the command and all global variables.
1sf config list1List Config
2==========================================================
3| Name Value Location
4| ─────────────────── ─────────────────────────── ────────
5| org-instance-url https://test.salesforce.com Local
6| org-max-query-limit 20000 Local
7| target-dev-hub DevHub LocalTo return one or more previously set config variables, use config get. It’s often useful to specify JSON output for this command for easier parsing in a continuous integration (CI) environment. For example, to return the value of target-org and target-dev-hub:
1sf config get target-org target-dev-hub --jsonTo unset a config variable, run the config unset command. For example, to unset the org-instance-url config variable:
1sf config unset org-instance-urlList of Configuration Variables
org-api-version
The API version for a specific project or all projects. Normally, Salesforce CLI assumes that you’re using the same version of the CLI as the Dev Hub org.
1sf config set org-api-version 57.0 --globalBe sure not to confuse this config variable with the sourceApiVersion project option, which has a similar name. See How API Version and Source API Version Work in Salesforce CLI for more information.
Environment variable: SF_ORG_API_VERSION
1SF_ORG_API_VERSION=57.0org-capitalize-record-types
Specifies whether Salesforce CLI capitalizes the first letter of a default record type when it creates a scratch org. Valid values are true or false. The default value is true.
Default record types are defined in the objectSettings option of a scratch org definition file, as described in Scratch Org Definition File Options. The setting is required before installing a package that creates record types.
1sf config set org-capitalize-record-types false --globalEnvironment variable: SF_CAPITALIZE_RECORD_TYPES
org-custom-metadata-templates
Specifies either a local directory or a cloned GitHub repository that contains the default custom code templates used by the project generate command. The GitHub URL points to either the root directory that contains your templates or to a subdirectory on a branch in the repo that contains your templates. For example:
1sf config set org-custom-metadata-templates https://github.com/mygithubacct/salesforcedx-templatesEnvironment variable: SF_ORG_CUSTOM_METADATA_TEMPLATES
1SF_ORG_CUSTOM_METADATA_TEMPLATES=https://github.com/mygithubacct/salesforcedx-templatestarget-org
The username or alias for an org that all commands run against by default.
1sf config set target-org test-scratch-org@example.comEnvironment variable: SF_TARGET_ORG
1SF_TARGET_ORG=test-scratch-org@example.comtarget-dev-hub
The username or alias for your default Dev Hub org.
1sf config set target-dev-hub my-dev-hub@devhub.orgEnvironment variable: SF_TARGET_DEV_HUB
1SF_TARGET_DEV_HUB=my-dev-hub@devhub.orgtarget-devops-center (DevOps Center commands only)
The username or alias for the org in which DevOps Center is installed.
1sf config set target-devops-center myDevOpsCenterOrg@example.comdisable-telemetry
By default, Salesforce CLI collects usage information, user environment information, and crash reports. This option allows you to opt out.
1sf config set disable-telemetry trueEnvironment variable: SF_DISABLE_TELEMETRY
org-instance-url
The URL of the Salesforce instance that’s hosting your org. Default value is https://login.salesforce.com. We recommend that you set this config variable to the My Domain login URL for your org. You can find the My Domain login URL on the My Domain page in Setup.
1sf config set org-instance-url https://yoda.my.salesforce.comEnvironment variable: SF_ORG_INSTANCE_URL
1SF_ORG_INSTANCE_URL=https://yoda.my.salesforce.comorg-max-query-limit
The maximum number of Salesforce records returned by a Salesforce CLI command. Default value is 10,000.
For example, let’s say you run sf org list metadata -m Role on a Salesforce org that has 15,000 roles. By default the command displays only 10,000 roles. A message warns you that the command retrieved only some of the roles. To see all of them, set this config variable to a larger number.
1sf config set org-max-query-limit 20000Environment variable: SF_ORG_MAX_QUERY_LIMIT
1SF_ORG_MAX_QUERY_LIMIT=200000org-metadata-rest-deploy
If true, Salesforce CLI uses Metadata REST API for deployments. By default, Salesforce CLI uses SOAP. Deployments using REST aren’t bound by the 39-MB.zip file size limit that applies to SOAP deployments.
1sf config set org-metadata-rest-deploy trueEnvironment variable: SF_ORG_METADATA_REST_DEPLOY