finds.dev← search

// the find

Eric-Guo/wechat

★ 1,345 · Ruby · MIT · updated Jul 2026

API, command and message handling for WeChat in Rails

A Rails gem for integrating WeChat Official Accounts (both public and enterprise/corp) into Ruby on Rails apps. Handles message receiving/responding via a DSL, OAuth2, JS-SDK config signing, and exposes a CLI for hitting WeChat APIs without spinning up a Rails server. Squarely aimed at Rails developers building for the Chinese market.

The responder DSL is genuinely well-designed — pattern matching on message types with regex support and a clean block interface beats hand-rolling XML parsing every time. Multi-account support is first-class, handled at the config level rather than bolted on later. The CLI that mirrors the Rails API is a real time-saver for debugging or one-off operations. Redis token storage for multi-server deployments is a thoughtful addition rather than an afterthought.

The gem is explicitly tied to Rails — no Sinatra, no Hanami, not even plain Rack. If you're not all-in on Rails you're blocked. Token and ticket storage defaults to local files on disk, which quietly breaks in containerized or ephemeral environments unless you remember to configure Redis. The codebase has accumulated years of WeChat API surface area, and some of it — like the AI voice recognition commands — refers to Tencent endpoints that have moved or been renamed; documentation doesn't warn you which parts are current. The Chinese-language official docs being the only reference for enterprise account setup is a genuine usability cliff for non-Mandarin speakers.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →