| name | env-check |
| description | Validates current environment variables against .env.example requirements |
| user-invocable | true |
| allowed-tools | Bash Read |
| effort | low |
Environment Variable Check
- Read requirements:
cat .env.example 2>/dev/null || cat .env.template 2>/dev/null
- Check which are set in the current environment:
while IFS='=' read -r key _; do
[[ "$key" =~ ^#|^$ ]] && continue
if [[ -z "${!key}" ]]; then
echo "MISSING: $key"
else
echo " SET: $key"
fi
done < .env.example
-
Additional checks:
- DATABASE_URL: can it actually connect?
- API keys: correct format (prefix check)?
- URLs: valid format?
-
Output:
Environment Check:
✅ DATABASE_URL
✅ JWT_SECRET
❌ STRIPE_SECRET_KEY ← MISSING (required for payments)
⚠️ REDIS_URL ← Missing (optional, caching disabled)
Result: 1 required var missing - app will fail to start.
- Suggest how to obtain missing variables.