-
Notifications
You must be signed in to change notification settings - Fork 641
Expand file tree
/
Copy path.env.example
More file actions
189 lines (153 loc) · 8.88 KB
/
Copy path.env.example
File metadata and controls
189 lines (153 loc) · 8.88 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
# ============================================================
# Cat Cafe / Clowder AI — Environment Configuration
# 猫猫咖啡环境配置
#
# Copy this file to .env and fill in your values:
# cp .env.example .env
#
# All fields are optional — fill in what you need.
# 所有字段均为可选,按需填写。
# ============================================================
# ── Core Ports 核心端口 ──────────────────────────────────────
# These ports must not conflict with other local services.
# Default: Frontend 3003, API 3004, Redis 6399
# Convention: API port = Frontend port + 1 (same as internal 3001→3002)
FRONTEND_PORT=3003
API_SERVER_PORT=3004
# API bind host (default: localhost only). Set to 0.0.0.0 for LAN / Tailscale / Docker access.
# API 监听地址(默认仅本机访问)。如需局域网 / Tailscale / Docker 访问,改为 0.0.0.0。
API_SERVER_HOST=127.0.0.1
# Allow phones / tablets on RFC 1918 LANs or Tailscale to call the API when API_SERVER_HOST=0.0.0.0.
# Warning: this trusts the entire private network. Restart required after changing.
# 允许 RFC 1918 局域网 / Tailscale 上的手机平板访问;需要同时设置 API_SERVER_HOST=0.0.0.0。
# 注意:会信任整个私网内的所有设备。修改后需重启服务。
# CORS_ALLOW_PRIVATE_NETWORK=true
# ── Owner Identity 所有者身份 ───────────────────────────────
# Owner identity for privileged operations.
# - Default cat selection: works without this (falls back to 'default-user')
# - Sensitive env writes: REQUIRES this to be explicitly set (403 otherwise)
# - Capability install/delete: direct localhost UI only; no owner id is needed for the local app.
# Setting API_SERVER_HOST=0.0.0.0/LAN mode disables capability writes.
# For multi-user deployments, set this to your actual user ID.
# 所有者身份,用于特权操作。
# - 默认猫选择:无需配置(回落到 'default-user',开箱即用)
# - 敏感环境变量写入:必须显式配置(否则 403)
# - capability 安装/删除:只支持 localhost UI 直连;本地应用无需配置 owner id。
# 配置 API_SERVER_HOST=0.0.0.0 / LAN 模式时 capability 写入会被拒绝。
# 多用户部署时,请设置为你的实际用户 ID。
# DEFAULT_OWNER_USER_ID=default-user
MCP_SERVER_PORT=3011
NEXT_PUBLIC_API_URL=http://localhost:3004
NEXT_PUBLIC_BRAND_NAME="Clowder AI"
# CLI inactivity timeout in milliseconds.
# Default is 1800000 = 30 minutes; set to 0 to disable the CLI-layer timeout.
# CLI_TIMEOUT_MS=1800000
# ── Workspace Access 工作目录 ───────────────────────────────
# Comma-separated list of directories the MCP server is allowed to access.
# 逗号分隔的 MCP Server 允许访问的工作目录列表。
# ALLOWED_WORKSPACE_DIRS=/Users/you/projects
# ── Redis 数据存储 ──────────────────────────────────────────
# Use --memory flag with pnpm start to skip Redis entirely.
# 启动时加 --memory 可跳过 Redis(数据仅存内存,重启丢失)。
REDIS_PORT=6399
REDIS_URL=redis://localhost:6399
# ── Redis Data TTL(数据保留期限)──────────────────────────────
# Default 0 = persistent (recommended). Set >0 to auto-delete data after N seconds.
# 默认 0 = 永久保存(推荐)。设为 >0 会在到期后自动删除数据!
# MESSAGE_TTL_SECONDS=0
# THREAD_TTL_SECONDS=0
# TASK_TTL_SECONDS=0
# ── Model API Keys 模型密钥(推荐通过 UI 配置)───────────────
# RECOMMENDED: Add API keys via the web UI after launch:
# Hub → System Settings → Account Configuration
# 推荐方式:启动后在前端 UI 添加 API key:
# Hub → 系统配置 → 账号配置
#
# The env vars below are a legacy fallback. Leave them commented out
# unless you have a specific reason to use them.
# 以下环境变量仅作兼容兜底,通常不需要填写。
# ANTHROPIC_API_KEY= # Claude — https://console.anthropic.com/
# OPENAI_API_KEY= # GPT / Codex — https://platform.openai.com/
# GOOGLE_API_KEY= # Gemini — https://aistudio.google.com/
# ── Optional: API Gateway Proxy 反向代理(可选)──────────────
# Route API calls through a custom gateway (e.g. load balancer).
# 通过自定义网关路由 API 调用(如负载均衡器)。
# Set to 1 and configure .cat-cafe/proxy-upstreams.json to enable.
ANTHROPIC_PROXY_ENABLED=0
# ANTHROPIC_PROXY_PORT=9877
# ── Optional: Voice Input / Output 语音(可选)──────────────
# Requires Python + local model. Run `./scripts/setup.sh` to install.
# 需要 Python + 本地模型。运行 `./scripts/setup.sh` 安装。
ASR_ENABLED=0
TTS_ENABLED=0
LLM_POSTPROCESS_ENABLED=0
# WHISPER_URL=http://localhost:9876
# NEXT_PUBLIC_WHISPER_URL=http://localhost:9876
# TTS_URL=http://localhost:9879
# TTS_CACHE_DIR=./data/tts-cache
# NEXT_PUBLIC_LLM_POSTPROCESS_URL=http://localhost:9878
# ── Optional: Semantic Retrieval 语义检索(可选)──────────────
# Auto-starts the local embedding sidecar when EMBED_MODE=shadow|on.
# Unix uses scripts/embed-server.sh; Windows uses scripts/embed-server.ps1.
# Apple Silicon prefers MLX; other platforms fall back to sentence-transformers.
# 当 EMBED_MODE=shadow|on 时会自动拉起本地 embedding sidecar。
# Unix 使用 scripts/embed-server.sh;Windows 使用 scripts/embed-server.ps1。
# Apple Silicon 优先 MLX,其它平台回落到 sentence-transformers。
EMBED_MODE=off
# EMBED_PORT=9880
# EMBED_URL=http://127.0.0.1:9880
# ── Optional: Feishu 飞书(可选)────────────────────────────
# Chat with cats from Feishu/Lark. Requires a Feishu app.
# 在飞书里和猫猫聊天,需要创建飞书应用。
# FEISHU_APP_ID=cli_xxx
# FEISHU_APP_SECRET=xxx
# FEISHU_VERIFICATION_TOKEN=xxx
# Optional #1035: outbound group-chat @alias → Feishu <at> token map (JSON).
# Maps a bare alias (no leading @) to its target Feishu OpenID so body text like
# `@SomeBot 看看这个` is rendered as a real platform mention the target bot's poller will see.
# Malformed JSON disables the feature (logged warn, no crash).
# FEISHU_GROUP_BOT_MENTIONS_JSON={"SomeBot":{"openId":"ou_xxx","displayName":"SomeBot"}}
# ── Optional: Telegram(可选)───────────────────────────────
# Chat with cats from Telegram. Create a bot via @BotFather.
# 在 Telegram 里和猫猫聊天,通过 @BotFather 创建 bot。
# TELEGRAM_BOT_TOKEN=123456:ABC-DEF...
# ── Optional: GitHub PR Review Notifications(可选)─────────
# Polls IMAP for GitHub review emails and routes to chat.
# 轮询 IMAP 邮箱获取 GitHub review 邮件通知。
# GITHUB_REVIEW_IMAP_USER=xxx@qq.com
# GITHUB_REVIEW_IMAP_PASS=<auth-code>
# GITHUB_REVIEW_IMAP_HOST=imap.qq.com
# GITHUB_REVIEW_IMAP_PORT=993
# GITHUB_MCP_PAT=ghp_...
# ── Optional: GitHub Repo Inbox Webhook(可选)───────────────
# Receive GitHub repo webhook events in a configured inbox thread.
# 接收 GitHub 仓库 webhook 事件并路由到指定 inbox thread。
# GITHUB_WEBHOOK_SECRET=change-me
# GITHUB_REPO_ALLOWLIST=owner/repo
# GITHUB_REPO_INBOX_CAT_ID=opus
# ── Optional: WeCom 企业微信(可选)─────────────────────────
# Chat with cats from WeCom/WeChat Work.
# 在企业微信里和猫猫聊天。
# WECOM_BOT_ID=xxx
# WECOM_BOT_SECRET=xxx
# WECOM_CORP_ID=xxx
# WECOM_AGENT_ID=xxx
# WECOM_AGENT_SECRET=xxx
# WECOM_TOKEN=xxx
# WECOM_ENCODING_AES_KEY=xxx
# ── Telemetry 遥测(可选)───────────────────────────────────
# HMAC salt for pseudonymizing IDs in external telemetry (Sentry, etc.).
# Auto-generated by install script. Non-dev environments require this.
# 遥测 ID 伪名化用 HMAC 盐。安装脚本自动生成。非开发环境必须配置。
# TELEMETRY_HMAC_SALT=
# ── Logging 日志(可选)─────────────────────────────────────
# Log level: debug, info, warn, error
LOG_LEVEL=info
LOG_DIR=./data/logs/api
# ── Optional: Web Push Notifications(可选)─────────────────
# Browser push notifications when cats need your attention.
# 浏览器推送通知,猫猫需要你关注时提醒。
# Generate keys: npx web-push generate-vapid-keys
# VAPID_PUBLIC_KEY=...
# VAPID_PRIVATE_KEY=...
# VAPID_SUBJECT=mailto:you@example.com