Open SourceApache-2.0 License

badgr-config-doctor

Validate your environment variables, JSON/YAML configs, file paths, and runtime versions before running — so you catch misconfig before it breaks production.

How it works

Deployments fail because a .env variable is missing, a JSON config is malformed, or the runtime is the wrong version — and you only find out after the container starts. badgr-config-doctor runs these checks in under a second, before you deploy.

1

Check required env vars

Confirms each key in --required-env exists in process.env and is non-empty.

2

Validate config text and runtime

Parses --json-text / --yaml-text for validity and confirms --runtime matches the installed Node/Python version.

3

Report pass/fail per check

Prints a per-check result and exits 1 if anything failed, so it can gate a deploy or a badgr run step.

1

Install

Terminal
npx badgr-config-doctor --required-env API_KEY,DATABASE_URL

Requires Node.js 18+.

2

Usage

Pass the checks you care about as flags — required env vars, config text, or a runtime requirement — and combine them in one command.

Terminal
npx badgr-config-doctor \
  --required-env API_KEY,DATABASE_URL \
  --runtime node@20 \
  --json

Example output

Terminal output
badgr-config-doctor

  ✓  API_KEY           set
  ✗  DATABASE_URL      missing — add to .env or CI secrets
  ✓  JSON config       valid
  ✗  Runtime           node@18 found, node@20 required

  2 failures. Fix before deploying.

Commands

badgr-config-doctor --required-env <keys>Check that comma-separated env var names are set and non-empty.
badgr-config-doctor --json-text / --yaml-text <str>Validate a JSON or YAML config string parses without errors.
badgr-config-doctor --runtime node@20Check the installed Node/Python version meets the requirement.

What's included

Validates required env vars are set and non-empty
Parses and validates JSON and YAML config strings
Checks runtime version requirements (e.g. node@20, python@3.11)
Flags react / react-dom major version mismatches
Combine multiple checks in a single command
Machine-readable --json output for CI
Runs as a preflight step before badgr run / deploy
View on GitHub →

Ready to try badgr-config-doctor?

npx badgr-config-doctor --required-env API_KEY,DATABASE_URL — no account needed to get started.