Skip to content

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-empty

GitLab CI

audit-env:
script:
- npx @albertoarena/envaudit check --ci --no-color

Other CI systems

envaudit works in any environment with Node.js >= 18. The --ci flag ensures the build fails when:

  • Variables are defined in .env.example but 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.