BinaryBard27/env-check ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python command line tool that validates environment variables before an app starts.
I want it to read a schema file in JSON or YAML, then check a .env file against rules like required fields, type checking for strings, integers, floats, booleans, URLs, emails, and JSON, plus things like allowed ranges, regex patterns, default values, disallowed values, and environment specific rules for dev, staging, and production. It should support a strict mode that fails on extra keys, and it should be able to either print friendly text or clean JSON for CI.
Also add a small Python API so an app can call something like an EnvGuard and either raise a clear validation error or return a result object. Make sure missing files return a sensible exit code, and invalid config stops the app early instead of loading bad settings. If you need to check the latest Python packaging or CLI docs, look them up online.
Are you gonna build this?
make sure you review the code using coderabbit