Skip to content
CAI
Software that uses CAICheck a score

wangrongding/wechat-bot

40.8

Weak · 2 October 2026

2.5k

lines of production code

JavaScript

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a command-line interface for a WeChat bot that aggregates multiple AI providers and messaging channels. It enables users to interact with various large language models, such as OpenAI, Claude, and local Ollama instances, through unified adapters for platforms like WeChat, Telegram, and Lark. The application also includes utilities for analyzing local WeChat chat logs and routing messages to different AI services based on user configuration.

How it got here

2021–2022 — Initial scaffolding and multi-provider integration

5 changes.

The project was initialized with core infrastructure, including CLI tools, Docker configurations, and dependency management. Subsequent work focused on integrating a wide array of AI providers, such as OpenAI, ChatGPT, and various Chinese models, into a unified WeChaty bot architecture with dynamic service routing.

2024–2026 — multi-provider AI and IM integration

13 changes.

The project expanded its capabilities by integrating a wide array of AI models, including Kimi, iFlytek, DeepSeek, Doubao, 302.ai, Dify, Ollama, Tongyi, and Claude, alongside new messaging channels like Lark, Telegram, and WhatsApp. A unified CLI entry point was introduced to manage these diverse services and channels, while supporting features such as streaming responses and multimodal inputs. The period also included infrastructure improvements like automated code formatting and utilities for WeChat chat analysis.

Features

Add 302.ai integration for automated replies

Introduces a new module in src/302ai that connects to the 302.ai API to generate automated responses. The implementation uses the GPT-4o-mini model by default, configurable via the \_302AI\_MODEL environment variable, and requires the \_302AI\_API\_KEY for authentication. A test script is included to verify the integration.

src/302ai · high confidence

Add Claude AI integration with configurable base URL

Introduces a new module for interacting with the Claude API, allowing users to configure the service endpoint via the CLAUDE\_BASE\_URL environment variable. The implementation includes logic to normalize the base URL to the standard Anthropic format, supports custom models (defaulting to claude-3-5-sonnet-latest), and enables system prompt configuration through CLAUDE\_SYSTEM.

src/claude · high confidence

Add Dify API integration module

Introduces a new module in src/dify that enables the application to send chat messages to a Dify AI service. The implementation uses environment variables (DIFY\_API\_KEY, DIFY\_URL, BOT\_NAME) to configure the API endpoint and authentication, exposing a getDifyReply function that sends a user prompt and returns the assistant's response in blocking mode.

src/dify · high confidence

Add Doubao integration via OpenAI-compatible API

Users can now interact with the Doubao language model by configuring environment variables (DOUBAO\_API\_KEY, DOUBAO\_URL, DOUBAO\_MODEL) and using the new getDoubaoReply function. The implementation leverages the OpenAI client library to support both text-only prompts and multimodal inputs that include image URLs, allowing users to send queries with or without attached images.

src/doubao · high confidence

Add Ollama integration with system prompt support

Users can now connect to an Ollama instance via the new src/ollama module. The integration sends requests to the configured OLLAMA\_URL using the specified OLLAMA\_MODEL and includes a configurable OLLAMA\_SYSTEM\_MESSAGE as a system role in the conversation history. A test script is provided to verify the connection and response handling.

src/ollama · high confidence

Add Tongyi integration module

A new module at src/tongyi/index.js has been added to enable interaction with the Tongyi (Qwen) language model. This component initializes an OpenAI-compatible client using environment variables (TONGYI\_URL, TONGYI\_API\_KEY, and TONGYI\_MODEL, defaulting to 'qwen-plus'), validates the presence of a .env file, and exposes a getTongyiReply function that sends user prompts to the model and returns the response, automatically appending a request to answer in Chinese.

src/tongyi · high confidence

Added WeChat message analysis and Pi agent integration capabilities

This change introduces new modules for analyzing local WeChat chat logs and integrating with the Pi agent via IM channels. The \src/analysis\ directory now contains \wechatAnalyzer.js\, which provides functions to load, filter, and generate statistics (such as top speakers and message counts) from WeChat message records, along with a test suite in \\_\test\\_.js\ to verify this logic. It also constructs prompts for an AI service to generate textual analysis of the chat data. Additionally, \src/pi/index.js\ implements the \getPiReply\ function, which acts as the entry point for the Pi agent to handle user queries through the IM channel, instructing the agent to leverage local WeChat analysis capabilities when appropriate. Utility functions for running and streaming shell commands have been added in \src/utils/process.js\ to support these operations.

src/analysis, src/pi, src/utils · high confidence

Added support for DeepSeek and Doubao via OpenAI-compatible API

Users can now interact with DeepSeek and Doubao models using the OpenAI API format. The update introduces new modules in src/deepseek and src/deepseek-free that handle API communication, including configuration for custom URLs, API keys, and system prompts via environment variables. This enables the application to leverage these specific AI providers through a standardized interface.

src/deepseek-free · high confidence

Initial project scaffolding and configuration

