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

# Authentication

> How to authenticate with Basecut services

Basecut supports multiple authentication methods for local development and CI/CD environments.

## Interactive Login

The easiest way to authenticate locally is using the `login` command:

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

This will:

1. Generate a device code
2. Open your browser for authorization
3. Save an API key locally to `~/.basecut/credentials`

## API Keys

For CI/CD or non-interactive environments, use an API key via environment variables:

```bash theme={null}
export BASECUT_API_KEY=bc_live_xxx
```

## Profiles

Manage multiple environments using profiles:

```bash theme={null}
# Login to a specific profile
basecut login --profile production

# Use a specific profile
basecut snapshot create --config basecut.yml --name prod-seed --source "$BASECUT_DATABASE_URL" --profile production
```

## Credentials Location

Credentials are stored in `~/.basecut/credentials`.
