Compare .env against .env.example and find missing or undocumented variables
Project description
env-guard
Compare .env against .env.example and find missing or undocumented variables — great for CI and onboarding.
Install
pip install env-guard
Usage
# Auto-detect .env and .env.example in current directory
env-guard
# Scan a specific project directory
env-guard /path/to/project
# Ignore undocumented keys (don't flag .env-only vars)
env-guard --allow-extra
# Don't warn about empty values
env-guard --no-warn-empty
# CI-friendly: only print issues, exit 0/1
env-guard --quiet
Example output
env: .env
example: .env.example
✗ Missing (2) — required by .env.example but not in .env:
DATABASE_URL
REDIS_URL
⚠ Undocumented (1) — in .env but not in .env.example:
MY_LOCAL_DEBUG_FLAG
⚠ Empty (1) — keys with no value set:
SECRET_KEY
Exits with code 1 when missing or extra keys are found, 0 when all clear.
Supported example file names
.env.example.env.sample.env.template
CI integration
- name: Verify .env matches .env.example
run: env-guard --quiet
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
envwarden-0.1.0.tar.gz
(6.8 kB
view details)
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 envwarden-0.1.0.tar.gz.
File metadata
- Download URL: envwarden-0.1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93c6bd45d20d86751ef72e79fecddb2e244923c98fadd6953fde7bc9cd883d2a
|
|
| MD5 |
8e1e84d8bca3527b1d0e59a915a476da
|
|
| BLAKE2b-256 |
d7fe146371b7a2c9be66ed0b370b2573aa6aead3f8111ad3270dc55f28bf3113
|
File details
Details for the file envwarden-0.1.0-py3-none-any.whl.
File metadata
- Download URL: envwarden-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebd80b3ea44681081a41702b559ff474c36492e8e57c593e4a7850929eab65f9
|
|
| MD5 |
5ce98089b04c81787233d19affea2268
|
|
| BLAKE2b-256 |
df269339cd1653fd0a3624250c13ee54c98403eb6953b2166bd6f856523e49ce
|