Skip to main content
MergeGuide reads project configuration from a YAML file. This page is the reference for the user-facing keys. For a task-oriented walkthrough, see Configuration file.

Where config is loaded from

MergeGuide looks for a config file in this order and uses the first it finds:
  1. .mergeguide.yaml
  2. .mergeguide/config.yaml
  3. ~/.mergeguide/config.yaml (user-global)

Keys written by init

mergeguide init writes this starting config:
.mergeguide/config.yaml
version: "1.0"
fail_mode: closed
enforcement_mode: graduated
policies:
  use_defaults: true
  custom_dir: .mergeguide/policies
KeyTypeDefaultDescription
versionstring"1.0"Config schema version.
fail_modestringclosedWhether a failed check blocks. closed blocks on blocking findings.
enforcement_modestringgraduatedApplies enforcement progressively across your workflow layers.
policies.use_defaultsbooltrueRun MergeGuide’s default policy set.
policies.custom_dirstring.mergeguide/policiesDirectory holding your custom policy files.

Keys managed with config set

These keys tune what’s reported and what blocks. You can edit them in the file directly or with mergeguide config set:
KeyTypeValuesDescription
severitychoiceerror, warning, infoMinimum severity to report.
fail_on_warningbooltrue / falseExit with an error if warnings are found.
exclude_patternslistglob patternsPaths to exclude from checks.
enabled_policieslistpolicy IDsPolicies to explicitly enable.
disabled_policieslistpolicy IDsPolicies to explicitly disable.
mergeguide config set severity warning
mergeguide config set fail_on_warning true
.mergeguide/config.yaml
severity: warning
fail_on_warning: true
exclude_patterns:
  - "**/vendor/**"
  - "**/generated/**"
enabled_policies:
  - owasp-top-10
disabled_policies:
  - example-noisy-rule

Manage config from the CLI

CommandWhat it does
mergeguide config listList current configuration.
mergeguide config get <key>Get a value.
mergeguide config set <key> <value>Set a value.
mergeguide config unset <key>Remove a value.
mergeguide config pathShow the config file path.
This reference covers the user-facing keys MergeGuide reads from your config file. If you find a key in an example that isn’t listed here, confirm it against mergeguide config list before relying on it.

Next steps

Configuration file

A walkthrough of the config file.

Thresholds

Tune what blocks a commit or merge.