driftcheck is a small CLI for comparing two .env-style files and reporting configuration drift.
It detects:
- keys with different values
- keys that exist only in the first file
- keys that exist only in the second file
go run . <file1> <file2>Example:
go run . file1.env file2.envSample output:
Difference for key 'DB_HOST': 'localhost' vs 'production.server.com'
Key 'API_KEY' exists in file 1 but not in file 2
Key 'NEW_FEATURE' exists in file 2 but not in file 1
If no drift is found, the command prints:
No differences found.
0: no differences found1: differences found, invalid arguments, or a file could not be read
driftcheck currently supports simple .env lines in this form:
KEY=value
Blank lines and lines starting with # are ignored. Keys and values are trimmed for surrounding whitespace.
go build -o driftcheck .Then run:
./driftcheck file1.env file2.env