A new console command «bin/magento config:show» has been added to Magento 2.2

E.g.: bin/magento config:show web/secure/base_url shows the value of the web/secure/base_url option:

Command config:show

Command options:

config:show [--scope[="..."]] [--scope-code[="..."]] [path]

where

  • --scope is the scope of configuration (default, website, store) (default: “default”)
  • --scope-code is the scope code of configuration (website code or store view code)
  • path is configuration path in format first_part/second_part/third_part/etc (required)
Examples

Show all saved configurations:

bin/magento config:show

Result:

web/unsecure/base_url - http://example.com/
general/region/display_all - 1
general/region/state_required - AT,BR,CA,CH,EE,ES,FI,LT,LV,RO,US
catalog/category/root_id - 2
analytics/subscription/enabled - 1

Show all saved configurations for a specific scope:

bin/magento config:show --scope=websites --scope-code=base

Result:

general/region/state_required - AT,BR,CA

Show the base URL for the default scope:

bin/magento config:show web/unsecure/base_url

Result:

web/unsecure/base_url - http://example.com/

Show the base URL for the base website:

bin/magento config:show --scope=websites --scope-code=base web/unsecure/base_url

Result:

web/unsecure/base_url - http://example-for-website.com/

Show the base URL for the default store:

bin/magento config:show --scope=stores --scope-code=default web/unsecure/base_url

Result:

web/unsecure/base_url - http://example-for-store.com/