claude-code-remote-remake/.env.example

143 lines
3.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Claude Code Remote Configuration
# Copy this file to .env and configure with your actual values
# ===== 選擇通知方式Email、LINE 或 Telegram =====
# 可以同時啟用多個通知方式
EMAIL_ENABLED=false
LINE_ENABLED=false
TELEGRAM_ENABLED=true
# ===== Email 配置 (如果使用 Email) =====
# SMTP 发送邮件配置
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_SECURE=true
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
# 发件人信息 (可选,默认使用 SMTP_USER)
EMAIL_FROM=your-email@gmail.com
EMAIL_FROM_NAME=Claude Code Remote 通知系统
# IMAP 接收邮件配置
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
IMAP_SECURE=true
IMAP_USER=your-email@gmail.com
IMAP_PASS=your-app-password
# 邮件路由配置
# 接收通知的邮箱地址
EMAIL_TO=your-email@gmail.com
# 允许发送命令的邮箱地址(安全白名单)
ALLOWED_SENDERS=your-email@gmail.com
# ===== LINE 配置 (如果使用 LINE) =====
# 從 LINE Developers Console 獲取: https://developers.line.biz/
LINE_CHANNEL_ACCESS_TOKEN=your-line-channel-access-token
LINE_CHANNEL_SECRET=your-line-channel-secret
# LINE 接收者配置(設定一個或兩個)
# LINE_USER_ID=your-line-user-id
# LINE_GROUP_ID=your-line-group-id
# LINE 白名單(逗號分隔的使用者/群組 ID
# 如果不設定,只有配置的 USER_ID/GROUP_ID 可以使用
# LINE_WHITELIST=U1234567890abcdef,C1234567890abcdef
# LINE webhook 埠號預設3000
# LINE_WEBHOOK_PORT=3000
# ===== Telegram 配置 (如果使用 Telegram) =====
# 從 @BotFather 獲取 Bot Token
TELEGRAM_BOT_TOKEN=your-telegram-bot-token
# Telegram 接收者配置(設定一個或兩個)
# 個人聊天 ID
# TELEGRAM_CHAT_ID=123456789
# 群組 ID通常是負數
# TELEGRAM_GROUP_ID=-1001234567890
# Telegram 白名單(逗號分隔的 Chat ID
# 如果不設定,只有配置的 CHAT_ID/GROUP_ID 可以使用
# TELEGRAM_WHITELIST=123456789,-1001234567890
# Telegram webhook 埠號預設3001
# TELEGRAM_WEBHOOK_PORT=3001
# Telegram webhook URL您的公開 HTTPS URL
# TELEGRAM_WEBHOOK_URL=https://your-domain.com
# 強制使用 IPv4 連接 Telegram API預設false
# 在某些網路環境下IPv6 連接可能不穩定,設置為 true 可強制使用 IPv4
# TELEGRAM_FORCE_IPV4=false
# ===== 系统配置 =====
# 会话映射文件路径
SESSION_MAP_PATH=/path/to/your/project/src/data/session-map.json
# 运行模式pty 或 tmux
INJECTION_MODE=pty
# Claude CLI 路径可选默认使用系统PATH中的claude
CLAUDE_CLI_PATH=claude
# 日志级别debug, info, warn, error
LOG_LEVEL=info
# 是否记录PTY输出调试用
PTY_OUTPUT_LOG=false
# ===== 超时配置 =====
# 命令执行超时时间(毫秒)
COMMAND_TIMEOUT=10000
# SMTP 连接超时时间(毫秒)
SMTP_TIMEOUT=10000
# 通知超时时间(毫秒)
NOTIFICATION_TIMEOUT=3000
# 通知显示时间(毫秒)
NOTIFICATION_DISPLAY_TIME=10000
# ===== 邮件模板配置 =====
# 邮件检查间隔(秒)
CHECK_INTERVAL=20
# 会话超时时间(小时)
SESSION_TIMEOUT=24
# ===== 测试配置(可选)=====
# 测试邮件使用的固定令牌(可选,默认动态生成)
TEST_TOKEN=
# Gmail 应用密码(用于测试脚本,可选)
GMAIL_APP_PASSWORD=
# ===== Gmail 配置说明 =====
# 1. 启用两步验证: https://myaccount.google.com/security
# 2. 生成应用密码: https://myaccount.google.com/apppasswords
# 3. 将生成的16位密码填入 SMTP_PASS 和 IMAP_PASS
# 4. 确保 SMTP_PORT=465 和 SMTP_SECURE=true (推荐SSL连接)
# ===== 其他邮件服务商配置示例 =====
# QQ邮箱:
# SMTP_HOST=smtp.qq.com
# SMTP_PORT=587 或 465
# IMAP_HOST=imap.qq.com
# IMAP_PORT=993
# 163邮箱:
# SMTP_HOST=smtp.163.com
# SMTP_PORT=587 或 465
# IMAP_HOST=imap.163.com
# IMAP_PORT=993
# Outlook:
# SMTP_HOST=smtp.live.com
# SMTP_PORT=587
# IMAP_HOST=imap-mail.outlook.com
# IMAP_PORT=993
EOF < /dev/null