wx4py  by claw-codes

Automate WeChat interactions on Windows

Created 1 month ago
477 stars

Top 63.9% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Python library for automating WeChat 4.x operations on Windows, targeting users and developers who need to streamline repetitive tasks. It simplifies actions like mass messaging, file distribution, group management, and chat history analysis, offering significant time savings and enabling AI-driven interactions within WeChat.

How It Works

wx4py leverages Python to interact with the WeChat client, simulating user actions through a programmatic interface. It offers a WeChatClient for core operations and an AIClient for integrating large language models. The library supports features like batch sending messages and files, updating group announcements, exporting chat logs (integrating with Pandas), and setting up AI responders that can be configured to reply only when mentioned in group chats, preventing unwanted interruptions.

Quick Start & Requirements

  • Install: pip install wx4py
  • Prerequisites:
    • Operating System: Windows 10/11
    • Python: 3.9+
    • WeChat Client: Version 4.x (tested on 4.1.7.59, 4.1.8.29)
  • Usage: The WeChat client must be logged in and running, preferably in the foreground, during automation tasks.
  • Documentation: Examples are available in the examples/ directory, and API details can be found in docs/guide/API_GUIDE.md.

Highlighted Details

  • Enables batch sending of notifications and files to multiple groups simultaneously.
  • Facilitates one-click updates for group announcements across several groups.
  • Supports exporting chat history to CSV format for analysis using libraries like Pandas.
  • Integrates with AI models (e.g., DeepSeek-V3.2 via Siliconflow API) for automated, context-aware replies, specifically designed to trigger on mentions.
  • Allows configuration of message forwarding rules to sync messages between groups or send them to specific contacts.

Maintenance & Community

The project acknowledges contributions from the linux.do community, the wxauto project, and individual contributor yeafel666. Specific community channels like Discord or Slack, or a public roadmap, are not detailed in the README.

Licensing & Compatibility

wx4py is released under the AGPL-3.0 license, with an explicit restriction against unauthorized commercial use. Personal learning, research, and non-commercial applications are permitted. Commercial licensing inquiries should be directed to the maintainers. The library is specifically designed for WeChat 4.x on Windows.

Limitations & Caveats

Operations require the WeChat client window to be in the foreground. Due to WeChat 4.x UI limitations, message sender information cannot be retrieved. While the library simulates real user actions, there remains a risk of account bans, necessitating cautious usage, especially for bulk marketing. The tool is tailored for specific WeChat and OS versions, and compatibility with other environments is not guaranteed.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
13
Star History
481 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.