There is a lot of information available for debugging -- e.g. with verbose mode (-v), it will present every configuration layer (default, explicit, mandatory) as well the metadata for the setting.
$ cv vget /debug/ -v
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| key | value |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
| scope | domain |
| key | debug_enabled |
| value | 1 |
| default | 0 |
| explicit | 1 |
| mandatory | 1 |
| layer | mandatory |
| meta.group_name | Developer Preferences |
| meta.group | developer |
| meta.name | debug_enabled |
| meta.config_key | debug |
| meta.type | Boolean |
| meta.quick_form_type | YesNo |
| meta.default | 0 |
| meta.add | 4.3 |
| meta.title | Enable Debugging |
| meta.is_domain | 1 |
| meta.is_contact | 0 |
| meta.description | Set this value to Yes if you want to use one of CiviCRM's debugging tools. This feature should NOT be enabled for production sites. |
| meta.help_text | Do not turn this on on production sites |
+----------------------+-------------------------------------------------------------------------------------------------------------------------------------+
Writing the settings
The setting:set (aka vset) command will update the settings. It accepts key-value pairs:
For precise handling of complex settings, you can supply values as pure JSON:
## Pass key+value as JSON (command line parameter)
cv vset '{"authx_guards": ["perm"]}'
## Pass key+value as JSON (standard input)
echo '{"authx_guards": ["perm"]}' | cv vset --in=json
The above operations will replace the setting. For complex settings, it may be more convenient to target the change at a specific property, but this requires some additional hints. For example, mailing_backend is an object with nested keys, and you may edit it with the +object/+o helper:
Similarly, authx_guards is a list with multiple values. You may add and remove values with the +list/+l helper:
## Add to list
cv vset +list authx_guards+=site_key
cv vset +l authx_guards+=site_key
## Remove from a list
cv vset +list authx_guards-=site_key
cv vset +l authx_guards-=site_key
Details: Scope
The commands manage settings for the default Domain. This can be changed with --scope=domain:123, --scope=domain:*, or --scope=contact:123.
Details: Serialized
For settings that have a serialize=>XYZ option, it will behave like APIv4 "Setting" - e.g. contact_edit_options will look like an array (["1","2","3"...]) rather than ^1^2^3...^. This interpretation applies when displaying any/all configuration layers (ie default, explicit, mandatory).
Add new helper commands for managing settings.
cv setting:get
cv vget
cv setting:set
cv vset
cv setting:revert
cv vdel
Reading the settings
The basic command (
setting:get
akavget
) shows the effective value of all settings:The
value
is the live/effective value, and thelayer
indicates the origin of the value. Values may originate in these layers:mandatory
: Settings which are hardcoded intocivicrm.settings.php
.explicit
: Settings which been explicitly edited in the web UI or CLI.default
: Settings which have no particular value - they inherit a default defined by the application.The list is long. You can narrow down by exact name or by regex:
There is a lot of information available for debugging -- e.g. with verbose mode (
-v
), it will present every configuration layer (default
,explicit
,mandatory
) as well the metadata for the setting.Writing the settings
The
setting:set
(akavset
) command will update the settings. It accepts key-value pairs:For precise handling of complex settings, you can supply values as pure JSON:
The above operations will replace the setting. For complex settings, it may be more convenient to target the change at a specific property, but this requires some additional hints. For example,
mailing_backend
is an object with nested keys, and you may edit it with the+object
/+o
helper:Similarly,
authx_guards
is a list with multiple values. You may add and remove values with the+list
/+l
helper:Details: Scope
The commands manage settings for the default
Domain
. This can be changed with--scope=domain:123
,--scope=domain:*
, or--scope=contact:123
.Details: Serialized
For settings that have a
serialize=>XYZ
option, it will behave like APIv4 "Setting" - e.g.contact_edit_options
will look like an array (["1","2","3"...]
) rather than^1^2^3...^
. This interpretation applies when displaying any/all configuration layers (iedefault
,explicit
,mandatory
).