Skip to main content

A CLI tool to check, validate, and manage .env files

Project description

env-check-utils

env-check-utils is a Python package that helps you inspect and manage your environment variables and .env files with ease. It provides commands to validate .env files against a schema, auto-generate schemas, find unused variables, and scan code directories for environment variable usage.


Installation

Install the package from PyPI

pip install env-check-utils


Usage

Once installed, you can run it from the command line using:

env-check [OPTIONS]

Features

Here are all the available options and their descriptions:

1️. Validate .env file against a schema

env-check --schema path/to/schema.json

Validates your .env file against a provided JSON schema.

Ensures that required environment variables exist and have the correct type/format.

2️. Auto-generate a schema.json from your .env file

env-check --generate-schema

Scans your .env file and generates a schema.json automatically based on the variables found.

Useful when starting a new project or documenting existing variables.

3️. Find unused environment variables

env-check --check-unused

Checks for environment variables present in your .env file but not used anywhere in your project.

Helps keep your environment files clean and free from unnecessary variables.

4️. Scan a specific code directory for environment variable usage

env-check --path path/to/code

Scans the given directory for usage of environment variables.

Useful for identifying where variables are referenced in your codebase.


Examples

Example 1: Validate .env with a schema

env-check --schema config/schema.json

Example 2: Auto-generate schema from .env

env-check --generate-schema

Example 3: Find unused variables

env-check --check-unused

Example 4: Scan a project folder

env-check --path ./src

Documentation

You can find the full documentation online at:
https://env-check-utils.readthedocs.io/en/latest/

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

env_check_utils-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

env_check_utils-0.1.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file env_check_utils-0.1.2.tar.gz.

File metadata

  • Download URL: env_check_utils-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for env_check_utils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d18c52609adb1089a2c90b323d441794d8d1b478cef3164ae4d38e0529b554fb
MD5 9ba5ca2aebae1f703d957c38bc940777
BLAKE2b-256 57c15b358bba06a42a6cf12882ffa9541917297c43d326fd4ddb5ee8bd9b48df

See more details on using hashes here.

File details

Details for the file env_check_utils-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for env_check_utils-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 84544bb8c882b89ec86447debf7a752441277d166c541e7ea0b638cdfde0d886
MD5 4a4cd76f3af67b5809ce34b020fb27ec
BLAKE2b-256 c823fc28c12426cf0a156e900e24de00a64655d04521b6a4367df0ba17607924

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