config Commands
force:config:get
Command Syntax
- sfdx force:config:get
- [--json]
- [--loglevel LOGLEVEL]
- [--verbose]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- --verbose
- Optional
-
Emit additional command output to stdout.
- Type: boolean
Help for force: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 --verboseforce:config:list
Command Syntax
- sfdx force:config:list
- [--json]
- [--loglevel LOGLEVEL]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
Help for force:config:list
Lists the config variables that the Salesforce CLI uses for various commands and tasks.
force:config:set
Command Syntax
- sfdx force:config:set
- [--json]
- [--loglevel LOGLEVEL]
- [-g]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sfdx/sfdx.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -g | --global
- Optional
-
Sets the configuration variables globally, so they can be used from any directory.
- Type: boolean
Help for force: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