|
| 1 | +# ============================================================================= |
| 2 | +# Babel Configuration (.env) |
| 3 | +# ============================================================================= |
| 4 | +# |
| 5 | +# Copy this file to .env and customize for your setup: |
| 6 | +# cp .env.example .env |
| 7 | +# |
| 8 | +# Then source it before using Babel: |
| 9 | +# source .env |
| 10 | +# |
| 11 | +# Or place .env in your project root for automatic loading (requires python-dotenv). |
| 12 | +# |
| 13 | +# ============================================================================= |
| 14 | +# |
| 15 | +# ⚠️ SECURITY WARNING - READ BEFORE PROCEEDING |
| 16 | +# ============================================================================= |
| 17 | +# |
| 18 | +# NEVER COMMIT YOUR .env FILE TO VERSION CONTROL! |
| 19 | +# |
| 20 | +# Your .env file contains sensitive API keys and credentials. If committed: |
| 21 | +# - Keys are exposed in git history PERMANENTLY (even after deletion) |
| 22 | +# - Public repos are scanned by bots within minutes for leaked credentials |
| 23 | +# - Leaked keys can lead to unauthorized usage, billing attacks, data breaches |
| 24 | +# - Rotating compromised keys is disruptive and may not undo damage |
| 25 | +# |
| 26 | +# REQUIRED: Ensure .env is in your .gitignore: |
| 27 | +# |
| 28 | +# echo ".env" >> .gitignore |
| 29 | +# |
| 30 | +# VERIFY before committing: |
| 31 | +# |
| 32 | +# git status # .env should NOT appear in untracked/modified files |
| 33 | +# |
| 34 | +# If you accidentally committed .env: |
| 35 | +# 1. Immediately rotate ALL exposed API keys |
| 36 | +# 2. Remove from history: git filter-branch or BFG Repo-Cleaner |
| 37 | +# 3. Force push (coordinate with team if shared repo) |
| 38 | +# |
| 39 | +# ============================================================================= |
| 40 | + |
| 41 | +# ----------------------------------------------------------------------------- |
| 42 | +# LLM Provider Selection |
| 43 | +# ----------------------------------------------------------------------------- |
| 44 | +# |
| 45 | +# Available providers: |
| 46 | +# - claude : Anthropic Claude (requires ANTHROPIC_API_KEY) |
| 47 | +# - openai : OpenAI GPT (requires OPENAI_API_KEY) |
| 48 | +# - gemini : Google Gemini (requires GOOGLE_API_KEY) |
| 49 | +# - ollama : Local LLM via Ollama (no API key needed) |
| 50 | +# |
| 51 | +# PRIORITY LOGIC: |
| 52 | +# If a remote API key is set, the remote provider will be used by default, |
| 53 | +# even if BABEL_LLM_PROVIDER=ollama is configured. This ensures that users |
| 54 | +# with API keys get the expected behavior while allowing local-only setups. |
| 55 | +# |
| 56 | +# Priority order: Remote API key > Local LLM > Mock provider |
| 57 | +# |
| 58 | +# Default: claude (if ANTHROPIC_API_KEY is set) |
| 59 | +# |
| 60 | +# BABEL_LLM_PROVIDER=claude |
| 61 | + |
| 62 | +# ----------------------------------------------------------------------------- |
| 63 | +# Remote LLM API Keys (choose one based on your provider) |
| 64 | +# ----------------------------------------------------------------------------- |
| 65 | +# |
| 66 | +# IMPORTANT: API keys are sensitive. Never commit them to version control. |
| 67 | +# Only ONE provider API key is needed based on your BABEL_LLM_PROVIDER choice. |
| 68 | +# |
| 69 | + |
| 70 | +# Anthropic Claude API Key |
| 71 | +# Get your key at: https://console.anthropic.com/ |
| 72 | +# ANTHROPIC_API_KEY=sk-ant-api03-your-key-here |
| 73 | + |
| 74 | +# OpenAI API Key |
| 75 | +# Get your key at: https://platform.openai.com/api-keys |
| 76 | +# OPENAI_API_KEY=sk-your-key-here |
| 77 | + |
| 78 | +# Google Gemini API Key |
| 79 | +# Get your key at: https://makersuite.google.com/app/apikey |
| 80 | +# GOOGLE_API_KEY=your-key-here |
| 81 | + |
| 82 | +# ----------------------------------------------------------------------------- |
| 83 | +# Model Selection |
| 84 | +# ----------------------------------------------------------------------------- |
| 85 | +# |
| 86 | +# Override the default model for your chosen provider. |
| 87 | +# If not set, uses the provider's default model. |
| 88 | +# |
| 89 | +# Claude models: |
| 90 | +# - claude-opus-4-1-20250414 (Large/Powerful) |
| 91 | +# - claude-opus-4-20250514 (Large/Powerful) |
| 92 | +# - claude-sonnet-4-20250514 (Balanced - default) |
| 93 | +# - claude-3-7-sonnet-20250219 (Lightweight) |
| 94 | +# - claude-3-5-haiku-20241022 (Cost-efficient) |
| 95 | +# |
| 96 | +# OpenAI models: |
| 97 | +# - gpt-5.2, gpt-5.2-pro (Large/Powerful) |
| 98 | +# - gpt-5-mini (Balanced - default) |
| 99 | +# - gpt-5-nano (Cost-efficient) |
| 100 | +# |
| 101 | +# Gemini models: |
| 102 | +# - gemini-2.5-pro (Large/Powerful) |
| 103 | +# - gemini-2.5-flash (Balanced - default) |
| 104 | +# - gemini-2.5-flash-lite (Cost-efficient) |
| 105 | +# |
| 106 | +# Ollama models (any locally installed model): |
| 107 | +# - llama3.2 (default) |
| 108 | +# - mistral |
| 109 | +# - phi3 |
| 110 | +# - codellama |
| 111 | +# - etc. (run 'ollama list' to see installed models) |
| 112 | +# |
| 113 | +# BABEL_LLM_MODEL=claude-sonnet-4-20250514 |
| 114 | + |
| 115 | +# ----------------------------------------------------------------------------- |
| 116 | +# Local LLM Configuration (Ollama) |
| 117 | +# ----------------------------------------------------------------------------- |
| 118 | +# |
| 119 | +# For local LLM usage with Ollama or compatible servers (LM Studio, LocalAI). |
| 120 | +# |
| 121 | +# To use local LLM: |
| 122 | +# 1. Install Ollama: curl -fsSL https://ollama.com/install.sh | sh |
| 123 | +# 2. Pull a model: ollama pull llama3.2 |
| 124 | +# 3. Start Ollama: ollama serve |
| 125 | +# 4. Set provider: BABEL_LLM_PROVIDER=ollama |
| 126 | +# |
| 127 | +# Base URL for Ollama API (default: http://localhost:11434) |
| 128 | +# Change this if using a different port or remote Ollama server. |
| 129 | +# |
| 130 | +# BABEL_LLM_BASE_URL=http://localhost:11434 |
| 131 | +# |
| 132 | +# For LM Studio (OpenAI-compatible): |
| 133 | +# BABEL_LLM_PROVIDER=ollama |
| 134 | +# BABEL_LLM_BASE_URL=http://localhost:1234/v1 |
| 135 | +# |
| 136 | +# For LocalAI: |
| 137 | +# BABEL_LLM_PROVIDER=ollama |
| 138 | +# BABEL_LLM_BASE_URL=http://localhost:8080/v1 |
| 139 | + |
| 140 | +# ----------------------------------------------------------------------------- |
| 141 | +# Example Configurations |
| 142 | +# ----------------------------------------------------------------------------- |
| 143 | +# |
| 144 | +# === Remote LLM (Claude - Recommended) === |
| 145 | +# BABEL_LLM_PROVIDER=claude |
| 146 | +# ANTHROPIC_API_KEY=sk-ant-api03-your-key-here |
| 147 | +# BABEL_LLM_MODEL=claude-sonnet-4-20250514 |
| 148 | +# |
| 149 | +# === Remote LLM (OpenAI) === |
| 150 | +# BABEL_LLM_PROVIDER=openai |
| 151 | +# OPENAI_API_KEY=sk-your-key-here |
| 152 | +# BABEL_LLM_MODEL=gpt-5-mini |
| 153 | +# |
| 154 | +# === Local LLM (Ollama - Privacy-focused) === |
| 155 | +# BABEL_LLM_PROVIDER=ollama |
| 156 | +# BABEL_LLM_MODEL=llama3.2 |
| 157 | +# BABEL_LLM_BASE_URL=http://localhost:11434 |
| 158 | +# |
| 159 | +# === Local LLM (LM Studio) === |
| 160 | +# BABEL_LLM_PROVIDER=ollama |
| 161 | +# BABEL_LLM_MODEL=local-model |
| 162 | +# BABEL_LLM_BASE_URL=http://localhost:1234/v1 |
| 163 | +# |
| 164 | +# === Air-gapped Environment (No network) === |
| 165 | +# BABEL_LLM_PROVIDER=ollama |
| 166 | +# BABEL_LLM_MODEL=mistral |
| 167 | +# # No API keys needed - fully offline operation |
| 168 | + |
| 169 | +# ============================================================================= |
| 170 | +# Your Configuration (uncomment and edit as needed) |
| 171 | +# ============================================================================= |
| 172 | + |
| 173 | +# Provider (claude, openai, gemini, ollama) |
| 174 | +# BABEL_LLM_PROVIDER=claude |
| 175 | + |
| 176 | +# API Key (for remote providers) |
| 177 | +# ANTHROPIC_API_KEY= |
| 178 | + |
| 179 | +# Model override (optional) |
| 180 | +# BABEL_LLM_MODEL= |
| 181 | + |
| 182 | +# Base URL (for local LLM) |
| 183 | +# BABEL_LLM_BASE_URL= |
0 commit comments