CommandBox has a global configuration file that stores user settings. It is located in
~/.CommandBox/CommandBox.json and can be used to customize core CommandBox behaviors as well as overriding module settings. Config settings are managed by the
config show, and
config clear commands.
config set name=mySetting
Nested attributes may be set by specifying dot-delimited names or using array notation. If the set value is JSON, it will be stored as a complex value in the commandbox.json.
Set module setting
config set modules.myModule.mySetting=foo
Set item in an array
config set myArraySetting="value"
Set multiple params at once
config set setting1=value1 setting2=value2 setting3=value3
Override a complex value as JSON
config set myArraySeting="[ 'email@example.com', 'firstname.lastname@example.org' ]"
Structs and arrays can be appended to using the "append" parameter. Add an additional settings to the existing list. This only works if the property and incoming value are both of the same complex type.
config set myArraySetting="[ 'another value' ]" --append
Output a setting:
config show settingName
Nested attributes may be accessed by specifying dot-delimited names or using array notation. If the accessed property is a complex value, the JSON representation will be displayed
config show modules.myModule.settingNameconfig show mySettingArray
To Remove a setting out of the
CommandBox.json use the
config clear command. Nested attributes may be set by specifying dot-delimited names or using array notation.
config clear description