-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
216 lines (187 loc) · 8.38 KB
/
.env.example
File metadata and controls
216 lines (187 loc) · 8.38 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# =============================================================
# Opencode Personal Assistant — Environment Configuration
# =============================================================
# Copy this file to .env and fill in the values.
# Run ./setup.sh for a guided interactive setup.
# -------------------------------------------------------------
# REQUIRED — Telegram
# -------------------------------------------------------------
# Get your bot token from @BotFather on Telegram
TELEGRAM_BOT_TOKEN=
# Get your user ID from @userinfobot on Telegram
TELEGRAM_ALLOWED_USER_ID=
# Optional: SOCKS5 or HTTP proxy for Telegram API
# TELEGRAM_PROXY_URL=socks5://user:pass@host:port
# -------------------------------------------------------------
# OPTIONAL — WhatsApp (second channel, separate dedicated number)
# -------------------------------------------------------------
# When enabled, the bot also connects to WhatsApp via Baileys
# (unofficial WhatsApp Web client). Use a SEPARATE WhatsApp account
# (different phone number) just for the bot — don't link your main
# personal account. Meta may ban numbers used with unofficial clients.
#
# First start: scan the QR code printed in the bot logs with
# WhatsApp -> Settings -> Linked Devices -> Link a device.
# The session is persisted under WHATSAPP_AUTH_DIR so subsequent
# restarts don't require a new scan.
#
# WHATSAPP_ENABLED=false
#
# Phone number(s) that are allowed to talk to the bot, with country code.
# Accepts a comma-separated list. Each entry can be:
# - bare digits "34666999999"
# - full phone JID "34666999999@s.whatsapp.net"
# - LID JID "92767216754914@lid"
#
# WhatsApp now uses LID (Linked Identity) for many accounts: messages may
# arrive from "<random>@lid" instead of "<phone>@s.whatsapp.net". If the
# bot logs "Ignoring message from non-whitelisted LID: <lid>@lid" and you
# confirm that's your account, add the LID to this list:
# WHATSAPP_ALLOWED_NUMBER=34666999999,92767216754914@lid
#
# WHATSAPP_ALLOWED_NUMBER=
#
# Where Baileys stores the session credentials (must persist across
# container restarts; docker-compose mounts a named volume there).
# WHATSAPP_AUTH_DIR=./data/whatsapp-auth
# -------------------------------------------------------------
# OPENCODE SERVER
# Internal compose-network address of the OpenCode container.
# Should normally not be changed.
# -------------------------------------------------------------
OPENCODE_API_URL=http://opencode:4096
# Optional: server auth (if configured in OpenCode)
# OPENCODE_SERVER_USERNAME=opencode
# OPENCODE_SERVER_PASSWORD=
# Auto-restart OpenCode if health checks fail (useful for VPS)
OPENCODE_AUTO_RESTART_ENABLED=false
# -------------------------------------------------------------
# AI MODEL
# big-pickle = Claude Sonnet — completely FREE, no API key needed
# -------------------------------------------------------------
OPENCODE_MODEL_PROVIDER=opencode
OPENCODE_MODEL_ID=big-pickle
# -------------------------------------------------------------
# BOT SETTINGS
# -------------------------------------------------------------
# Language: en, es, de, fr, ru, zh
BOT_LOCALE=en
# Message format: markdown (default) or raw
MESSAGE_FORMAT_MODE=markdown
# Hide intermediate tool messages (💻 bash, 📖 read, etc.)
HIDE_TOOL_CALL_MESSAGES=false
# Thinking message "💭 Thinking..." — default: true (hidden for cleaner UX)
HIDE_THINKING_MESSAGES=true
# Run footer "🛠️ Build · 🤖 model · 🕒 Xs" — default: true (hidden)
HIDE_ASSISTANT_FOOTER=true
# "👤 External user input: <quoted text>" — message that mirrors text typed
# directly in the OpenCode CLI (not via Telegram/WhatsApp) into your chat.
# Default: true (hidden) because CLI inputs are often long and trip the
# Telegram 4096-char limit. Set false if you want the mirror back.
HIDE_EXTERNAL_USER_INPUT=true
# -------------------------------------------------------------
# MEMORY
# -------------------------------------------------------------
# Path to the memory directory (relative to working directory)
MEMORY_DIR=./memory
# Inject soul/memory/context into every prompt
MEMORY_INJECT_ENABLED=true
# -------------------------------------------------------------
# TTS — Text to Speech (optional)
# Choose one provider:
# -------------------------------------------------------------
# Provider options: speechify | openai | google | (empty = disabled)
TTS_PROVIDER=
# --- Speechify (recommended — 50,000 chars/month FREE) ---
# Get your free API key at https://api.speechify.ai
SPEECHIFY_API_KEY=
TTS_VOICE=henry
# Spanish voices: es-ES-elena, es-MX-camila, es-ES-diego
# --- OpenAI-compatible TTS ---
# TTS_API_URL=https://api.openai.com/v1
# TTS_API_KEY=
# TTS_MODEL=tts-1
# TTS_VOICE=alloy
# --- Google Cloud TTS ---
# TTS_PROVIDER=google
# TTS_VOICE=en-US-Studio-O
# GOOGLE_APPLICATION_CREDENTIALS=/app/gcloud-key.json
# Send a single audio at the end of the full response (recommended)
TTS_WAIT_FOR_IDLE=true
# How the audio is delivered to Telegram:
# voice - voice note with circular waveform UI (default). The synthesized
# MP3 is passed directly to Telegram's sendVoice endpoint, which
# transcodes server-side. No ffmpeg or other dependency is needed.
# audio - audio file with music-player UI. Sends the MP3 via sendAudio.
# If voice mode is configured but Telegram rejects the MP3 (rare), the bot
# automatically falls back to sendAudio so you always get audio.
TTS_DELIVERY_MODE=voice
# -------------------------------------------------------------
# STT — Speech to Text / Voice messages (optional)
# Whisper-compatible API required
# -------------------------------------------------------------
# --- Groq Whisper (recommended — generous free tier) ---
# Get your free key at https://console.groq.com
# STT_API_URL=https://api.groq.com/openai/v1
# STT_API_KEY=
# STT_MODEL=whisper-large-v3-turbo
# --- OpenAI Whisper ---
# STT_API_URL=https://api.openai.com/v1
# STT_API_KEY=
# STT_MODEL=whisper-1
# Optional: note prepended to transcribed voice messages
# STT_NOTE_PROMPT=
# Hide the transcribed text from the chat (only sent to assistant)
# default: false (text is shown). Set true for a cleaner experience.
# STT_HIDE_RECOGNIZED_TEXT=false
# -------------------------------------------------------------
# CRON JOBS
# -------------------------------------------------------------
# Sync memory/cron.yml with /task commands bidirectionally
CRON_YML_SYNC=true
# Automatic memory backup via cron
CRON_BACKUP_ENABLED=true
# Cron schedule for backup (default: every Sunday at midnight)
CRON_BACKUP_SCHEDULE=0 0 * * 0
# -------------------------------------------------------------
# VECTOR MEMORY (optional)
# -------------------------------------------------------------
# Leave EMBEDDING_BASE_URL blank to keep the default LIKE-based fact
# search. When set, fact_search ranks by cosine similarity over stored
# vectors. Compatible with any /v1/embeddings provider (OpenAI, Ollama,
# Groq, Together, vLLM, LM Studio, ...).
#
# Recommended local (no API key, fully self-hosted, ~270 MB model):
# 1. Install Ollama on the host: https://ollama.com
# 2. ollama pull nomic-embed-text
# 3. Uncomment these three lines:
# EMBEDDING_BASE_URL=http://host.docker.internal:11434/v1
# EMBEDDING_MODEL=nomic-embed-text
# EMBEDDING_API_KEY=
#
# Recommended cloud (~$0.0001 per fact, requires API key):
# EMBEDDING_BASE_URL=https://api.openai.com/v1
# EMBEDDING_MODEL=text-embedding-3-small
# EMBEDDING_API_KEY=sk-...
EMBEDDING_BASE_URL=
EMBEDDING_MODEL=text-embedding-3-small
EMBEDDING_API_KEY=
# After configuring (or after switching models), run /memory_reembed
# in Telegram to backfill embeddings for facts created before this point.
# Cap how many of the most-recent facts the bot inlines into a fresh
# session's system prompt. Keeping a small recency window in-context
# means the model doesn't need to call fact_search for everyday
# preferences. Set to 0 to disable the inline path entirely (useful for
# testing vector recall — the model is then forced to call fact_search).
# The /inline_facts command in Telegram overrides this at runtime.
# MEMORY_INLINE_RECENT_FACTS=20
# -------------------------------------------------------------
# ADVANCED (optional)
# -------------------------------------------------------------
# LOG_LEVEL=info
# SESSIONS_LIST_LIMIT=10
# PROJECTS_LIST_LIMIT=10
# TASK_LIMIT=10
# SCHEDULED_TASK_EXECUTION_TIMEOUT_MINUTES=120
# CODE_FILE_MAX_SIZE_KB=100
# SERVICE_MESSAGES_INTERVAL_SEC=5