Skip to content

Quick Start 5 min

This guide helps you complete ChatAI Plugin installation and basic configuration in 5 minutes.

Requirements

Prerequisites

Make sure your environment meets the following requirements, otherwise installation may fail.

DependencyVersionDescriptionCheck Command
Node.js≥ 18.0LTS version recommendednode -v
pnpm≥ 8.0Package managerpnpm -v
Yunzai-BotV3Miao-Yunzai or TRSS-Yunzai-

Installation Steps

Step 1: Clone Plugin

Run in Yunzai-Bot root directory:

bash
git clone https://github.com/XxxXTeam/chatai-plugin.git ./plugins/chatai-plugin
Clone via SSH (optional)
bash
git clone git@github.com:XxxXTeam/chatai-plugin.git ./plugins/chatai-plugin

Step 2: Install Dependencies

bash
pnpm install

Note

Must be run in Yunzai root directory, not the plugin directory!

Step 3: Build Native Module

The plugin uses better-sqlite3 as local database, which requires building native module:

bash
pnpm rebuild better-sqlite3

Build Tools Installation Guide

If build fails, install build tools for your OS:

bash
# Install Visual Studio Build Tools
# Download: https://visualstudio.microsoft.com/visual-cpp-build-tools/
# Select "Desktop development with C++" during installation
npm install -g windows-build-tools
bash
sudo apt update
sudo apt install build-essential python3
bash
sudo yum groupinstall "Development Tools"
sudo yum install python3
bash
xcode-select --install

Step 4: Start Service

bash
pnpm start
bash
node app

First Configuration

Get Admin Panel

After successful startup, send to bot:

txt
#ai管理面板

The bot will privately send a temporary login link, click to enter the Web admin panel.

💡 Permanent Link

Send #ai管理面板 永久 to get a permanent login link (keep it safe)

Admin Panel Preview

Dashboard

The admin panel provides visual configuration interface including:

ModuleFunctionDescription
🏠 DashboardStatus OverviewReal-time system status, usage stats, version info
📡 ChannelsAPI ConfigConfigure multiple API channels with load balancing
🎭 PresetsAI PersonasManage and switch different AI persona presets
👥 GroupsGroup ConfigSet independent presets, triggers per group
📊 StatisticsData AnalysisToken consumption, conversation stats, tool calls

Setup Wizard

Guided Setup

A setup wizard will automatically appear on first visit, follow the steps to complete configuration.

Step 1 - Select Channel

Choose from preset channels (e.g., OpenAI, DeepSeek) or manually configure custom channel

Step 2 - Enter API Key

Enter your API key, supports environment variable reference ${ENV_VAR}

Step 3 - Test Connection

Click test button to verify API configuration

Step 4 - Select Model

Auto-fetch available models from channel, select default model

Step 5 - Select Preset

Choose AI persona preset or use default

Step 6 - Configure Trigger

Set trigger prefix (e.g., #chat), @trigger, etc.

🎉 Free Trial

Select OpenEL Free Channel for direct experience without API Key!

⚠️ Free channels are provided by third parties with no guarantee of availability or stability. For production use, configure your own API Key. See Channel Configuration.

Start Chatting

After configuration, use the set trigger method to chat with AI:

txt
#chat Hello, please introduce yourself
txt
@bot What's the weather like today?
txt
Hello, please help me write some code

Common Commands

Command Reference

All commands start with configured prefix (default #)

CommandDescriptionPermission
#ai管理面板Get Web admin panel linkMaster
#ai管理面板 永久Get permanent login linkMaster
#结束对话End conversation and clear contextEveryone
#清除记忆Clear personal memory dataEveryone
#ai状态View plugin statusEveryone
#ai调试开启Enable debug modeMaster
#mcp状态View MCP tool statusMaster
More Commands
txt
#ai重载配置     - Reload configuration
#工具日志       - View tool call logs
#ai帮助         - Show help info

Next Steps

📖 Recommended Reading

Choose next documentation based on your needs:

DocumentAudienceContent
InstallationNew UsersDetailed install process, environment setup, common issues
Basic ConfigAll UsersCore configuration options and parameters
Multi-ChannelAdvancedConfigure multiple API channels for load balancing
PresetsAdvancedCreate and manage AI persona presets
ArchitectureDevelopersPlugin internal architecture and design

Released under the MIT License