# =========================================== # .env.example — Multi-LLM-API-Gateway # Copy this file to .env and fill in the values. # IMPORTANT: Never commit the .env file to version control. # =========================================== # ARCHITECTURE NOTE: # The Guardian (main.py) is the ONLY process that reads this file. # app/* modules NEVER touch .env — they get ENV-VAR NAMES via app/.pyfun # and the values are read with os.getenv() inside the sandbox boundary. # # No key set = provider skipped = tool not registered = NO CRASH. # =========================================== # --- LLM Provider Keys --- # Which providers activate is defined in app/.pyfun [LLM_PROVIDERS]. # A provider only registers when its ENV key here is set. # Anthropic (api.anthropic.com) ANTHROPIC_API_KEY="" # Google Gemini (generativelanguage.googleapis.com) GEMINI_API_KEY="" # OpenRouter (openrouter.ai) — free models available OPENROUTER_API_KEY="" # HuggingFace Inference API (api-inference.huggingface.co) HF_TOKEN="" # SmolLM2 custom Space (your own deployment) SMOLLM_API_KEY="" # --- Search Provider Keys --- # Activate search by setting at least one of these. # Brave Search (api.search.brave.com) BRAVE_API_KEY="" # Tavily (api.tavily.com) — AI-optimized search TAVILY_API_KEY="" # --- App Identity (optional) --- # Used by OpenRouter HTTP-Referer header (rate limit attribution) APP_URL="https://huggingface.co/spaces/codey-lab/Universal-MCP-Hub" # --- Optional hub gate for /api, /crypto and /mcp (see app/auth.py) --- # Leave empty = hub is open (as before). Set a long random string to require it. # Clients send: X-Hub-Token: or Authorization: Bearer # (the ENV var NAME is configured in app/.pyfun [HUB] HUB_AUTH_ENV) HUB_API_TOKEN="" # =========================================== # PyFundaments CORE CONFIGURATION # =========================================== # --- Database Connection (PostgreSQL) --- # The complete Data Source Name (DSN) for your PostgreSQL database. # This works for both local instances and cloud providers like Neon.tech. # Example for Neon: postgresql://user:password@host.eu-central-1.aws.neon.tech/neondb?sslmode=require # Example for local: postgresql://user:password@localhost:5432/mydb # Leave empty or comment out if your app doesn't need database DATABASE_URL="your_database_dsn_here" # --- Application-Level Encryption Keys --- # These keys are used by the application itself to encrypt sensitive data # before it is written to the database. # The master key must be a 256-bit key (32 bytes). MASTER_ENCRYPTION_KEY="your_256_bit_key_here" # The salt is a unique, persistent value used with the master key. # It should also be a secure, random string. PERSISTENT_ENCRYPTION_SALT="your_unique_salt_here" # =========================================== # LOGGING CONFIGURATION (Optional) # =========================================== # PyFundaments Debug Mode (true = startup diagnostics: Python version, # sys.path, file checks). Only needed while developing — false for normal use. PYFUNDAMENTS_DEBUG="false" # Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL # INFO is enough for daily operation; DEBUG only while hunting a bug. LOG_LEVEL="INFO" # Store logs in /tmp directory (cleared on restart, host-local only) LOG_TO_TMP="false" # Public logging — CAREFUL: stdout logs are PUBLICLY VISIBLE on HF Spaces # (Space -> Logs tab). Set to "false" for production. Only keep "true" # while actively debugging a deployment. ENABLE_PUBLIC_LOGS="false"