diff --git a/gateway/run.py b/gateway/run.py index dfa97c457..9c354ebd4 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -24,6 +24,14 @@ from typing import Dict, Optional, Any, List # Add parent directory to path sys.path.insert(0, str(Path(__file__).parent.parent)) +# Load environment variables from ~/.hermes/.env +from dotenv import load_dotenv +_env_path = Path.home() / '.hermes' / '.env' +if _env_path.exists(): + load_dotenv(_env_path) +# Also try project .env as fallback +load_dotenv() + from gateway.config import ( Platform, GatewayConfig, diff --git a/requirements.txt b/requirements.txt index 68a31e447..98db357c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -35,10 +35,10 @@ croniter # Optional: For messaging platform integrations (gateway) # Telegram: pip install python-telegram-bot -# python-telegram-bot>=20.0 +python-telegram-bot>=20.0 # Discord: pip install discord.py -# discord.py>=2.0 +discord.py>=2.0 # WhatsApp: Requires Node.js bridge (see docs/messaging.md) # aiohttp # For WhatsApp bridge communication \ No newline at end of file