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

# email

> Manage the Gmail channel connection, whitelist, and label filters.

## Setup

Guided setup wizard with three mode options:

1. **Local** — you manage the Google Cloud project, OAuth runs on your machine
2. **Hybrid** — local service with cloud-managed OAuth and Pub/Sub
3. **Remote** — configure entirely through the cloud UI

```bash theme={null}
openbunny email setup
openbunny email login    # Alias for setup
```

## Status

Show the current Gmail connection status, including tokens and Pub/Sub configuration.

```bash theme={null}
openbunny email status
```

## Logout

Disconnect Gmail and revoke OAuth tokens.

```bash theme={null}
openbunny email logout
```

## Whitelist

Control which email senders are processed. Entries can be email addresses or domain wildcards.

```bash theme={null}
openbunny email whitelist                              # Show current policy
openbunny email whitelist add alice@example.com         # Add a sender
openbunny email whitelist add @important-domain.com     # Add a domain
openbunny email whitelist remove alice@example.com      # Remove an entry
openbunny email whitelist clear                         # Clear all entries
openbunny email whitelist allow-all on                  # Listen to all emails
```

## Labels

Control which Gmail labels are monitored for new messages.

```bash theme={null}
openbunny email labels                     # Show current labels
openbunny email labels set INBOX,IMPORTANT # Set labels to monitor
```

## Test

Fetch the latest 5 emails for debugging.

```bash theme={null}
openbunny email test
```
