{"id":49742,"library":"wechaty-grpc","title":"Wechaty gRPC","description":"gRPC service definitions and client for Wechaty, the chatbot SDK. Version 1.0.1 stable release, maintained with regular updates. Provides protobuf-based RPC for puppet-host communication, enabling cross-language chatbot backends. Ships TypeScript types and supports Node >=16. Key differentiator: seamless integration with Wechaty ecosystem for scaling chatbot operations via gRPC.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/wechaty/grpc","tags":["javascript","grpc","chatie","chatbot","hostie","puppet","wechaty","typescript"],"install":[{"cmd":"npm install wechaty-grpc","lang":"bash","label":"npm"},{"cmd":"yarn add wechaty-grpc","lang":"bash","label":"yarn"},{"cmd":"pnpm add wechaty-grpc","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"runtime dep for protobuf serialization","package":"protobufjs","optional":false},{"reason":"gRPC client library","package":"grpc-js","optional":true}],"imports":[{"note":"ESM support since v1.0; CJS require with .default needed in some builds","wrong":"const WechatyGrpc = require('wechaty-grpc').WechatyGrpc","symbol":"WechatyGrpc","correct":"import { WechatyGrpc } from 'wechaty-grpc'"},{"note":"Puppet types are exported from subpath; main exports only service definitions","wrong":"import { Puppet } from 'wechaty-grpc'","symbol":"Puppet","correct":"import { Puppet } from 'wechaty-grpc/puppet'"},{"note":"Type import for TypeScript users avoiding runtime overhead","symbol":"GrpcOptions","correct":"import type { GrpcOptions } from 'wechaty-grpc'"}],"quickstart":{"code":"import { WechatyGrpc } from 'wechaty-grpc';\nimport { Puppet } from 'wechaty-grpc/puppet';\n\nconst client = new WechatyGrpc({\n  token: process.env.WECHATY_TOKEN || '',\n  puppet: Puppet.create({ endpoint: 'localhost:8788' })\n});\n\nawait client.start();\nconsole.log('gRPC client connected');\n\n// send message\nawait client.sendMessage({ to: 'contact@example.com', text: 'Hello from gRPC!' });\n\nawait client.stop();","lang":"typescript","description":"Connects to a Wechaty gRPC puppet host, sends a message, and disconnects."},"warnings":[{"fix":"Use @grpc/grpc-js instead of grpc; update your package.json dependencies","message":"gRPC library changed from grpc to @grpc/grpc-js in v1.0","severity":"breaking","affected_versions":"<1.0"},{"fix":"Replace Puppet.create({...}) with new Puppet({...})","message":"Puppet.create() is deprecated; use new Puppet() constructor","severity":"deprecated","affected_versions":">=1.0"},{"fix":"Ensure process.env.WECHATY_TOKEN is defined or pass token option explicitly","message":"Environment variable WECHATY_TOKEN must be set before creating client","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Upgrade Node to version 16 or higher","message":"Removed support for Node <16","severity":"breaking","affected_versions":">=1.0"},{"fix":"Ensure wechaty-grpc version matches the puppet host's grpc version","message":"Protobuf definitions must match server version exactly; mismatch causes silent failure","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'1.0.1':14 '16':43 'backend':36 'base':24 'chatbot':11,35,53,60 'chati':59 'client':7 'communic':30 'cross':33 'cross-languag':32 'definit':5 'differenti':45 'ecosystem':50 'enabl':31 'grpc':2,3,56,58 'host':29 'hosti':61 'integr':47 'javascript':57 'key':44 'languag':34 'maintain':17 'node':42 'oper':54 'protobuf':23 'protobuf-bas':22 'provid':21 'puppet':28,62 'puppet-host':27 'regular':19 'releas':16 'rpc':25 'scale':52 'sdk':12 'seamless':46 'servic':4 'ship':37 'stabl':15 'support':41 'type':39 'typescript':38,64 'updat':20 'version':13 'via':55 'wechati':1,9,49,63","created_at":"2026-06-07T17:03:22.333127+00:00","updated_at":"2026-06-07T17:03:22.333127+00:00","problems":[{"fix":"Run npm install protobufjs --save","cause":"Missing protobufjs runtime dependency","error":"Error: Cannot find module 'protobufjs'"},{"fix":"Use import { WechatyGrpc } from 'wechaty-grpc' or const { WechatyGrpc } = require('wechaty-grpc')","cause":"Using wrong import style (CommonJS vs ESM)","error":"TypeError: WechatyGrpc is not a constructor"},{"fix":"Ensure puppet host is running and supports requested method; check version compatibility","cause":"gRPC method not available on the server","error":"Error: 12 UNIMPLEMENTED: Method not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/wechaty/grpc#readme","github":"https://github.com/wechaty/grpc","docs":null,"changelog":null,"pypi":null,"npm":"wechaty-grpc","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}