mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
- Add CLI i18n module (astrbot/cli/i18n.py) with zh/en translations - Add TUI i18n module (astrbot/tui/i18n.py) with zh/en translations - Update CLI commands to use translated strings - Update TUI app and screen to use translated strings - Add ASTRBOT_CLI_LANG and ASTRBOT_TUI_LANG to .env.example - Update cmd_run.py env var documentation - Add backward compatibility for moved modules with DeprecationWarning
185 lines
5.6 KiB
Plaintext
185 lines
5.6 KiB
Plaintext
# ==========================================
|
||
# AstrBot Instance Configuration: ${INSTANCE_NAME}
|
||
# AstrBot 实例配置文件:${INSTANCE_NAME}
|
||
# ==========================================
|
||
# 将此文件复制为 .env 并根据需要修改。
|
||
# Copy this file to .env and modify as needed.
|
||
# 注意:在此处设置的变量将覆盖默认配置。
|
||
# Note: Variables set here override application defaults.
|
||
|
||
# ------------------------------------------
|
||
# 实例标识 / Instance Identity
|
||
# ------------------------------------------
|
||
|
||
# 实例名称(用于日志和服务名)
|
||
# Instance name (used in logs/service names)
|
||
INSTANCE_NAME="${INSTANCE_NAME}"
|
||
|
||
# ------------------------------------------
|
||
# 核心配置 / Core Configuration
|
||
# ------------------------------------------
|
||
|
||
# AstrBot 根目录路径
|
||
# AstrBot root directory path
|
||
# 默认 Default: 当前工作目录,桌面客户端为 ~/.astrbot,服务器为 /var/lib/astrbot/<instance>/
|
||
# 示例 Example: /var/lib/astrbot/mybot
|
||
ASTRBOT_ROOT="${ASTRBOT_ROOT}"
|
||
|
||
# 日志等级
|
||
# Log level
|
||
# 可选值 Values: DEBUG, INFO, WARNING, ERROR, CRITICAL
|
||
# 默认 Default: INFO
|
||
# ASTRBOT_LOG_LEVEL=INFO
|
||
|
||
# 启用插件热重载(开发时有用)
|
||
# Enable plugin hot reload (useful for development)
|
||
# 可选值 Values: 0 (禁用 disabled), 1 (启用 enabled)
|
||
# 默认 Default: 0
|
||
# ASTRBOT_RELOAD=0
|
||
|
||
# 禁用匿名使用统计
|
||
# Disable anonymous usage statistics
|
||
# 可选值 Values: 0 (启用统计 enabled), 1 (禁用统计 disabled)
|
||
# 默认 Default: 0
|
||
ASTRBOT_DISABLE_METRICS=0
|
||
|
||
# 覆盖 Python 可执行文件路径(用于本地代码执行功能)
|
||
# Override Python executable path (for local code execution)
|
||
# 示例 Example: /usr/bin/python3, /home/user/.pyenv/shims/python
|
||
# PYTHON=/usr/bin/python3
|
||
|
||
# 启用演示模式(可能限制部分功能)
|
||
# Enable demo mode (may restrict certain features)
|
||
# 可选值 Values: True, False
|
||
# 默认 Default: False
|
||
# DEMO_MODE=False
|
||
|
||
# 启用测试模式(影响日志和部分行为)
|
||
# Enable testing mode (affects logging and behavior)
|
||
# 可选值 Values: True, False
|
||
# 默认 Default: False
|
||
# TESTING=False
|
||
|
||
# 标记:是否通过桌面客户端执行(主要用于内部)
|
||
# Flag: running via desktop client (internal use)
|
||
# 可选值 Values: 0, 1
|
||
# ASTRBOT_DESKTOP_CLIENT=0
|
||
|
||
# 标记:是否通过 systemd 服务执行
|
||
# Flag: running via systemd service
|
||
# 可选值 Values: 0, 1
|
||
ASTRBOT_SYSTEMD=1
|
||
|
||
# ------------------------------------------
|
||
# 管理面板配置 / Dashboard Configuration
|
||
# ------------------------------------------
|
||
|
||
# 启用或禁用 WebUI 管理面板
|
||
# Enable or disable WebUI dashboard
|
||
# 可选值 Values: True, False
|
||
# 默认 Default: True
|
||
ASTRBOT_DASHBOARD_ENABLE=True
|
||
|
||
# ------------------------------------------
|
||
# 国际化配置 / Internationalization Configuration
|
||
# ------------------------------------------
|
||
|
||
# CLI 界面语言
|
||
# CLI interface language
|
||
# 可选值 Values: zh (中文), en (英文)
|
||
# 默认 Default: zh (跟随系统 locale / follows system locale)
|
||
# ASTRBOT_CLI_LANG=zh
|
||
|
||
# TUI 界面语言
|
||
# TUI interface language
|
||
# 可选值 Values: zh (中文), en (英文)
|
||
# 默认 Default: zh
|
||
# ASTRBOT_TUI_LANG=zh
|
||
|
||
# ------------------------------------------
|
||
# 网络配置 / Network Configuration
|
||
# ------------------------------------------
|
||
|
||
# API 绑定主机
|
||
# API bind host
|
||
# 示例 Example: 0.0.0.0 (所有接口 all interfaces), 127.0.0.1 (仅本地 localhost only)
|
||
ASTRBOT_HOST="${ASTRBOT_HOST}"
|
||
|
||
# API 绑定端口
|
||
# API bind port
|
||
# 示例 Example: 3000, 6185, 8080
|
||
ASTRBOT_PORT="${ASTRBOT_PORT}"
|
||
|
||
# 是否为 API 启用 SSL/TLS
|
||
# Enable SSL/TLS for API
|
||
# 可选值 Values: true, false
|
||
# 默认 Default: false
|
||
ASTRBOT_SSL_ENABLE=false
|
||
|
||
# SSL 证书路径(PEM 格式)
|
||
# SSL certificate path (PEM format)
|
||
# 示例 Example: /etc/astrbot/certs/myinstance/fullchain.pem
|
||
ASTRBOT_SSL_CERT=""
|
||
|
||
# SSL 私钥路径(PEM 格式)
|
||
# SSL private key path (PEM format)
|
||
# 示例 Example: /etc/astrbot/certs/myinstance/privkey.pem
|
||
ASTRBOT_SSL_KEY=""
|
||
|
||
# SSL CA 证书链路径(可选,用于客户端验证)
|
||
# SSL CA certificates bundle (optional, for client verification)
|
||
# 示例 Example: /etc/ssl/certs/ca-certificates.crt
|
||
ASTRBOT_SSL_CA_CERTS=""
|
||
|
||
# ------------------------------------------
|
||
# 代理配置 / Proxy Configuration
|
||
# ------------------------------------------
|
||
|
||
# HTTP 代理地址
|
||
# HTTP proxy URL
|
||
# 示例 Example: http://127.0.0.1:7890, socks5://127.0.0.1:1080
|
||
# http_proxy=
|
||
|
||
# HTTPS 代理地址
|
||
# HTTPS proxy URL
|
||
# 示例 Example: http://127.0.0.1:7890, socks5://127.0.0.1:1080
|
||
# https_proxy=
|
||
|
||
# 不走代理的主机列表(逗号分隔)
|
||
# Hosts to bypass proxy (comma-separated)
|
||
# 示例 Example: localhost,127.0.0.1,192.168.0.0/16,.local
|
||
# no_proxy=localhost,127.0.0.1
|
||
|
||
# ------------------------------------------
|
||
# 第三方集成 / Third-party Integrations
|
||
# ------------------------------------------
|
||
|
||
# 阿里云 DashScope API 密钥(用于 Rerank 服务)
|
||
# Alibaba DashScope API Key (for Rerank service)
|
||
# 获取地址 Get from: https://dashscope.console.aliyun.com/
|
||
# 示例 Example: sk-xxxxxxxxxxxx
|
||
# DASHSCOPE_API_KEY=
|
||
|
||
# Coze 集成
|
||
# Coze integration
|
||
# 获取地址 Get from: https://www.coze.com/
|
||
# COZE_API_KEY=
|
||
# COZE_BOT_ID=
|
||
|
||
# 计算机控制相关的数据目录(用于截图/文件存储)
|
||
# Computer control data directory (for screenshots/file storage)
|
||
# 示例 Example: /var/lib/astrbot/bay_data
|
||
# BAY_DATA_DIR=
|
||
|
||
# ------------------------------------------
|
||
# 平台特定配置 / Platform-specific Configuration
|
||
# ------------------------------------------
|
||
|
||
# QQ 官方机器人测试模式开关
|
||
# QQ official bot test mode
|
||
# 可选值 Values: on, off
|
||
# 默认 Default: off
|
||
# TEST_MODE=off
|
||
|
||
# End of template / 模板结束
|