Lilibtc Bot 安装指南

快速开始 · 跨平台支持 · 完整配置指南

快速开始

一键安装(推荐)

macOS / Linux

curl -sL https://api.lilibtc.com/install.sh | bash

Windows (PowerShell)

⬛ 必须在 PowerShell 中运行
打开方式:开始菜单 → 搜索 "PowerShell" → 点击 "Windows PowerShell"(不要用 cmd 或 Git Bash)。
irm https://api.lilibtc.com/install.ps1 | iex

使用 npm 安装

前置要求

  • Node.js 18+
  • npm (通常随 Node.js 一起安装)

安装步骤

1. 安装 Lilibtc Bot

npm install -g lilibtc-bot

2. 启动控制台

lilibtc-bot start

💡 提示:运行后会自动打开网页控制台。

3. 配置 API Key

在网页控制台中:

  • 在「登录」标签填入 API Key(使用 Telegram Bot /api_key 命令获取)
  • 在「设置」标签填入币安广场 Key
  • 点击「启动」按钮

验证安装

lilibtc-bot --version
# 应显示: lilibtc-bot v1.0.8

配置 Binance Square API Key

Lilibtc Bot 通过币安广场 OpenAPI 自动发布内容到 Binance Square。

获取币安广场 API Key

  1. 访问 https://www.binance.com/zh-CN/square/creator-center/home
  2. 点击 "创建 API"
  3. 复制你的 API Key

在控制台配置

运行 lilibtc-bot start 后,在网页控制台的「设置」标签中填入币安广场 API Key,然后点击「启动」按钮即可。

启动 Bot

启动并打开控制台

lilibtc-bot start

运行后会自动打开网页控制台,在控制台登录和配置后即可开始使用。

后台运行(推荐)

lilibtc-bot start --daemon

后台模式运行,仍然会打开网页控制台进行配置。

查看状态

lilibtc-bot status

停止 Bot

lilibtc-bot stop

更新 Bot

使用 npm 更新

npm update -g lilibtc-bot

使用内置更新命令

lilibtc-bot update

系统要求

  • 操作系统: Windows 10/11, macOS, Linux
  • Node.js: 18.0 或更高版本
  • 内存: 至少 128MB RAM
  • 网络: 需要访问 api.lilibtc.com 和 binance.com

故障排除

问题:无法连接到服务器

  1. 检查网络连接
  2. 确认 API Key 正确
  3. 检查防火墙设置

问题:Node.js 版本过低

# 检查 Node.js 版本
node --version

# 升级 Node.js (推荐使用 nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install --lts
nvm use --lts

问题:权限错误 (Linux/macOS)

sudo npm install -g lilibtc-bot

问题:Windows 安装失败

  1. 确保 PowerShell 以管理员身份运行
  2. 检查执行策略:
Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

高级配置

环境变量

所有必需配置(API Key、币安广场 Key)均在网页控制台中完成,无需环境变量。以下环境变量仅用于高级配置:

变量名 描述 必需
SERVER_URL API 服务器地址
HTTPS_PROXY 代理服务器地址

PM2 部署(推荐用于生产环境)

# 安装 PM2
npm install -g pm2

# 启动 Bot
pm2 start ecosystem.config.js

# 设置开机自启
pm2 startup
pm2 save

Docker 部署

⚠️ 注意: Docker 部署时启动后会自动打开网页控制台,在控制台的「登录」标签填入 API Key,在「设置」标签填入币安广场 Key,然后点击「启动」按钮即可。

# 构建镜像
docker build -t lilibtc-bot .

# 运行容器
docker run -d \
  --name lilibtc-bot \
  -p 3000:3000 \
  lilibtc-bot

常用命令

# 查看帮助
lilibtc-bot help

# 查看版本
lilibtc-bot --version

# 查看配置
lilibtc-bot setting

# 查看历史记录
lilibtc-bot history

# 查看统计信息
lilibtc-bot states

卸载

npm 卸载

npm uninstall -g lilibtc-bot

手动清理

# 删除配置文件
rm -rf ~/.lilibtc-bot

# 删除锁文件
rm -f ~/.lilibtc-bot/publisher.lock

获取帮助

💡 提示: 安装完成后,请确保你已经设置了 Binance Square API Key,这样 Bot 才能自动发布内容到币安广场。 如遇到问题,请查看 帮助文档 或联系技术支持。