# Environment and global options

> The environment variables and options every openwaf-cloud ctl command understands, and the options of reads and changes.

## Environment

| Variable | Meaning |
|---|---|
| `OPENWAF_API_URL` | API address: `https://dash.openwaf.dev`. Also `--api`. Must be `http` or `https`, without credentials or a query. Always set it: the built-in default is a local address. |
| `OPENWAF_TOKEN` | The API token (`owf_…`). |
| `OPENWAF_TOKEN_FILE` | Path of a file with the token instead. The file must be a regular file owned by you with no permissions for group or others (`chmod 600`). It holds the bare token or one line `NAME_TOKEN=value` (an `export ` prefix and quotes are accepted); blank lines and `#` comments are ignored; it must contain exactly one token. |
| `OPENWAF_ORG` | Organisation by name or id. Also `--org`. Default: the token's organisation. |

Set only one of `OPENWAF_TOKEN` and `OPENWAF_TOKEN_FILE`. The token is never accepted as an argument, and it is redacted from error messages. Commands that do not call the API with a token, such as `origin-tls ca`, do not read it.

## Options of every command

| Option | Meaning |
|---|---|
| `--api <url>` | API address; overrides `OPENWAF_API_URL`. |
| `--org <name\|id>` | Organisation; overrides `OPENWAF_ORG`. |
| `-h`, `--help` | Print the command's usage and options. |

## Options of reads

| Option | Meaning |
|---|---|
| `--json` | Print the API's answer as is. |
| `--limit N`, `--before X` | Paging, on the commands that list history (`zones history`, `audit`). `--before` takes a version or an entry id. |

## Options of changes

| Option | Meaning |
|---|---|
| `--reason "…"` | Required. 1–500 characters, no line breaks. |
| `--dry-run` | Only simulate. |
| `--yes` | Do not ask for confirmation (required without a terminal). |
| `--wait[=120s]` | Wait until every edge node applies the new version (zone changes). |

See [Changes: simulation and confirmation](https://developers.openwaf.dev/cli/changes/) for how they work together, and [Arguments, output and exit codes](https://developers.openwaf.dev/cli/output-and-exit-codes/) for the argument syntax.
