Skip to main content
The CLI reads its settings from three sources in order of decreasing precedence: command-line flags override environment variables, which override the config file, which overrides built-in defaults.

Config file

The default config file lives at ~/.infraudit/config.yaml. You can override the path on any command with --config /path/to/config.yaml. The file is created automatically by infraudit config init or infraudit auth login with 0600 permissions so the stored token is not world-readable.

File structure

The CLI refreshes auth.token automatically when it expires, as long as auth.refresh_token is still valid.

Managing config values

Use the config subcommands to read and write individual values without editing the file by hand:

Environment variables

Two environment variables override the config file without modifying it: These are useful for one-off commands or CI/CD pipelines where you don’t want to touch the config file:

Multiple environments

If you work against more than one InfraAudit instance — for example, a local development server, a staging environment, and production — keep a separate config file per environment and point --config at the correct one:
A lighter-weight alternative is to set INFRAUDIT_SERVER_URL per shell session before running commands.

Security notes

Do not check ~/.infraudit/config.yaml into source control. The auth.token value is a Bearer credential equivalent to a password.
  • The config file is created with 0600 permissions. Do not change this.
  • In CI/CD pipelines, authenticate using infraudit auth login --email "$CI_EMAIL" --password "$CI_PASSWORD" sourced from secrets rather than copying the config file into the build environment. See CI/CD usage for a complete example.
  • Each team member should maintain their own config file with their own credentials.