# Configuration

Coderrr stores your provider configuration locally in `~/.coderrr/config.json`.

## Configure Provider

```
coderrr config
```

Interactive flow:

1. **Select Provider** \- Choose from 5 supported providers
2. **Enter API Key** \- Securely input your key (masked)
3. **Select Model** \- Choose from available models

## View Current Config

```
coderrr config --show
```

Output:

```
🔧 Current Configuration
  Provider: openrouter
  Model:    meta-llama/llama-3.3-70b-instruct:free
  API Key:  sk-or-v...k4Jx
  Config file: ~/.coderrr/config.json
```

## Clear Configuration

```
coderrr config --clear
```

## Config File Format

```
{
  "provider": "openrouter",
  "apiKey": "sk-or-...",
  "model": "meta-llama/llama-3.3-70b-instruct:free",
  "endpoint": null,
  "updatedAt": "2026-01-12T12:00:00.000Z"
}
```

## Environment Variables

You can also configure via environment variables:

| Variable | Description |
| --- | --- |
| CODERRR\_BACKEND | Custom backend URL |
| OPENAI\_API\_KEY | OpenAI API key |
| ANTHROPIC\_API\_KEY | Anthropic API key |
| OPENROUTER\_API\_KEY | OpenRouter API key |
| GITHUB\_TOKEN | GitHub token for Azure AI |
