Skip to main content

envaudit

Environment variable validator and manager.

Check, validate, compare, and manage environment variables from the command line.

Installation

pip install envaudit-cli

Usage

Validate a .env file

envaudit validate .env
# ✓ .env is valid (12 variables)

envaudit validate broken.env
# ✗ broken.env has 2 error(s):
#   • Line 3: Missing '=' in 'INVALID_LINE'
#   • Line 7: Invalid variable name '123BAD'

Check required variables

envaudit required DATABASE_URL API_KEY SECRET
# ✗ Missing 1 required variable(s):
#   • SECRET

# Also check a .env file
envaudit required DATABASE_URL -f .env

Compare .env against template

envaudit compare .env.example .env
# ✗ Missing 2 variable(s) from .env.example:
#   • NEW_FEATURE_FLAG
#   • ANALYTICS_KEY
# ⚠ 1 extra variable(s) not in .env.example:
#   • DEBUG

Generate export statements

# For bash/zsh
eval "$(envaudit export .env)"

# For fish
envaudit export .env --shell fish | source

# For PowerShell
envaudit export .env --shell powershell | Invoke-Expression

Show .env contents (with masking)

envaudit show .env
# DATABASE_URL=postgres://localhost:5432/myapp
# API_KEY=sk-1***************
# DEBUG=true

Get a single variable

envaudit get DATABASE_URL
# postgres://localhost:5432/myapp

envaudit get MISSING --default "fallback"
# fallback

Dump environment variables

# All variables
envaudit dump

# Filter by pattern
envaudit dump -f "AWS|AZURE"

# Show without masking
envaudit dump --no-mask

Security audit

envaudit audit .env
# Auditing: .env (12 variables)
#
# [WARNING] 2 variable(s) have empty values
#   • OPTIONAL_KEY
#   • LEGACY_TOKEN
#
# [WARNING] 1 variable(s) appear to have placeholder values
#   • API_URL
#
# [INFO] 4 variable(s) appear to contain sensitive data
#   • API_KEY
#   • SECRET_TOKEN
#   • DATABASE_PASSWORD
#   • JWT_SECRET

JSON Output

All commands support --json for machine-readable output:

envaudit validate .env --json
{
  "file": ".env",
  "valid": true,
  "variables": 12,
  "errors": []
}

For AI Agents

See SKILL.md for agent-optimized documentation.

License

MIT

Release files for envaudit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for envaudit 0.1.0
File Size Uploaded
envaudit-0.1.0.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for envaudit 0.1.0
File Interpreter ABI Platform
envaudit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 kB

Release files / envaudit-0.1.0.tar.gz

Download URL envaudit-0.1.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ae248a8b7ae00fc09c427cf4ee39b5bae37cd93468ae308be98585e008a52e11
BLAKE2b-256 checksum
How to use checksums
d24119fb943e94c90fa34bef85cd9646cdcb842a22eabeb88d009643c605ac64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / envaudit-0.1.0-py3-none-any.whl

Download URL envaudit-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f8a503a73af3c222f39430b4435490949ef90b1c0fb9f98ec423ad3c4a796f7
BLAKE2b-256 checksum
How to use checksums
c15752b839b5b21faa5f4bb1cabd4916a56cf36b615ec63d98c53cb5a078027f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page