🔧 Env Variable Validator / 环境变量校验器
Validate environment variable definitions across .env files, CI, and deployments. / 校验.env文件、CI和部署中的环境变量定义一致性。
🦁 由 KingAI.Work 出品 — 智能进化|vip@kingai.work
Overview / 概览
• Instantly validate all .env files against a master schema / 秒级扫描所有环境配置,自动与主模板比对,杜绝配置遗漏 • Detect missing, extra, or misnamed variables with one command / 一条命令找出缺失、冗余或命名错误的环境变量,让错误无所遁形 • Cross-reference CI pipeline and deployment env lists / 跨平台比对CI流水线与部署环境变量,确保开发与生产完全一致 • Export clean validation reports for team code review / 生成清晰的校验报告,直接用于团队审查,大幅减少沟通成本 • Pro: Real-time watch mode auto-checks on file changes / 专业版支持实时监听,文件一改即自动校验,防患于未然 • Pro: Schema generation from live running containers / 专业版可从正在运行的容器自动提取变量模板,逆向验证最佳实践
How It Works / 原理
# Step 1 — check environment
which bash curl && echo "Ready"
# Step 2 — run the tool
bash env-validator check --schema .env.example --env .env.production • Validates production .env against example schema, flagging all mismatches / 根据主模板校验生产环境配置,一键标出所有不一致项
# Step 3 — review output
echo "Done — check the generated output"
Example Scenarios / 示例场景
• You push a new feature but the CI fails because a required env var is missing in the pipeline. Run a cross-check before commit to catch it. / 新功能上线,CI却因缺少环境变量而崩溃。提交前跨平台比对,提前拦截。 • Onboarding a teammate: they copy a .env file but miss several new variables. One validation instantly shows what's missing. / 新同事接手项目,复制配置时漏掉了新增变量。一次校验,立即补齐。 • Planning a deployment to staging: your local .env has extra test keys that shouldn't go live. The tool flags them before you deploy. / 准备部署测试环境:本地配置包含不应上线的测试密钥。部署前自动标出,避免意外泄露。
Plans / 版本
| Capability | Free | Pro |
|---|---|---|
| Basics / 基础 | ✅ | ✅ |
| Automation / 自动化 | — | ✅ |
| AI / AI 功能 | — | ✅ |
| Support | Community | Priority |
• Stop chasing silent production failures caused by env mismatches • 终结因环境变量不匹配导致的无声生产故障,从源头杜绝排查地狱 • Turn validation into an automated part of your entire pipeline • 把环境校验变成流水线的自动关卡,不再依赖人工记忆或文档 • Get smart schema inference from your actual deployed apps • 从已部署的应用中智能提取变量模板,让标准定义永远保持最新\n\n
About the Publisher
Published by King AI — kingai.work | vip@kingai.work
