Skip to main content

CLI tool to sync and validate .env files against .env.example — detect missing, extra, or mismatched environment variables

Project description

dotenv-validator

CLI tool to sync and validate .env files — detect missing, extra, or mismatched environment variables between .env.example and .env.

Why?

Every project with environment variables has the same problem:

  • You add a new config to .env.example but forget to update .env
  • Someone deploys without the right env vars set
  • You waste hours debugging when it's really DATABASE_URL missing

Install

pip install dotenv-validator

Usage

Basic comparison

dotenv-validator

Compares .env.example with .env in current directory.

Auto-fix missing keys

dotenv-validator --fix

Strict mode

dotenv-validator --strict

JSON output (for CI)

dotenv-validator --json

Initialize .env.example

dotenv-validator --init

Custom file paths

dotenv-validator --example .env.dev.example --env .env.production

Use in CI (GitHub Actions)

- name: Validate env files
  run: pip install dotenv-validator && dotenv-validator --json

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotenv_validator-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotenv_validator-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file dotenv_validator-1.0.0.tar.gz.

File metadata

  • Download URL: dotenv_validator-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for dotenv_validator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 055b2593625a2415425005372ee3e5b52969f18d5cb5d8b970e4a52b448bea51
MD5 0ed68b5b6ef43c4b4986535984d231fa
BLAKE2b-256 405b3dcd83ea504db055ae25ca4cdd388c839b67b2d8c1196b784dae6367a80b

See more details on using hashes here.

File details

Details for the file dotenv_validator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dotenv_validator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db3982f3f6aa3b85b35be07f7d95688970f1c87d9e6a2163dd20a18d06e52947
MD5 89a2394570a67d776ae4da04a4e741d8
BLAKE2b-256 3ee28712495aca4b1fecc4041102b89007bb96df0e18415ababfc2881c096c40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page