# Azion CLI global options

Global options are the flags that the [Azion CLI](/en/documentation/devtools/cli/) commands share. They go after the command and its subcommand, as in `azion list application --debug`, and set the configuration folder, the token, the log level, the request timeout, the output format, and the answers to yes/no questions.

---

## Usage

Add one or more global options to any command:

```bash
azion <command> <subcommand> [flags]
```

| Flag          | Short | Type   | Default  | Description                                                                                                                                                                  |
| ------------- | ----- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--config`    | `-c`  | string | —        | Path to a file that ends in `.toml`, not a folder. The folder that holds the path becomes the configuration folder for this command only, and no persistent setting changes. |
| `--debug`     | `-d`  | —      | —        | Prints debug log lines, each with a timestamp, before the output of the command.                                                                                             |
| `--format`    | —     | string | —        | Prints the output as JSON when the value is `json`.                                                                                                                          |
| `--help`      | `-h`  | —      | —        | Prints the description, synopsis, examples, and flags of the command.                                                                                                        |
| `--log-level` | `-l`  | string | `"info"` | Log level: `debug`, `info`, or `error`. `debug` prints the same lines as `--debug`.                                                                                          |
| `--no-color`  | —     | —      | —        | Prints the output with no color formatting. It is a CLI convention that keeps the output readable for automation that does not interpret color codes.                        |
| `--out`       | —     | string | —        | Path of a file to write the output to. The file always holds JSON, with or without `--format json`.                                                                          |
| `--silent`    | `-s`  | —      | —        | Prints nothing, not even the result of the command. Use it in automation.                                                                                                    |
| `--timeout`   | —     | int    | `50`     | Seconds the CLI waits for Azion to answer an HTTP request before the command fails.                                                                                          |
| `--token`     | `-t`  | string | —        | Personal token to save in the `settings.toml` of the profile. The command runs with it, and every later command uses it too.                                                 |
| `--version`   | `-v`  | —      | —        | Prints the version of the CLI. `azion -v` prints the same line as `azion version`.                                                                                           |
| `--yes`       | `-y`  | —      | —        | Answers yes to every yes/no question the command asks.                                                                                                                       |

---

## Config

The Azion CLI keeps its settings in a configuration folder, `~/.azion` by default. The folder holds `profiles.json`, which names the active profile, and one folder per profile with its own `settings.toml`. `--token` saves the personal token in that `settings.toml`.

`--config` points one command at another configuration folder. Pass a path inside that folder that ends in `.toml`, such as `<config-folder>/settings.toml`. The file does not need to exist, because the CLI uses only the folder that holds it.

Pass a path at the top of the configuration folder, not the `settings.toml` of a profile. With `<config-folder>/default/settings.toml`, the CLI takes `default` as the configuration folder, creates an empty profile inside it, and reports that you are not logged in.

---

## Boolean flags

A flag that `--help` prints without a type is a boolean, such as `--active` on `azion update dns-zone` or `--enabled` on `azion update dnssec`. Write its value after an equals sign, as in `--active=false`. With a space, as in `--active false`, the command prints its success line and leaves the value unchanged.

Flags that `--help` types `string` and that take `true` or `false`, such as `--active` on `azion update application`, take the value after a space: `--active false`.

---

## Questions and confirmations

Some commands ask a yes/no question before they continue. For example, `azion create profile` asks whether the new profile becomes your default profile. `--yes` answers yes to every question the command asks.

Without a terminal, as in a script with standard input closed, a question that ends in `(Y/n)` also takes yes. A profile that `azion create profile` creates there becomes the default profile, and `azion delete profile` deletes the profile.

> **Caution**
>
> Resource deletes ask no question, with or without `--yes`. A command such as `azion delete application` or `azion delete dns-zone` deletes the resource as soon as it runs. `azion delete profile` is the one delete that asks `Are you sure you want to delete profile '<name>'? This action cannot be undone (Y/n)`.

`azion unlink -y` also answers yes to deleting the remote resources of the project. For more information, refer to [Azion CLI unlink](/en/documentation/devtools/cli/unlink-command/).

---

## Updates from a JSON file

`azion update` reads the fields to change from a JSON file with `--file`. For most resources, the update is partial: fields that the file leaves out keep their values. For example, a [rules-engine](/en/documentation/devtools/cli/resources/rules-engine/) file without `criteria` keeps the criteria the rule already has.

Connector is the exception. `azion update connector` needs the whole connector in the file, as on create. For the file shape, refer to [Azion CLI connector](/en/documentation/devtools/cli/resources/connector/#update).

---

## Examples

Each example shows the command and the output it prints.

### Print the CLI version

This command prints the version of the Azion CLI:

```bash
azion -v
```

The command prints one line:

```text
Azion CLI 4.23.0
```

### Print debug logs

This command prints the account you are logged in with, and the debug log lines that come before it:

```bash
azion whoami --debug
```

The debug lines show the HTTP timeout that applies, `50s` by default:

```text
2026-01-01T12:00:00.445-0300	DEBUG	HTTP client timeout applied	{"timeout": "50s"}
2026-01-01T12:00:00.449-0300	DEBUG	Verifying if an update is required
2026-01-01T12:00:00.449-0300	DEBUG	Exec Schedules
 Client ID: 1234u
 Email: you@example.com
 Active Profile: default
