npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wechat-pi

v0.1.0

Published

WeChat bridge for Pi Network AI coding agent

Downloads

19

Readme

Pi WeChat Agent Bridge

A TypeScript tool that bridges WeChat messaging with Pi's AI coding agent, enabling natural language interaction with an AI coding assistant through WeChat.

中文版本

What is This?

WeChat Pi Bridge allows you to interact with Pi's AI coding agent directly from WeChat. This means you can:

  • Send coding instructions and questions to the Pi agent
  • Execute shell commands remotely
  • Manage agent sessions (new session, switch models, compact history)
  • All through familiar WeChat conversations

Quick Start

Installation

# Install globally for command-line usage
npm install -g wechat-pi

# Or run directly with npx
npx wechat-pi

Running the Bridge

# Start the bridge with default settings
wechat-pi

# Or development mode (directly from source)
pnpm dev

Authentication

  1. Launch the bridge - it will display a QR code in the terminal
  2. Open WeChat and scan the QR code
  3. Once authenticated, you can start sending messages

Usage

Sending Messages

After authentication, simply send messages to interact with the Pi agent:

Regular Text Messages

Ask questions or give coding instructions:

  • "How do I read a file in Python?"
  • "Create a function that sorts an array"
  • "What does this code do? [paste code]"

Shell Commands

Execute terminal commands (prefix with !):

!ls -la
!git status
!npm test

Special Commands

These commands control the bridge behavior:

| Command | Description | |---------|-------------| | /new | Start a fresh conversation session | | /model [name] | List available models or switch to a specific model | | /compact | Compact conversation history to reduce token usage | | /session | Show session information (file, ID, messages, tokens, model) | | /name [name] | Set or display the session name |

Command Line Options

wechat-pi [options]

Options:
  --no-session      Disable session persistence (in-memory only)
  --session-dir    Custom directory for session storage
  --work-dir       Working directory for the agent (default: current directory)
  --verbose        Enable verbose logging
  --logout         Clear WeChat credentials and exit
  --status         Show bridge status and exit
  --help           Show help information

Development

Prerequisites

  • Node.js >= 16
  • pnpm (recommended) or npm

Setup

# Install dependencies
pnpm install

# Run in development mode
pnpm dev

# Run tests
pnpm test

# Build for production
pnpm build

# Run linter
pnpm lint

Project Structure

wechat-pi/
├── src/
│   ├── bridge.ts    # Main bridge logic
│   ├── cli.ts       # Command-line interface
│   └── types.ts     # TypeScript type definitions
├── dist/            # Compiled JavaScript
├── test/            # Test files
└── package.json    # Package configuration

How It Works

The bridge acts as a mediator between WeChat messages and the Pi agent:

[WeChat] <──> [WeChat Bot] <──> [Bridge] <──> [Pi Agent Session] <──> [AI Models]
  1. Message Receiving: The WeChat bot receives messages from authenticated users
  2. Command Processing: Special commands (/new, /model, !cmd) are handled directly
  3. Agent Interaction: Regular messages are sent to the Pi agent session
  4. Response Delivery: Assistant replies are sent back through WeChat

License

MIT © Jiajun Chen