Skip to main content

CLI tool to validate .env files for safety and completeness

Project description

🛡️ envguardx

envguardx is a lightweight CLI tool for validating, inspecting, and generating .env and .env.example files — with support for optional schema validation.


🚀 Features

  • ✅ Check for missing or empty env vars
  • ⚠️ Detect unsafe or insecure values
  • 🧪 Validate against a JSON schema
  • 🧬 Generate .env.example from .env
  • 🔧 Easy CLI usage with helpful output

📦 Installation

➤ Local Editable Install (Recommended for Dev)

pip install -e /absolute/path/to/envguardx

Replace /absolute/path/to/envguardx with the actual absolute path to your cloned or local project folder.

🧪 Usage

Once installed, you can run the CLI via:

envguardx --help

➤ Check an .env file

envguardx check .env

➤ Check an .env with a JSON Schema

envguardx check .env --schema schema.json

Example schema.json

{
  "API_KEY": "string",
  "DEBUG": "bool",
  "PORT": "int"
}

➤ Generate .env.example file from .env

API_KEY=
DEBUG=
PORT=

📦 Bundling

➤ To build and deploy to package repo of choice (pypi)

Creat your .pypirc file

[pypi]
username = __token__
password = <PyPI token>
python -m build

To deploy

twine upload dist/*

It'll prompt you to log into your PyPI account (or you can pass -u USERNAME -p PASSWORD, or use an API token).

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

envguardx-0.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

envguardx-0.2.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file envguardx-0.2.0.tar.gz.

File metadata

  • Download URL: envguardx-0.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for envguardx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 872416e01f38279a28081b79b1457faa113ee9e3fa1f6ecde2aceaff5ffa6c25
MD5 658a3702f5409f96e87e0ab18bce53cc
BLAKE2b-256 7f3e97bdb069835feedc65bbdee236ae3cb1803e8738fbb9c5cd7d88d124f32c

See more details on using hashes here.

File details

Details for the file envguardx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: envguardx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for envguardx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f554542042eb0a83265e6851a7d4506523975c5eb74d8cefdbf409fadd3dadb
MD5 cffdbd7600632db04691b342e097a113
BLAKE2b-256 85f7a3d5303fbae8fbefa0a5f9ab3e84873c2faaa3c18cbee03f631869b17b22

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