Newer Version Available
CLI Runtime Configuration Values
To set a configuration value for the current project:
1sfdx force:config:set name=<value>For local configuration values, you must issue this command from within the Salesforce DX project directory.
To set the value for all your projects:
1sfdx force:config:set name=<value> --globalYou can issue global commands anywhere or within any project, yet they apply to all the Salesforce CLI commands you run.
You can view the local and global configuration values that you have set. The output lists the local values for the project directory from which you are running the command and all global values.
1sfdx force:config:listTo return one or more previously set configuration values, use force:config:get. It is 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 defaultusername and defaultdevhubusername:
1sfdx force:config:get defaultusername defaultdevhubusername --jsonTo unset a configuration value, set it to no value. For example, to unset the instanceUrl configuration value:
1sfdx force:config:set instanceUrl=You can set these CLI configuration values.
| Configuration Value Name | Description |
|---|---|
| apiVersion | The API version for a specific project or all projects. This examples sets the
API version for all projects (globally). sfdx force:config:set apiVersion=41.0 --global |
| defaultusername | The username for an org that all commands run against by default. |
| defaultdevhubusername | The username of your Dev Hub org that the force:org:create command defaults to. |
| instanceUrl | The URL of the Salesforce instance that is hosting your org. |