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.
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_URLoros.environ.get('PORT'). - Error Detection: Detects issues including:
- ❌ Missing Variables: Identifies variables referenced in code that are not set in your
.envfile. - ⚠️ Unused Variables: Points out
.enventries that are not in use by the code. - 🚫 Invalid Formats: Checks for improperly formatted values, such as invalid URLs or non-numeric port values.
- ❌ Missing Variables: Identifies variables referenced in code that are not set in your
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:
| Command | Description |
|---|---|
envguard init | Sets up the project and creates a configuration file. |
envguard audit | Scans for missing and unused environment variables. |
envguard validate | Validates values against predefined rules for compliance. |
envguard sync --force | Generates a clean .env.example from the current .env. |
envguard doctor | Conducts 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.
No comments yet.
Sign in to be the first to comment.