Quick Start
Quick Start

This page explains how to prepare Lingchu Bot locally. Before connecting to a real platform, prepare the account, network, and configuration required by NoneBot and the enabled adapter. The QQ platform enables OneBot V11 by default. Milky, QQ, and OneBot V12 adapters are deprecated and fully removed.
Requirements
- Python 3.13
- uv
- git
- A runtime environment usable by the enabled QQ adapter; OneBot V11 is the default
Setup steps
Get the code
git clone https://github.com/xinvxueyuan/lingchu-bot.git
cd lingchu-botRun the setup script
The project provides a cross-platform setup script that automates the entire initialization process:
chmod +x scripts/setup.sh
./scripts/setup.shThe script will:
- Detect your operating system and required toolchain
- Verify Python 3.13+, Node.js 20+, pnpm 9+, Git, and uv
- Install all Python and Node.js dependencies
- Generate environment configuration files (
.env,.env.development,.env.test,.env.production) - Configure Git hooks (husky)
- Optionally initialize a Git repository and install Playwright browsers
See ./scripts/setup.sh --help for all available options.
Install dependencies (manual alternative)
If you prefer to install manually instead of using the setup script:
uv sync --frozen
pnpm install
pnpm exec husky
cp .env.example .envChoose a runtime mode
Load this repository as a local plugin directory from an existing NoneBot project. Make sure the target NoneBot project loads src/plugins:
# In the NoneBot project's pyproject.toml
[tool.nonebot]
plugin_dirs = ["path/to/lingchu-bot/src/plugins"]The repository provides a Docker build flow. The Docker image generates the runtime /tmp/bot.py with nb-cli during build:
docker compose up --buildPre-run checklist
- Confirm that Python is version 3.13.
- Confirm that the service and connection settings for the enabled adapter are ready.
- If runtime registers multiple QQ adapters, Lingchu Bot only enables the business code selected by
LINGCHUAdapter; make sure the selected adapter has also been loaded by NoneBot. - Confirm that the target NoneBot project loads
src/plugins, or that you are using the repository Docker runner. - Confirm that Boolean values in NoneBot configuration use lowercase
true/false, notTrue/False.
Boolean values
NoneBot configuration files only accept standard JSON lowercase true / false. Using True / False will raise a configuration error at startup.
Next steps
Last updated on