DEV Community

Samuel So
Samuel So

Posted on

Validating environment variables is a crucial step in deploying applications, but it can be a tedious and error-prone process. T

The tool is designed to be easy to use and integrate well with existing workflows. Simply define your schema file, run the CLI command, and it will validate your env vars. For example, given a schema file schema.json with the following content:

{
  "type": "object",
  "properties": {
    "DB_HOST": {"type": "string"},
    "DB_PORT": {"type": "integer"}
  },
  "required": ["DB_HOST", "DB_PORT"]
}
Enter fullscreen mode Exit fullscreen mode

You can run the CLI command env-var-validator -s schema.json to validate your env vars.

Check out the tool at and give it a try.

Top comments (0)