Connect your first adapter
Connect NapCat or Telegram and send your first group management command.
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.
.env configuration file.Application startup complete..This tutorial does not connect to a real QQ or Telegram account — that comes next in Connect your first adapter.
Clone the repository and enter the project directory:
git clone https://github.com/xinvxueyuan/lingchu-bot.gitcd lingchu-botThe project ships a cross-platform setup script that automates the entire initialization:
chmod +x scripts/setup.sh./scripts/setup.shThe 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_CNSee 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:
uvx --from nb-cli nb.exe runWait until the log shows:
INFO 06:31:21 | Application startup complete.If you see this line, the core runtime is healthy.
uv and scripts/setup.sh..env under NoneBot’s management.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.