bench set-config
Usage
bench set-config [OPTIONS] KEY VALUE
Description
Bench provides a wrapper command to insert or update values in the site config
files. You can update values in your site's site_config.json, along with the
bench directory's common_site_config.json through the same command.
To read more about site configuration and understanding key precedence, refer to the docs here.
Flags
-g,--globalSet value in the Bench's Common Site Config-p,--parseParse given value instead of string. You can use this to set dict and list values. This was--as-dictin earlier versions.
Examples
Enable tests for given site.
bench --site {site} set-config allow_tests trueEnable tests for all sites.
bench --site all set-config allow_tests trueUsing the above command, each site's
site_config.jsonwill have the key-value"allow_tests": true. This allows running tests on all of the sites.bench set-config -g allow_tests trueUsing the above command, the bench's
common_site_config.jsonwill have the key-value"allow_tests": true. This will allow each site on the bench to have tests run unless they have a value defined for the sma in theirsite_config.json.Set a dict value in your site's
frappe.confbench --site {site} set-config backup '{"includes": ["Not", "ToDo"]}' --parseYou can now access the list in code as
frappe.conf.backup.get("includes").