# get-environment

> Get environment with the Unkey API CLI

Retrieve an environment and its settings by project, app, and environment selector.

## Usage

```bash
unkey api environments get-environment [flags]
```

## Flags

<ParamField body="--project" type="string" required>
Project identifier or slug.
</ParamField>
<ParamField body="--app" type="string" required>
Application identifier or slug.
</ParamField>
<ParamField body="--environment" type="string" required>
Environment identifier or slug.
</ParamField>

## Global Flags

| Flag | Type | Description |
|------|------|-------------|
| `--root-key` | string | Override root key (`$UNKEY_ROOT_KEY`) |
| `--api-url` | string | Override API base URL (default: `https://api.unkey.com`) |
| `--config` | string | Path to config file (default: `~/.unkey/config.toml`) |
| `--output` | string | Output format - use `json` for raw JSON |
| `--body` | string | Send this JSON string as the request body. You cannot combine it with request-building flags. |

## Examples

<CodeGroup>
```bash Basic
unkey api environments get-environment --project=payments --app=payments-api --environment=production
```
</CodeGroup>

See the [Get environment API reference](https://www.unkey.com/docs/api-reference/v2/environments/get-environment).
