Back to browse
GitHub Repository

Contract-driven .env validator — catches missing and malformed environment variables before they cause failures

1 starsPython

EnvSentinel – contract-driven .env validation, zero dependencies

by tweakyourpc·Mar 6, 2026·1 point·0 comments

AI Analysis

●●SolidSolve My ProblemShip It

Solves a real CI/CD pain, but dotenv validation already exists (python-dotenv, pydantic).

Strengths
  • Treats .env as versioned contract preventing silent drift and configuration mismatches
  • Zero dependencies using stdlib only makes adoption frictionless in Python projects
  • CLI handles glob patterns, JUnit reports, and auto-generation of .env.example documentation
Weaknesses
  • Competes directly with pydantic validation, which covers env + typed schemas simultaneously
  • Python-only; ecosystem alternatives (Doppler, 1Password CLI) solve this cross-language
Target Audience

Backend developers, DevOps engineers, teams managing environment configuration across environments

Similar To

pydantic (BaseSettings) · python-dotenv · Doppler

Post Description

Built this after one too many production incidents caused by a renamed variable or missing key that CI never caught. EnvSentinel treats your .env as a versioned contract - you define the rules once in a JSON schema, then validate against it in CI, pre-commit, or locally. Also regenerates .env.example from the contract automatically so it never drifts. Pure Python stdlib, no external dependencies, 3.10+.

Similar Projects