```

### Print the output as JSON

This command describes the application with ID `1234567890` as JSON:

```bash
azion describe application --application-id 1234567890 --format json
```

The command prints the full object of the application:

```text
{
 "active": true,
 "debug": false,
 "id": 1234567890,
 "is_versioned": false,
 "last_editor": "you@example.com",
 "last_modified": "2026-01-01T12:00:00.423706Z",
 "modules": {
  "application_accelerator": {
   "enabled": false
  },
  "cache": {
   "enabled": true
  },
  "functions": {
   "enabled": true
  },
  "image_processor": {
   "enabled": false
  }
 },
 "name": "my-app",
 "product_version": "3.0",
 "version": 0,
 "version_id": null,
 "version_state": null
}
```

### Write the output to a file

This command writes the description of the same application to `app-describe.txt`, without `--format json`:

```bash
azion describe application --application-id 1234567890 --out app-describe.txt
```

The command prints the path of the file:

```text
File successfully written to: app-describe.txt
```

The file holds the same JSON object that `--format json` prints, whatever its extension. A list command such as `azion list workload --out workloads.txt` also writes JSON, with the column names in `columns` and one array per row in `lines`.

### Set a boolean flag

This command turns off the DNS zone with ID `1234`, with the value after an equals sign:

```bash
azion update dns-zone --zone-id 1234 --active=false
```

The command confirms the update:

```text
DNS zone 1234 was updated
```

`azion describe dns-zone --zone-id 1234 --format json` then reports `"active": false`.

### Save a token for another configuration folder

This command saves a personal token in another configuration folder and runs `azion whoami` with it:

```bash
azion whoami -c <config-folder>/settings.toml -t "[TOKEN VALUE]"
```

The command saves the token in the `default` profile of that folder, then prints the account:

```text
Token saved in <config-folder>/default/settings.toml
This token will be used by default with all commands
 Client ID: 1234u
 Email: you@example.com
 Active Profile: default
```

### Set the request timeout

This command lists the applications of your account and waits 1 second for Azion to answer:

```bash
azion list application --timeout 1
```

When the answer takes longer than the timeout, the command fails with exit code `1`:

```text
Error: Failed to list your Applications: CLI's request has timed out during communication with Azion. Verify if it has completed successfully or wait some time and try the command again. Check your settings and try again. If the error persists, contact Azion support.
```

### Run a command without output

This command lists the applications of your account and prints nothing:

```bash
azion list application --silent
```

The command prints no line and exits with code `0`.

---

## Related resources

- [Resource commands](/en/documentation/devtools/cli/resources.md): The create, list, describe, update, and delete commands that these options apply to.
- [Azion CLI profiles](/en/documentation/devtools/cli/profiles.md): How to switch between the profiles of the configuration folder.
- [Azion CLI login](/en/documentation/devtools/cli/login.md): How to log in and save a token without the `--token` option.
- [Azion CLI dns-zone](/en/documentation/devtools/cli/resources/dns-zone.md): A noun page with boolean flags that take their value after an equals sign.