The repository has been initialized with the core project structure, including a CLI entry point (\cli.js\), Docker build files (\Dockerfile\, \Dockerfile.alpine\), and a comprehensive environment configuration template (\.env.example\) that defines settings for multiple AI providers (OpenAI, Doubao, DeepSeek, Kimi, Xunfei, Dify, Ollama, Claude, Pi) and IM channels (WeChat, Lark, Telegram, WhatsApp). Documentation (README, LICENSE) and development tooling (Prettier, .npmrc) have also been added to support the project's setup.

(repo-wide) · high confidence

Integration of iFlytek Spark LLM support

Users can now interact with the iFlytek Spark large language model via a new integration in the \src/xunfei\ module. The system connects to the iFlytek API using WebSocket, allowing configuration of the model version (defaulting to v4.0) and a custom system prompt through environment variables. This change introduces the capability to send messages and receive AI-generated replies from the iFlytek service.

src/xunfei · high confidence

Introduce ChatGPT API integration module

Added a new module at src/chatgpt/index.js that initializes the ChatGPT API client using environment variables for authentication (clearance token, session token, user agent, access token) and provides a function to send messages with a 2-minute timeout.

src/chatgpt · high confidence

Introduce Kimi module with streaming support and configurable token limits

Added a new \src/kimi\ module that integrates with the Moonshot API to generate replies. The implementation enables streaming output by default, allowing users to receive incremental responses, and sets a default maximum token limit of 5000 for generated content. A test file is included to verify the \getKimiReply\ function.

src/kimi · high confidence

Introduce OpenAI integration with configurable model and proxy support

The src/openai module now provides a direct integration with the official OpenAI API, replacing previous third-party wrappers. Users can configure the API key, an optional proxy URL via OPENAI\_PROXY\_URL, and a system message. The model is configurable via the OPENAI\_MODEL environment variable (defaulting to gpt-4o), and responses are automatically stripped of Markdown formatting before being returned.

src/openai · high confidence

New AI service routing and message handling logic in WeChaty bot

The WeChaty bot now supports a wider variety of AI providers through a new service selection mechanism. The \serve.js\ module introduces a \getServe\ function that dynamically loads responses from multiple providers including ChatGPT, Kimi, Xunfei, DeepSeek, 302AI, Dify, Ollama, Tongyi, Claude, Pi, and Doubao. The \sendMessage.js\ file implements new logic for handling incoming messages, distinguishing between group chats and private chats, and applying prefix-based auto-reply rules and command handling. A new \testMessage.js\ utility allows users to manually test these different AI services via an interactive CLI prompt.

src/wechaty · high confidence

New CLI entry point with multi-service and IM channel support

The application now exposes a new command-line interface via src/index.js, allowing users to start various AI services (including ChatGPT, Doubao, DeepSeek, Kimi, Xunfei, 302AI, Dify, Ollama, Tongyi, Claude, and Pi) and IM channels (WeChat, Lark, Telegram, and WhatsApp) through a unified CLI. The entry point handles environment variable validation for each service and channel, providing specific error messages for missing configurations, and supports both interactive selection and direct service specification via command-line options.

src · high confidence

New support for Lark, Telegram, and WhatsApp messaging channels

The application now integrates with Lark (Feishu), Telegram, and WhatsApp, allowing users to interact with the bot via these platforms. This update adds specific adapters for each service (including Lark CLI integration, Telegram long-polling, and WhatsApp webhooks) and platform agents that handle message routing, deduplication, and reply logic. Configuration for these channels is centralized in the environment config, requiring new environment variables such as TELEGRAM\_BOT\_TOKEN, WHATSAPP\_ACCESS\_TOKEN, and LARK\_CLI\_BIN to enable the respective features.

src/adapters, src/config, src/platforms · high confidence

Behavioural changes

Automated code formatting on commit

A pre-commit hook has been added to the repository to automatically run lint-staged. This ensures that code is consistently formatted before changes are committed, reducing manual review overhead for style issues.

.husky · high confidence

Dependencies

Dependency overhaul and project restructuring

The project has replaced the legacy yarn.lock with npm-style dependency management and significantly updated its package.json. Key changes include upgrading wechaty to v1.20.2, adding the official openai SDK (v4.52.0) and axios (v1.6.8), and introducing new dependencies for CLI interaction (commander, inquirer) and text processing (remark, strip-markdown). The package name was corrected to 'wechat-bot', version bumped to 1.0.2, and the module type set to 'module'. Development tooling was added with husky, lint-staged, and prettier for code formatting and pre-commit hooks.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 40 → 41 (+0.6)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 52 → 52 (+0.0)
  • Architecture 95 → 95 (+0.8)
  • Maturity 56 → 56 (+0.1)
  • Readiness 15 → 15 (+0.0)
  • Security 97 → 98 (+0.5)
  • Performance 85 (new)

Resolved (4)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Hotspot: src/index.js (src/index.js)
  • Off-boarding risk: anonymized user #1

New (2)

  • Documentation: no architecture or design documentation (README.md)
  • Off-boarding risk: anonymized user #1

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

wangrongding/wechat-bot was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 43c6c5075393ca50a430629108251d9be104d5b9 — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.