🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

driftcheck-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

driftcheck-cli

Semantic diffing of config files (.env, JSON, YAML, TOML) across environments — typed drift detection with a CI exit-code gate.

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
7
-41.67%
Maintainers
1
Weekly downloads
 
Created
Source

driftcheck

Semantic diffing of structured config files across environments.

Compares .env, JSON, YAML, and TOML files by meaning — key paths and typed values — instead of lines. Key reordering and formatting churn are invisible; a silently diverged timeout, missing key, or stale feature flag is not.

$ driftcheck compare dev.env prod.env

dev.env <-> prod.env

MISSING IN prod.env (2)
  - DEBUG                 "true"
  - FEATURE_NEW_CHECKOUT  "true"

VALUE DRIFT (2)
  ~ API_KEY               [redacted] -> [redacted]
  ~ CACHE_TTL             "60" -> "300"

TYPE DRIFT (1)
  ! server.port           "8080" (string) -> 8080 (int)

Install

npm install -g driftcheck-cli

This installs the driftcheck command as a prebuilt native binary (the CLI is written in Go). Currently macOS arm64 only; on other platforms build from source and point DRIFTCHECK_BIN at the binary.

Usage

driftcheck compare <fileA> <fileB>       # two files, any mix of formats
driftcheck compare-dir <dirA> <dirB>     # recursive, pairs files by relative path

Flags: --json (CI output), --verbose, --show-secrets, --config PATH, --no-color.

Exit codes — designed as a CI gate: 0 no unexpected drift, 1 drift found, 2 error.

Highlights:

  • Type-aware: "8080" vs 8080 is reported as type drift, distinct from value drift — usually a quoting/templating bug.
  • Secret redaction by default: keys matching API_KEY, *_TOKEN, *_SECRET, PASSWORD, … are compared on real values but printed [redacted], in both human and --json output.
  • Ignore rules: a .driftcheck.yaml lists keys expected to differ per environment (DATABASE_URL, features.*) so they never page you.

Full documentation: https://github.com/adamsjack711-ux/driftcheck

License

MIT

Keywords

config

FAQs

Package last updated on 15 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts