Skip to content

Getting started with Lingchu Bot

Lingchu Bot quick start runtime setup

In this tutorial you will install Lingchu Bot from scratch and verify the setup by running the bot locally. By the end, you will have a working development environment ready to connect a platform adapter.

  • How to clone and install Lingchu Bot with all dependencies.
  • How to prepare the .env configuration file.
  • How to start the bot and confirm it reaches Application startup complete..

This tutorial does not connect to a real QQ or Telegram account — that comes next in Connect your first adapter.

  • Python 3.13
  • uv — Python package and project manager
  • git
  • Node.js 22+ and pnpm (only if you also want to build the docs site)

Clone the repository and enter the project directory:

Terminal window
git clone https://github.com/xinvxueyuan/lingchu-bot.git
cd lingchu-bot

The project ships a cross-platform setup script that automates the entire initialization:

Terminal window
chmod +x scripts/setup.sh
./scripts/setup.sh

The script detects your operating system, verifies the required toolchain (Python 3.13+, Node.js 20+, pnpm 9+, Git, uv), installs all dependencies, generates environment configuration files (.env, .env.development, .env.test, .env.production), and configures Git hooks. See ./scripts/setup.sh --help for all options.

Open .env and set the required fields. At minimum, you need LINGCHU_SUPERUSERS (a JSON object mapping Lingchu UIDs to platform account IDs):

LINGCHU_SUPERUSERS='{"admin":{"qq":123456789}}'
LINGCHU_LOCALE=zh_CN

See Configure superuser identity for the full mapping format. Leave the adapter connection fields unset for now — you will configure them in the next tutorial.

Run the bot through the NoneBot CLI:

Terminal window
uvx --from nb-cli nb.exe run

Wait until the log shows:

INFO 06:31:21 | Application startup complete.

If you see this line, the core runtime is healthy.

  • Lingchu Bot installs through uv and scripts/setup.sh.
  • Configuration lives in .env under NoneBot’s management.
  • Startup is confirmed by Application startup complete. in the logs.

Connect your first adapter

Connect NapCat or Telegram and send your first group management command.

Commands

Browse the full command reference.

Troubleshooting

Resolve common startup and connection issues.