# ============================================================================= # Code Context Engine - Environment Variables Example # ============================================================================= # Copy this file to .env and fill in your values. # # IMPORTANT: Environment variables are ONLY for sensitive information (API keys) # and runtime overrides. All model parameters, provider settings, and other # configurations should be set in config.toml files. # # All environment variables use the CCE_ prefix for consistency. # # Configuration Priority (highest to lowest): # 1. Direct environment variables # 2. .env file variables # 3. Project local config (.cce/config.local.toml) # 4. Project config (.cce/config.toml) # 5. Global config (config.toml) # 6. Default values # ============================================================================= # ----------------------------------------------------------------------------- # API Keys (Sensitive Information - DO NOT commit to version control) # ----------------------------------------------------------------------------- # Embedder API Keys (Multi-Provider Support) # Format: CCE_EMB_API_KEY_{PROVIDER_ID} # Use these with placeholder syntax in config.toml: # [llm.providers.siliconflow] # api_keys = ["${CCE_EMB_API_KEY_SILICONFLOW}"] # # SiliconFlow (Chinese LLM provider) CCE_EMB_API_KEY_SILICONFLOW= # OpenAI CCE_EMB_API_KEY_OPENAI= # Azure OpenAI CCE_EMB_API_KEY_AZURE= # Google Gemini CCE_EMB_API_KEY_GEMINI= # Local services can use dummy keys CCE_EMB_API_KEY_OLLAMA=ollama # LLM API Keys (Multi-Provider Support) # Format: CCE_LLM_API_KEY_{PROVIDER_ID} # Use these with placeholder syntax in config.toml: # [llm.providers.siliconflow] # api_keys = ["${CCE_LLM_API_KEY_SILICONFLOW}"] # # SiliconFlow (Chinese LLM provider) CCE_LLM_API_KEY_SILICONFLOW= # OpenAI CCE_LLM_API_KEY_OPENAI= # Anthropic Claude CCE_LLM_API_KEY_ANTHROPIC= # Azure OpenAI CCE_LLM_API_KEY_AZURE= # Google Gemini CCE_LLM_API_KEY_GEMINI= # Local services can use dummy keys CCE_LLM_API_KEY_OLLAMA=ollama # Legacy single-provider API keys (deprecated, use multi-provider format above) # CCE_EMB_API_KEY= # CCE_LLM_API_KEY= # Qdrant API Key (if authentication is required) CCE_DB_QDRANT_API_KEY= # ----------------------------------------------------------------------------- # Infrastructure Configuration (Non-model related) # ----------------------------------------------------------------------------- # IMPORTANT: Infrastructure settings (server host/port) are ONLY configurable # via config.toml, NOT via environment variables. This ensures consistent # deployment topology. See config.toml for server configuration. # # The following environment variables override config.toml settings: # - Database URLs (CCE_DB_*) for environment-specific targets # - API keys (sensitive, never stored in config files) # - Logging (CCE_LOG_*) for runtime debugging # Database Configuration CCE_DB_QDRANT_URL=http://localhost:6333 CCE_DB_SQLITE_PATH=./data/metadata.db CCE_DB_SQLITE_SYNC=NORMAL CCE_DB_SQLITE_CACHE_SIZE=-64000 CCE_DB_SQLITE_BUSY_TIMEOUT=5000 CCE_DB_SQLITE_TEMP_STORE=MEMORY CCE_DB_SQLITE_MMAP_SIZE=268435456 # Logger Configuration CCE_LOG_LEVEL=info CCE_LOG_OUTPUT=stdout CCE_LOG_FORMAT=pretty CCE_LOG_FILE= # ----------------------------------------------------------------------------- # Notes # ----------------------------------------------------------------------------- # 1. Multi-Provider API Key Management: # - Use environment variable placeholders in config.toml: # [embedder.providers.openai] # api_keys = ["${CCE_EMB_API_KEY_OPENAI}"] # # [[llm.providers]] # id = "openai-gpt4" # api_keys = ["${CCE_LLM_API_KEY_OPENAI}"] # - The system will automatically resolve these placeholders at startup. # - Each provider can have its own independent API key. # # 2. For different environments (dev/prod), use different config files: # - Development: config.dev.toml # - Production: config.prod.toml # Set via: CCE_CONFIG=config.prod.toml # # 3. Local services (Ollama, llama.cpp) don't need real API keys. # You can use dummy values like "ollama" or empty arrays. # # 4. API keys can also be loaded from files using api_key_file setting: # api_key_file = "/run/secrets/api_key"