Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dev-kraken's avatar

Introducing EnvValidator: A simple way to validate your .env files

Hi everyone 👋

I just released a new package: EnvValidator

It’s designed to help developers validate and manage .env files more reliably.

✨ Features:

  • Validate environment variables with rules (e.g. string, number, port, etc.)
  • Keep .env and .env.example in sync automatically
  • Clear error messages when something’s missing or invalid
  • Simple, lightweight, and easy to plug into projects

I built this because I often ran into issues where missing or invalid env variables broke my app at runtime.
With EnvValidator, you can catch those problems early.

💡 I’d love your feedback:

  • Do you see this being useful in your workflow?
  • What features or rules should be added next?

👉 Repo: github.com/dev-kraken/env-validator

Thanks, and I’m looking forward to hearing what you think! 🚀

2 likes
0 replies

Please or to participate in this conversation.