config Commands
config:get
Command Syntax
- sfdx force:config:get
- [--json]
- [--loglevel LOGLEVEL]
- [--verbose]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: flag
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
- Type: string
- Permissible values are: trace, debug, info, warn, error, fatal
- Default value: error
- --verbose
- Optional
-
Emit additional command output to stdout.
- Type: flag
Help for config:get
To see your default scratch org username, include "defaultusername".
To see your default Dev Hub, include "defaultdevhubusername".
To see your default instance URL, include "instanceUrl".
To see the locations where your values are set, include the --verbose flag.
Examples:
1$ sfdx force:config:get defaultusername1$ sfdx force:config:get defaultusername defaultdevhubusername instanceUrl1$ sfdx force:config:get defaultusername defaultdevhubusername --verboseconfig:list
Command Syntax
- sfdx force:config:list
- [--json]
- [--loglevel LOGLEVEL]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: flag
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
- Type: string
- Permissible values are: trace, debug, info, warn, error, fatal
- Default value: error
Help for config:list
Lists the config variables that the Salesforce CLI uses for various commands and tasks.
config:set
Command Syntax
- sfdx force:config:set
- [-g]
- [--json]
- [--loglevel LOGLEVEL]
Parameters
- -g | --global
- Optional
-
Sets the configuration variables globally, so they can be used from any directory.
- Type: flag
- --json
- Optional
-
Format output as JSON.
- Type: flag
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
- Type: string
- Permissible values are: trace, debug, info, warn, error, fatal
- Default value: error
Help for config:set
Sets the configuration variables that the Salesforce CLI uses for various commands and tasks. Local variables apply only to your current project. Global variables apply in any directory.
Examples:
1$ sfdx force:config:set defaultusername=me@my.org defaultdevhubusername=me@myhub.org1$ sfdx force:config:set defaultdevhubusername=me@myhub.org -g