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

# astro env airflow-variable get

<Info>
  This command is only available on Astro.
</Info>

Get a single Airflow variable by its ID or key.

## Usage

```bash wrap theme={null}
astro env airflow-variable get <id-or-key>
```

## Options

| Option              | Description                                                                                                              | Possible Values              |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
| `<id-or-key>`       | The ID or key of the Airflow variable to get.                                                                            | Any valid variable ID or key |
| `--format`          | The output format. Defaults to `table`.                                                                                  | `table`, `json`, or `yaml`   |
| `--include-secrets` | Surface the secret value in the output. Requires an Organization policy that allows it.                                  | None                         |
| `--workspace-id`    | Set the Workspace scope. Mutually exclusive with `--deployment-id`. Defaults to your current Workspace from CLI context. | Any valid Workspace ID       |
| `--deployment-id`   | Set the Deployment scope. Mutually exclusive with `--workspace-id`.                                                      | Any valid Deployment ID      |

## Examples

```bash wrap theme={null}
# Get a Workspace Airflow variable by key
astro env airflow-variable get MY_VAR --workspace-id <workspace-id>
```

## Related commands

* [`astro env airflow-variable list`](/docs/cli/v1.43/astro-env-airflow-variable-list)
* [`astro env airflow-variable update`](/docs/cli/v1.43/astro-env-airflow-variable-update)
