Gate your deploys on config drift — fail the build before prod finds out
Staging and production configs drift quietly: one incident fix touches prod only, three weeks later a routine deploy behaves differently per environment. A one-line CI step makes that a build failure instead of a 2 a.m. page.
The gate: --output silent
ConfigDrift is an MIT-licensed Python 3.10+ CLI that compares config files or whole environment directories and classifies drift by severity. For CI, use silent output: the command exits 0 when there is no breaking drift and 1 when breaking drift is found.
pip install git+https://github.com/Coding-Dev-Tools/configdrift.git
configdrift check ./config/staging/app.yaml ./config/prod/app.yaml --output silent
# exit 0 = no breaking drift · exit 1 = breaking drift → CI fails
By default only breaking drift fails the gate. Keys like database*, auth*, api_key*, secret*, password*, token*, and endpoint* are classified breaking out of the box. Add --strict if you want any drift — not just breaking changes — to fail the build.
GitHub Actions example
- name: Detect config drift
run: |
pip install git+https://github.com/Coding-Dev-Tools/configdrift.git
configdrift check ./config/staging/app.yaml ./config/prod/app.yaml --output silent
For monorepos with several services, compare whole directories at once:
configdrift scan ./config/staging ./config/prod --baseline staging --output silent
Tuning the gate
- Severity rules: review which keys count as breaking in your project settings; the defaults match where most teams get paged.
- Baselines: pass
--baseline/--targetto make direction explicit when comparing environments. - Noise control: large scans are slower — narrow the scan to changed files or a single directory.
What it costs
The CLI (check, scan) is free forever: works fully offline, no telemetry, no phone-home. If you outgrow one environment pair, paid tiers add unlimited environments ($15/mo Individual) or the full suite of 11 developer tools ($49/mo Suite).
| Tier | Price | Includes |
|---|---|---|
| Free | $0 | CLI only, 1 env pair |
| Individual | $15/mo ($12 annual) | Unlimited environments, custom rules |
| Suite | $49/mo ($39 annual) | All 11 tools |
Install
# not published on public PyPI — install from source:
pip install git+https://github.com/Coding-Dev-Tools/configdrift.git
# macOS/Linux via Homebrew:
brew tap Coding-Dev-Tools/tap && brew install configdrift
# Windows via Scoop:
scoop bucket add Coding-Dev-Tools https://github.com/Coding-Dev-Tools/scoop-bucket
scoop install configdrift
Repo: github.com/Coding-Dev-Tools/configdrift · Related guide: Detecting config drift across environments