Skip to content
Matrix Application Services Bridge for Wechaty for Wechat Individual Accounts
TypeScript Shell Dockerfile JavaScript
Branch: master
Clone or download
huan Merge pull request #17 from huan/greenkeeper/@types/read-pkg-up-6.0.0
Update @types/read-pkg-up to the latest version 🚀
Latest commit 7a0dc7c Jul 18, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode wip ... Jun 30, 2019
bin REFACTORING ... WIP ... Jul 1, 2019
docs/images Add files May 10, 2019
scripts wip ... Jun 30, 2019
src fix unit test & mock Jul 14, 2019
tests move cli Jun 14, 2019
.editorconfig Structure directorys May 12, 2019
.eslintrc.js Workable v0.2 Jul 7, 2019
.gitignore add matrix-js-sdk typings! Jun 27, 2019
.markdownlint.json improve messages processing Jul 14, 2019
.travis.yml fix node v12 Jun 16, 2019
LICENSE improve messages processing Jul 14, 2019
package.json chore(package): update @types/read-pkg-up to version 6.0.0 Jul 17, 2019
tsconfig.json use @chatie/tsconfig & @chatie/eslint-config Jun 8, 2019


Powered by Wechaty NPM Version Build Status TypeScript Greenkeeper badge

Matrix + Wechaty

Photo credit: Matrix Club

Matrix Application Services Wechaty Bridge for Wechat Individual Accounts


Matrix is like Pidgin on your Phone.

Pidgin try to IM all your friends in one place in Linux, and with Matrix you can have your Phone clinet with your private server which is highly customized. Matrix did not use XMPP protocol, it's server uses REST so that it could be more easy to extend.

This week I had a great talk with YC partner Eric @ericmigi, who is a serial entrepreneur and also a geek with technology. He uses Matrix a lot and almost integrated all the instance messanger to his Matrix.

But, the matrix does not support Wechat yet. So we'd like to introduce a matrix-wechat bridge to implement the Wechat protocol, and fill the gap between Matrix and Wechat.

@ericmigi provide some links that will help us to kick off a starter, hope we could make a workable POC soon, and any contribution will be welcome.

  1. homeserver install in 1 hr
  2. examples of puppet bridges

— April 2019

@tulir has very rich experiences with building the matrix bridges such as:

  1. A Matrix-Telegram hybrid puppeting/relaybot bridge
  2. A Matrix-WhatsApp puppeting bridge

— May 2019


I'd like to recommend using Riot for using Matrix. Riot is a universal secure chat app entirely under your control. It supports all types of the platforms, including Web/Browser, Android, and iPhone.


matrix-appservcie-wechaty is a very easy to use bridge for Matrix. It supports two installation methods:

  1. NPM
  2. Docker


NPM Version npm (next)

sudo npm install -g matrix-appservice-wechaty


To be documented...

docker run \
  --rm \
  --name matrix-appservice-wechaty \
  --mount type=bind,source="$(pwd)",target=/data \



This part is "steal" from

Logging in

  1. Start a chat with the bridge bot. The bot should say "This room has been registered as your bridge management/status room." if you started the chat correctly.
  2. Run login
  3. Log in by scanning the QR code. If the code expires before you scan it, the bridge will send an error to notify you.
    1. Open Wechat on your phone.
    2. Tap Menu or Settings and select Scan.
    3. Point your phone at the image sent by the bot to capture the code.
  4. Finally, the bot should inform you of a successful login and the bridge should start creating portal rooms for all your Wechat groups and private chats.

Logging out

Simply run the logout management command.


Matrix AppService Bridges in TypeScript

Matrix AppService Bridges in JavaScript



v0.4 (Alpha) July 14, 2019

  1. Support receive/send Wechat message in Matrix. (individuals and rooms)
  2. Tested with Web API(wechaty-puppet-puppeteer) and Pad API(wechaty-puppet-padpro)

Known Issues

  1. The names/avatars of Wechat users/groups are not set right on Matrix.
  2. Only support text message, Image/Audio/Video message is not supported yet. (Will be supported in the future version)
  3. Appservice will create more than one matrix room for a Wechat room when receiving messages from it for the very first time. (It will stop creating new rooms after you accepted the invitation)
  4. Login QR Code should not use the 3rd party API for security considerations. Upload the QR Code image to matrix server instead.

v0.2 July 6, 2019

  1. Enable your matrix account to start using matrix-appservice-wechaty by talk to the bot @wechaty:your.domain
  2. After you talk to @wechaty, it will send you Wechat Login QR Code. Scan it to login Wechat
  3. All Wechat messages will be bridged to the Matrix system, in the room that you talk to the bot at the very first time.

v0.0.1 May 2019

  1. Auto response the message in a Matrix Room.


Copied from disclaimer part from matrix-appservice-discord:

I accept no responsibility if Tencent ban your IP, Account or even your details on their system. They have never given official support on custom clients.


Huan LI (李卓桓)

Profile of Huan LI (李卓桓) on StackOverflow


  • Code & Docs © 2019 - now Huan LI
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons
You can’t perform that action at this time.