A standalone WeChat protocol Puppet for Wechaty. The TypeScript example uses PuppetNeo directly to log in with a QR code and reply to direct text messages. Authentication stays in memory, so each run needs a fresh QR scan. See the v1 specification for the architecture and acceptance gates.
Neo is a Puppet for Wechaty 2.0: it needs wechaty-puppet 2.0 as a peer dependency (npm install wechaty-puppet@next). Wechaty 2.0 loads it with WECHATY_PUPPET=wechaty-puppet-neo.
The 30-second live terminal demo shows QR login and the standalone TypeScript example exchanging ding and dong with a second account. It was recorded on Linux x64 with protocol crate 1.4.0. Idle waits are cut.
puppet-neo-standalone-demo-tight.mp4
Neo's protocol session is compiled to WebAssembly, so one package runs wherever Node.js 26 runs, with no native addon and nothing to compile on install. Node opens the TCP connections to WeChat's servers. CI builds it on Linux, installs the package in a fresh project and runs its tests there.
To build from source, use Node.js 26, Rust 1.93.1 with the wasm32-unknown-unknown target, and the wasm-bindgen command-line tool at the version in wasm/Cargo.lock. No C compiler or Perl is needed.
rustup target add wasm32-unknown-unknown
cargo install --locked wasm-bindgen-cli --version 0.2.130
npm ci
npm run build:wasm
npm run build
node examples/ding-dong-bot.tsScan the terminal QR and confirm the login on your phone. The example prints the account's nickname. After Ready appears, send ding from another WeChat account, directly or in a group that includes this account. The example replies with dong in the same chat and prints the received message and reply. Signing the device out from the phone, or calling puppet.logout(), emits logout with the reason. Stop with Ctrl+C. Starting it again displays a new QR.
Node runs the TypeScript example directly. The commands above build the package and its WebAssembly session from source. To use a prebuilt tarball in another project, install the tarball and copy its examples/ding-dong-bot.ts into that project before running it.
Run npm test for type checking and the offline tests, and npm run test:package to check a clean tarball installation.
To release, merge a pull request that changes the version in package.json. When that commit lands on main and its build and package tests pass, CI publishes the version to npm, then creates the v<version> tag and a GitHub release with notes from the merged pull requests. A commit whose version is already on npm publishes nothing. An odd minor version, such as 0.1.x, publishes on the next dist-tag; an even minor version publishes on latest, following the Wechaty versioning conventions. The tarball carries npm provenance from this workflow, which publishes through npm trusted publishing (OIDC) with no npm token.
To point a dist-tag at a published version, run the workflow by hand:
gh workflow run ci.yml -f version=0.1.3 -f tag=latestA dev container is a reproducible development workspace described in the repository. VS Code's Dev Containers extension can open the project inside that environment so contributors use the same OS and toolchain without installing Node.js or Rust on the host.
The configuration in .devcontainer/devcontainer.json is based on the Ship.Fail devcontainer template. It uses Ubuntu 24.04, Node.js 26, and Rust 1.93.1 with rustfmt, clippy and the wasm32-unknown-unknown target. Install wasm-bindgen-cli as shown above before npm run build:wasm. It runs npm ci after container creation. It also retains the template's supporting CLI tools and mounts host Claude, Codex, Gemini, and Git configuration into the container; the GitHub CLI helper can use the host Git credential helper. Only use these host mounts when you trust the repository and its development tooling.
Windows contributors must use WSL to open the repository and run the dev container; native Windows host initialization is unsupported. Install the VS Code Dev Containers extension, then run Dev Containers: Reopen in Container from the Command Palette.
For live acceptance, use an isolated test account and a confirmed peer. The example replies to direct ding messages, including messages received during initial sync. Verify dong on the peer's device. Real-account testing has covered Linux x64. CI covers loading the WebAssembly session, npm installation, and scripted Puppet behavior.