diff --git a/.env.example b/.env.example index 7270b81..e4562c5 100644 --- a/.env.example +++ b/.env.example @@ -4,5 +4,14 @@ FLYNN_TELEGRAM_TOKEN=your-bot-token-here # Anthropic API Key ANTHROPIC_API_KEY=your-anthropic-api-key-here +# Optional: ZhipuAI API Key (for GLM models via /model command) +# ZHIPUAI_API_KEY=your-zhipuai-api-key-here + +# Optional: OpenRouter API Key +# OPENROUTER_API_KEY=your-openrouter-api-key-here + +# Optional: xAI API Key (for Grok models) +# XAI_API_KEY=your-xai-api-key-here + # Optional: Custom config path # FLYNN_CONFIG=/path/to/config.yaml diff --git a/src/cli/index.ts b/src/cli/index.ts index 1d2c3ec..0d2897f 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -1,4 +1,9 @@ #!/usr/bin/env node + +// Load .env file from project root (Node >= 20.12 built-in, no dotenv needed). +// Silent no-op if the file doesn't exist. +try { process.loadEnvFile(); } catch { /* .env not found — that's fine */ } + import { Command } from 'commander'; import { registerStartCommand } from './start.js'; import { registerSendCommand } from './send.js';