-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
88 lines (71 loc) · 4.21 KB
/
Copy path.env.example
File metadata and controls
88 lines (71 loc) · 4.21 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
# TelegramCode 2.0 — forum-supergroup mode.
#
# Copy this file to `~/.config/telegramcode/.env`, fill TELEGRAM_BOT_TOKEN,
# then launch from the parent folder containing your projects:
# cd ~/projects && telegramcode
# For docker compose use `examples/docker-compose.yml` and the per-instance
# prefix scheme (`PET_*` / `WORK_*`).
#
# The `telegramcode` wrapper loads env from two locations:
# 1. ~/.config/telegramcode/.env (base — fill in once, used everywhere)
# 2. $PWD/.env (override — per-project tweaks)
# Start the bot from the parent folder containing your projects:
# cd ~/projects && telegramcode
# That $PWD becomes the work root. Do not set WORK_ROOT for normal use.
# ── Required before launch ──────────────────────────────────────────────────
# Telegram bot token from @BotFather → /newbot → ...
TELEGRAM_BOT_TOKEN=
# ── Optional external configuration ─────────────────────────────────────────
# Access control: there is NO user allow-list. Whoever is a creator or
# administrator of the served forum group may drive the bot (read live from
# Telegram, cached 1h). Promote someone in the group to grant access; demote to
# revoke. The bot must be a group admin itself (it already needs that to create
# topics and pin messages).
# Chat id of the forum-supergroup the bot listens to (negative number, usually
# starts with -100...). Two ways to obtain:
# a) After the bot is added to the group, `/whoami` in any topic prints it.
# b) Forward any message from the group to @JsonDumpBot — `chat.id`.
# Leave empty to auto-pair with the first forum supergroup an admin contacts
# the bot from. Set it only when you want to pin a specific group before launch.
ALLOWED_GROUP_ID=
# Which Telegram surface(s) one instance serves: group | dm | both.
# Default when unset: both — serves the owner DM AND the group at once, decided
# per chat. `group` = forum supergroup only; `dm` = owner private chat only.
# Leave unset for the normal both-surface deploy.
# CHAT_MODE=both
# Numeric Telegram user id of the owner (a private chat's id equals the user id).
# In `both` it is OPTIONAL: set → the DM surface is active; unset → group-only.
# REQUIRED for `dm`. Get it via `/whoami` in the bot DM, or @JsonDumpBot.
# OWNER_USER_ID=
# Where the bot keeps state.json, mcp.json, tmp/ and logs. Default:
# ~/.telegramCode. **Required to be distinct** when running two bots on the
# same host under the same linux user (otherwise they corrupt each other's
# state.json). See plan §10.7.
# DATA_DIR=/home/user/.telegramCode/mybot
# Voice transcription. Recommended: without GROQ_API_KEY, voice messages are
# not transcribed unless you intentionally configure the OpenAI fallback below.
# GROQ_API_KEY=
# ── Advanced / only when your setup needs it ────────────────────────────────
# Override the project-parent directory only when you cannot control the process
# cwd (for example, a custom systemd service). Normal launch uses $PWD instead.
# WORK_ROOT=/home/user/src
# OpenAI Whisper fallback for voice. Usually unnecessary when GROQ_API_KEY is set.
# OPENAI_API_KEY=
# Not needed for normal agent auth. Claude/OpenCode credentials are configured
# through those CLIs themselves; set provider env vars only if a custom MCP,
# OpenCode plugin, or auth resolver explicitly requires them.
# ANTHROPIC_API_KEY=
# OpenCode HTTP server URL. Leave unset for the built-in loopback server on
# http://localhost:4096. Set it for a custom port or an external server.
# OPENCODE_URL=http://localhost:4096
# OPENCODE_PASSWORD=
# OPENCODE_USERNAME=opencode
# OPENCODE_ALLOW_REMOTE=1
# Custom opencode binary path (only if you've built a fork locally).
# OPENCODE_BIN=/path/to/opencode
# Custom Claude binary path (useful with nvm/asdf/systemd PATH differences).
# CLAUDE_BIN=/path/to/claude
# Debug / bot-owned MCP plumbing. By default the OS chooses a free loopback
# port. Set SCHEDULER_MCP_PORT only when you need a stable, explicitly chosen port.
# CLAUDE_SCRAPE_DEBUG=1
# SCHEDULER_MCP_PORT=4107