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

# Environment Variables

> Supported environment variables

# Environment Variables

Reference for all environment variables used by Simili Bot.

## Required

At minimum, you need Qdrant credentials and **at least one** AI provider key.

### QDRANT\_URL

Vector database URL.

```bash theme={null}
export QDRANT_URL="https://your-cluster.qdrant.io:6333"
```

### QDRANT\_API\_KEY

Vector database API key.

```bash theme={null}
export QDRANT_API_KEY="your-api-key"
```

### GEMINI\_API\_KEY

Google Gemini API key (for embeddings and/or LLM).

```bash theme={null}
export GEMINI_API_KEY="your-gemini-api-key"
```

### OPENAI\_API\_KEY

OpenAI API key (alternative to Gemini, or used alongside it).

```bash theme={null}
export OPENAI_API_KEY="sk-..."
```

<Note>
  If both `GEMINI_API_KEY` and `OPENAI_API_KEY` are set, **Gemini takes priority**.
</Note>

## Optional

### GITHUB\_TOKEN

GitHub personal access token for API calls. Automatically provided in GitHub Actions.

```bash theme={null}
export GITHUB_TOKEN="ghp_xxxxx"
```

Required scopes: `repo`, `write:checks`

### TRANSFER\_TOKEN

Elevated GitHub token for cross-repository transfers.

```bash theme={null}
export TRANSFER_TOKEN="ghp_xxxxx"
```

### LLM\_MODEL

Override the LLM model at runtime without changing `simili.yaml`.

```bash theme={null}
export LLM_MODEL="gemini-2.5-flash"
```

### GITHUB\_REPOSITORY

Repository in `owner/repo` format. Used by `simili auto-close` when `--repo` is not specified.

```bash theme={null}
export GITHUB_REPOSITORY="my-org/my-repo"
```

This is set automatically in GitHub Actions environments.

## Provider precedence

| Scenario                        | Embedding Provider | LLM Provider  |
| ------------------------------- | ------------------ | ------------- |
| Only `GEMINI_API_KEY` set       | Gemini             | Gemini        |
| Only `OPENAI_API_KEY` set       | OpenAI             | OpenAI        |
| Both keys set                   | Gemini (wins)      | Gemini (wins) |
| Config `embedding.provider` set | As configured      | As configured |

## Configuration variable expansion

Use variables in `simili.yaml` with `${VAR_NAME}` syntax:

```yaml theme={null}
qdrant:
  url: "${QDRANT_URL}"
  api_key: "${QDRANT_API_KEY}"

embedding:
  provider: "gemini"
  api_key: "${GEMINI_API_KEY}"

llm:
  provider: "openai"
  api_key: "${OPENAI_API_KEY}"
```

Simili Bot expands `${VARIABLE_NAME}` from the environment at runtime.

## GitHub Actions

Set secrets in your repository and reference them in workflows:

```yaml theme={null}
env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  QDRANT_URL: ${{ secrets.QDRANT_URL }}
  QDRANT_API_KEY: ${{ secrets.QDRANT_API_KEY }}
  GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
  # Optional:
  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
  TRANSFER_TOKEN: ${{ secrets.TRANSFER_TOKEN }}
```

## Docker

Pass variables with `-e`:

```bash theme={null}
docker run -e QDRANT_URL="..." \
           -e QDRANT_API_KEY="..." \
           -e GEMINI_API_KEY="..." \
           similigh/simili-bot:latest
```
