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.3.tar.gz (4.0 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.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: env_check_utils-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 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.3.tar.gz
Algorithm Hash digest
SHA256 733c05da404bd6dff8ea6f3d87702bfd4ad848686ef81acc1bdf4edab637e9e0
MD5 b0d8b9ab5cb484b027f499ce866dfc15
BLAKE2b-256 88fa212cea22b05778c3eb75386c6bcf769bf6c01ef08b7ee6b33a2e9eab0ea7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for env_check_utils-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f801c2d326880ea4a7df3ed418ea41dc1fb3f9ad6c464f1c58fd9da97ddfa657
MD5 5e958e3adfbc57c4886469ce0865c995
BLAKE2b-256 e8480e700cf5ed0eabbfea72f2a1634a42f7af4aba0f2cfd64440fc69dbeae58

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