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

# Installation & Auth

> Install the Latitude CLI and authenticate with your API key.

## Install

```bash theme={null}
npm i -g @latitude-data/cli
# or
pnpm add -g @latitude-data/cli
# or
yarn global add @latitude-data/cli
```

Verify installation:

```bash theme={null}
latitude --version
```

## Authenticate

Set your API key once using the system keychain:

```bash theme={null}
latitude login
```

* Provide `--api-key <key>` to skip the prompt
* Use `-f/--force` to override without confirmation

### Environment variable (CI/containers)

You can also provide `LATITUDE_API_KEY` as an environment variable. If set, it takes precedence over the stored key.

```bash theme={null}
export LATITUDE_API_KEY=your_api_key
```

Unset the variable to use the stored key again.

## Development mode

Add `--dev` to any command to target a local Gateway at `localhost:8787`:

```bash theme={null}
latitude status --dev
```

This is handy when running Latitude in development on your machine.
