opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

WeChatFerry: a Windows WeChat tool with Python, HTTP, NodeJS clients
GitHub RepoImpressions4

Project Description

View on GitHub

WeChatFerry: A Practical Bridge Between Your Code and WeChat on Windows

Ever wanted to automate your WeChat interactions—whether that's building a bot, managing group messages, or pulling data from conversations? If you've looked into the WeChat API landscape, you know it's a mess. Most official options are locked down, and the unofficial ones are fragmented across languages and platforms. WeChatFerry aims to solve that by giving you a unified Windows-based toolkit with clients for Python, HTTP, NodeJS, and more.

It's a tool that lets you "play with WeChat" (as the Chinese README literally describes it), and it's backed by a solid list of features that go far beyond simple message sending.

What It Does

WeChatFerry is essentially a software development kit (SDK) for automating a Windows WeChat client. It works by hooking into the desktop application to expose a range of functions you'd normally never have access to. The core is a native DLL, which you can load and control programmatically.

The project provides a feature list that reads like a full WeChat automation wishlist:

  • Messaging: Send text (with mentions), images, files, GIFs, XML, and card messages. You can also forward messages and toggle message receiving on and off.
  • Contacts and Groups: Fetch contact lists, pass friend requests, add or remove group members, and even "pat" someone in a group chat.
  • Data Access: Query the local WeChat database, list available databases and tables, and get your login account info.
  • Media Handling: Download and decrypt images, videos, and files. You can also fetch voice messages and moments (朋友圈) posts.

Under the hood, it uses gRPC for communication between the clients and the core, which is why it can support multiple languages so cleanly. The official clients include Python, HTTP (with community implementations in Rust, Go, and Python), Java, NodeJS, C#, and Rust. There are also Docker images available from the community if you want to containerize your setup.

Why It's Cool

The most striking thing about WeChatFerry isn't any single feature—it's the breadth of what's covered and the multi-language approach.

  • It's a full toolbox, not just a messaging API. Most WeChat bots I've seen are glorified auto-reply scripts. WeChatFerry goes deeper. Being able to query the local database or decrypt media files means you can build real data pipelines or personal analytics tools. Want to archive your chat history? This can do it.
  • Language support is genuinely thoughtful. The official Python client is the star, but the HTTP client opens doors for anyone using Rust or Go. The community has filled in the gaps with NodeJS and C# clients. You're not forced into one ecosystem.
  • The database querying is a killer feature. WeChat stores a lot locally on Windows, and having direct SQL access to that data is powerful. It's the kind of thing that makes you realize the automation potential is only limited by your imagination (and WeChat's terms of service, but that's a separate conversation).
  • It's designed for real-world use. The feature list isn't abstract—it includes things like getting the login QR code, checking login status, and handling friend requests. These are the practical details you actually need when building a bot that runs unattended.

That said, it's worth noting the README is honest about the scope. The disclaimer is prominent and required reading, which tells you this operates in a gray area of WeChat's ecosystem. There's no official API here; this is a tool that manipulates the desktop client directly.

How to Try It

Getting started with the Python client is straightforward. The project is published on PyPI, so you can install it with a single command:

pip install --upgrade wcferry

From there, you'll want to look at the companion project, WeChatRobot, which serves as a reference bot implementation. The README points to it as the primary example for how to use the Python SDK in practice.

If you're not a Python developer, you have options. The HTTP client has several implementations to choose from, including a Rust-based client (wcfrust), a Go-based one (go_wcf_http), and a Python-based HTTP wrapper (wcf-http). For NodeJS, there's wcferry-node and node-wcferry. The project also lists community clients for Java and C# if those are your languages.

If you want to build from source—which the README notes is only for developers who can troubleshoot compilation issues on their own—you'll need Visual Studio 2019, Python 3.10 (or lower), and vcpkg for dependency management. The process is documented in the README's collapsible sections, but it's not for the faint of heart.

For a quick test without building anything, you can load the compiled SDK DLL directly via Python's ctypes module, as shown in the README:

import ctypes
# Load sdk.dll (requires absolute path)
sdk = ctypes.cdll.LoadLibrary("C:/Projs/WeChatFerry/WeChatFerry/Out/sdk.dll")

# Initialize
sdk.WxInitSDK(False, 10086)

# Shutdown SDK
sdk.WxDestroySDK()

The main repository is at github.com/lich0821/wechatferry, and there's also a Python documentation site at wechatferry.readthedocs.io.

Final Thoughts

WeChatFerry is a genuinely useful tool for developers who need to automate WeChat on Windows and don't want to reinvent the wheel across multiple languages. It's not a polished commercial product—the README is sparse in places and assumes you can figure some things out on your own—but the feature set is impressive and the community around it is active.

If you're building a WeChat bot, a chat archiver, or anything that needs deeper access than what a simple auto-reply script provides, this is worth a look. Just be aware of what you're getting into: this operates in WeChat's unofficial territory, so you'll want to read that disclaimer and use it responsibly.

Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: 6876e054-4bc9-42f2-afa0-7f5b94d09acdLast updated: September 3, 2026 at 11:11 AM