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.examplebut forget to update.env - Someone deploys without the right env vars set
- You waste hours debugging when it's really
DATABASE_URLmissing
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
055b2593625a2415425005372ee3e5b52969f18d5cb5d8b970e4a52b448bea51
|
|
| MD5 |
0ed68b5b6ef43c4b4986535984d231fa
|
|
| BLAKE2b-256 |
405b3dcd83ea504db055ae25ca4cdd388c839b67b2d8c1196b784dae6367a80b
|
File details
Details for the file dotenv_validator-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dotenv_validator-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db3982f3f6aa3b85b35be07f7d95688970f1c87d9e6a2163dd20a18d06e52947
|
|
| MD5 |
89a2394570a67d776ae4da04a4e741d8
|
|
| BLAKE2b-256 |
3ee28712495aca4b1fecc4041102b89007bb96df0e18415ababfc2881c096c40
|