> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables - Omni CLI

> Environment variables the Omni CLI reads, and how they interact with flags and the config file.

The Omni CLI reads the following environment variables:

| Variable                                       | Description                                                                                                                                                                             |
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `OMNI_API_TOKEN`                               | API token. Overrides the active profile's token; overridden by `--token`.                                                                                                               |
| `OMNI_BASE_URL`                                | API base URL. Overrides the active profile's endpoint; overridden by `--base-url`.                                                                                                      |
| `OMNI_OUTPUT_FORMAT`                           | Default output format (`json`, `human`, or `auto`). Overrides the config file's default; overridden by `--format`/`-o`. See [output formats](/developers/cli/reference/output-formats). |
| `OMNI_CONFIG_PATH`                             | Overrides the full path to the config file. Takes precedence over `OMNI_CONFIG_DIR`.                                                                                                    |
| `OMNI_CONFIG_DIR`                              | Overrides the config directory (the config file lives at `<dir>/config.json`). Takes precedence over `XDG_CONFIG_HOME`.                                                                 |
| `XDG_CONFIG_HOME`                              | Used to locate the config directory (`<XDG_CONFIG_HOME>/omni-cli`) on Unix when `OMNI_CONFIG_DIR` isn't set. Follows the same convention as the GitHub CLI; has no effect on Windows.   |
| `OMNI_CLI_DANGEROUSLY_ALLOW_INSECURE_REQUESTS` | Bypasses the HTTPS and Omni-domain checks the CLI otherwise enforces before sending a token or OAuth credential.                                                                        |

<Warning>
  `OMNI_CLI_DANGEROUSLY_ALLOW_INSECURE_REQUESTS` disables the checks that protect your API token and OAuth credential in transit. Only set it against a trusted local or test endpoint, never in a real profile pointed at your Omni organization.
</Warning>

See [authentication](/developers/cli/authentication) for how `OMNI_API_TOKEN` fits into OAuth vs. API key authentication. See [CLI configuration](/developers/cli/commands/utility) for the config file these variables override.
