PitchHut logo
A linter for environment variables to ensure smooth deployments.
Pitch

envguard acts as a spell-checker for your environment variables, scanning your code and checking .env files to prevent misconfigurations that can lead to disruptions in production. Fast, offline, and requiring zero setup, it allows seamless auditing without the need for installation.

Description

envguard is a powerful tool designed to enhance the reliability of applications by managing environment variables. Functioning as a spell-checker or linter specifically for environment configurations, envguard ensures that critical settings are properly defined, preventing runtime errors in production environments caused by missing or misconfigured variables.

Key Features

  • Automatic Scanning: Efficiently identifies and validates all environment variables utilized in code, such as process.env.DATABASE_URL or os.environ.get('PORT').
  • Error Detection: Detects issues including:
    • Missing Variables: Identifies variables referenced in code that are not set in your .env file.
    • ⚠️ Unused Variables: Points out .env entries that are not in use by the code.
    • 🚫 Invalid Formats: Checks for improperly formatted values, such as invalid URLs or non-numeric port values.

Security and Privacy

  • Offline Operation: envguard operates entirely offline, ensuring that no network requests are made to preserve user privacy.
  • Privacy-Engineered: Only the names of the keys in the environment variables are read. Actual secret values remain untouched and confidential.

Commands Overview

envguard supports a variety of commands to facilitate environment variable management:

CommandDescription
envguard initSets up the project and creates a configuration file.
envguard auditScans for missing and unused environment variables.
envguard validateValidates values against predefined rules for compliance.
envguard sync --forceGenerates a clean .env.example from the current .env.
envguard doctorConducts a comprehensive project health check.

Advanced Configuration

Customize the behavior of envguard through the .envguard.yaml file. Tailor your configuration to suit your project's needs, including paths to scan and rules for value validation.

CI/CD Integration

Integrate envguard with your CI/CD pipeline on platforms like GitHub Actions to automate audits of environment configurations in pull requests, ensuring that incomplete or invalid settings do not reach production.

Supported Languages

envguard is compatible with various programming languages, including JavaScript, TypeScript, Python, Go, Ruby, Rust, PHP, and more, providing broad applicability across different development environments.

This tool is an essential companion for developers seeking to streamline environment variable management, enhance application stability, and uphold best practices in configuration security.

0 comments

No comments yet.

Sign in to be the first to comment.