-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
168 lines (137 loc) · 5.9 KB
/
.env.example
File metadata and controls
168 lines (137 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# Discord Bot Configuration
DISCORD_TOKEN=your_discord_bot_token_here
# =============================================================================
# AI Provider Configuration
# =============================================================================
# LLM_ROUTE determines which AI provider to use:
# - 'anthropic' = Use Claude Direct (Development)
# - 'openrouter' = Use OpenRouter (Production/Runtime)
#
# If not set, auto-detects: Development → Claude Direct, Production → OpenRouter
# =============================================================================
# Development Configuration (Use Claude Direct)
LLM_ROUTE=anthropic
CLAUDE_API_KEY=sk-ant-your_claude_api_key_here
# Production Configuration (Use OpenRouter)
# Uncomment these for production/runtime:
# LLM_ROUTE=openrouter
# OPENROUTER_API_KEY=sk-or-v1-your_openrouter_api_key_here
# OPENROUTER_MODEL=anthropic/claude-3-sonnet-20240229
# Database Configuration (optional)
# DATABASE_URL=sqlite:///summarybot.db
# DATABASE_URL=postgresql://user:password@localhost:5432/summarybot
# Cache Configuration
CACHE_BACKEND=memory
CACHE_DEFAULT_TTL=3600
CACHE_MAX_SIZE=1000
# REDIS_URL=redis://localhost:6379/0
# Webhook Configuration
WEBHOOK_ENABLED=true
WEBHOOK_HOST=0.0.0.0
WEBHOOK_PORT=5000
WEBHOOK_CORS_ORIGINS=http://localhost:3000,https://yourdomain.com
# Application Configuration
LOG_LEVEL=INFO
MAX_MESSAGE_BATCH=10000
CACHE_TTL=3600
# Example Guild-specific Configuration
# GUILD_123456789_ENABLED_CHANNELS=channel1,channel2,channel3
# GUILD_123456789_DEFAULT_SUMMARY_LENGTH=detailed
# GUILD_123456789_INCLUDE_BOTS=false
# GUILD_123456789_ALLOWED_ROLES=admin,moderator
# GUILD_123456789_WEBHOOK_ENABLED=true
# =============================================================================
# Command Logging Configuration
# =============================================================================
# Captures all commands from Discord, scheduled tasks, and webhooks
# Automatically sanitizes API keys, tokens, passwords, and IPs
# =============================================================================
# Enable command logging (default: true)
COMMAND_LOG_ENABLED=true
# Log retention in days (default: 90)
COMMAND_LOG_RETENTION_DAYS=90
# Use async batch writes for better performance (default: true)
COMMAND_LOG_ASYNC_WRITES=true
# Batch size for async writes (default: 100)
COMMAND_LOG_BATCH_SIZE=100
# Flush interval in seconds for async writes (default: 5)
COMMAND_LOG_FLUSH_INTERVAL_SECONDS=5
# Enable automatic sensitive data sanitization (default: true)
COMMAND_LOG_SANITIZE_ENABLED=true
# =============================================================================
# WhatsApp Integration (ADR-002)
# =============================================================================
# Enable WhatsApp message ingestion and summarization
# Requires separate WhatsApp Reader Bot (ADR-001) to push messages
# =============================================================================
# API key for POST /api/v1/ingest endpoint (required for WhatsApp)
# Generate a secure random key, e.g.: openssl rand -hex 32
INGEST_API_KEY=
# Auto-summarize WhatsApp messages on ingest (default: false)
WHATSAPP_AUTO_SUMMARIZE=false
# Default summary type for WhatsApp auto-summaries
WHATSAPP_DEFAULT_SUMMARY_TYPE=comprehensive
# Voice note transcription via Whisper API (optional)
# WHISPER_API_URL=https://api.openai.com/v1/audio/transcriptions
# WHISPER_API_KEY=sk-xxxx
# WHISPER_ENABLED=false
# WhatsApp media storage path (optional, for media file storage)
# WHATSAPP_MEDIA_STORAGE_PATH=/data/whatsapp-media
# WHATSAPP_MEDIA_MAX_SIZE_MB=50
# =============================================================================
# Email Delivery Configuration (ADR-030)
# =============================================================================
# Enable email delivery for scheduled summaries
# Summaries can be sent to email addresses as an alternative to Discord
# =============================================================================
# Enable SMTP email delivery (default: false)
SMTP_ENABLED=false
# SMTP server configuration
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USERNAME=your_smtp_username
SMTP_PASSWORD=your_smtp_password
# Use TLS encryption (default: true, recommended)
SMTP_USE_TLS=true
# Sender email address and display name
SMTP_FROM_ADDRESS=summarybot@yourdomain.com
SMTP_FROM_NAME=SummaryBot
# Example configurations for common providers:
#
# SendGrid:
# SMTP_HOST=smtp.sendgrid.net
# SMTP_PORT=587
# SMTP_USERNAME=apikey
# SMTP_PASSWORD=SG.your_sendgrid_api_key
#
# Mailgun:
# SMTP_HOST=smtp.mailgun.org
# SMTP_PORT=587
# SMTP_USERNAME=postmaster@your-domain.mailgun.org
# SMTP_PASSWORD=your_mailgun_password
#
# Gmail (requires App Password):
# SMTP_HOST=smtp.gmail.com
# SMTP_PORT=587
# SMTP_USERNAME=your_email@gmail.com
# SMTP_PASSWORD=your_app_password
#
# Mailtrap (for testing):
# SMTP_HOST=sandbox.smtp.mailtrap.io
# SMTP_PORT=2525
# SMTP_USERNAME=your_mailtrap_username
# SMTP_PASSWORD=your_mailtrap_password
# =============================================================================
# Test Authentication (Development/Testing Only)
# =============================================================================
# Bypass OAuth for API testing with X-Test-Auth-Key header
# Generate secure keys: openssl rand -hex 32
# =============================================================================
# Admin-level test auth (full access including admin-only endpoints like email)
# Usage: curl -H "X-Test-Auth-Key: $TEST_AUTH_ADMIN_SECRET" ...
TEST_AUTH_ADMIN_SECRET=
# User-level test auth (read-only, member permissions)
# Usage: curl -H "X-Test-Auth-Key: $TEST_AUTH_SECRET" ...
TEST_AUTH_SECRET=
# Restrict test auth to specific guilds (comma-separated, or "*" for all)
TEST_GUILD_ID=*