# Installation

> Install the SDK or the CLI, and set the environment variables both expect.

## SDK

```bash
npm install frontal-sdk
```

The package ships types, so no separate types package is needed. It runs on Node, Bun, and any runtime with `fetch`.

## CLI

```bash
npm install -g frontal
```

Confirm the install and the version it resolved:

```bash
frontal --version
```

## Environment

Both read the same two variables:

| Variable | Required | Purpose |
| --- | --- | --- |
| `FRONTAL_API_KEY` | Yes | Authenticates every request. |
| `FRONTAL_WORKSPACE` | No | Defaults the workspace so you can omit it per call. |

Set them in your shell profile for local work and in your platform's secret store everywhere else. A key committed to a repository must be treated as leaked and rotated.

## Verify

```bash
frontal whoami
```

The response names the workspace the key belongs to and the scopes it carries. If those are not what you expected, you are holding a key for another workspace.
