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

96 lines
2.3 KiB
Plaintext
Raw 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 Email Configuration Example
# Copy this file to .env and configure with your actual values
# ===== 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
# ===== 系统配置 =====
# 会话映射文件路径
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