CI Integration
Use --ci to exit with code 1 when errors are found, and --no-color for clean log output.
GitHub Actions
- name: Audit env files run: npx @albertoarena/envaudit check --ci --no-color
# Skip empty value warnings (secrets injected at runtime)- name: Audit env files run: npx @albertoarena/envaudit check --ci --no-color --ignore-emptyGitLab CI
audit-env: script: - npx @albertoarena/envaudit check --ci --no-colorOther CI systems
envaudit works in any environment with Node.js >= 18. The --ci flag ensures the build fails when:
- Variables are defined in
.env.examplebut missing from.env - Real secrets are detected in
.env.example
Warnings (undocumented variables, empty values) are reported but do not cause a non-zero exit code.