drift-check
v0.1.0
Published
Detect and prevent config drift between dev and prod environments
Maintainers
Readme
vercel-drift-checker
Stop config drift from breaking your deploys.
Compare dev and prod config files. Catch mismatches before they ship.
Quick Start
npx drift-check compare --dev config/dev.js --prod config/prod.jsWhat It Does
| Feature | Description | |---------|-------------| | Compare | Upload or point to two config files — see what's different | | Rules | Set which keys must match, can differ, or shouldn't exist in prod | | CI Gate | Block deploys on GitHub PRs when drift is detected | | History | Track when drift was introduced and resolved |
Example Output
✗ [VALUE MISMATCH] features.ticketExport
dev: true
prod: false
✗ [MISSING IN PROD] routes.webhookHandler
✓ [ALLOWED] baseUrl differs (expected)
✗ 2 error(s) — deploy blocked.Rules (.driftrc.json)
{
"rules": [
{ "key": "features.*", "rule": "must_match" },
{ "key": "baseUrl", "rule": "allow_differ" },
{ "key": "debug", "rule": "must_not_exist_in_prod" }
]
}| Rule | Meaning |
|------|---------|
| must_match | Dev and prod values must be identical |
| allow_differ | OK to have different values per env |
| must_exist | Key must be present in both files |
| must_not_exist_in_prod | Block this key from production |
GitHub Action
on:
pull_request:
paths: ['config/**']
jobs:
drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx drift-check compare --ciWeb Dashboard
A visual UI is also available for teams who prefer not to use the CLI. Upload files, edit rules with dropdowns, and browse comparison history.
License
MIT
