config:get (Deprecated)

Get config var values for given names.

As of March 9, 2023, this command is deprecated and we no longer update this topic.

Don't worry, this command and its flags continue to work the same as before, and any scripts that use the command won’t break. However, we recommend that you start using the equivalent sf-style config get command instead. Here’s how the flags changed between the old and new commands; if a flag isn't listed, the old and new names are the same:

  • Removed flag: --loglevel

For background information about this change, read this blog post, which describes how we've updated many of the existing sfdx commands to use the improvements we made in sf. We improved this particular command on March 9, 2023.

Warning

Help for config:get

Gets the Salesforce CLI configuration values for your default scratch org, your default Dev Hub org, your default instance URL, or any combination of the three. 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 for config:get

1sfdx config:get defaultusername
1sfdx config:get defaultusername defaultdevhubusername instanceUrl
1sfdx config:get defaultusername defaultdevhubusername --verbose

Command Syntax

sfdx 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/.sf/sf.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

Aliases for config:get

1force:config:get