CLI WeChat Bridge
Drive local Codex, Claude Code, OpenCode and Pi sessions from WeChat, WeCom or Telegram while keeping the native terminal.
- Source repo
- UNLINEARITY/CLI-WeChat-Bridge
- Stars
- ★ 581
- Last updated
- 4d ago 1.5.0
- FARS reviewed
- Nov 08, 2026 +1 new
- License
- AGPL-3.0
- Primary language
- TypeScript
- FA score
- 74/100 · Some gaps
At a glance
- How it runs
- Works with
- Portable with changesCodex · Claude CodeChatGPT (Partial support)
- Cost
- Free software; you pay for model usage
- OS / editors
- macOS per README
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer running Codex or Claude Code in a local terminal who wants to keep sending tasks to the same session from WeChat while away from the desk.
- Not a fit if
- Teams that want to leave the local terminal behind and work only in a chat window
- macOS users who want zero native compilation and will not deal with node-pty build issues
- Users who need ChatGPT.app's bundled private executable, which the bridge will not call
- Website
- unlinearity.github.io/CLI-WeChat-Bridge ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-29latest release 1.5.0 (2026-11-17)
- Source review
- 74/100 · Some gaps
What does this agent do, and when should you use it?
CLI WeChat Bridge is a Node.js (>= 22.13.0) command-line tool that bridges WeChat, WeCom and Telegram messages to locally running Codex, Claude Code, OpenCode and Pi, then syncs local output, approval requests and run status back to the chat channel. It ships setup commands (wechat-setup, wecom-setup, telegram-setup), direct launchers such as wechat-codex and telegram-claude, and resident daemons (wechat-daemon, wecom-daemon, telegram-daemon) that manage multiple CLI slots. The design keeps the local terminal the primary workspace: you still run the native CLI with your own flags, and the chat app is only a remote entry point. State stays session-centric locally, with multi-session bridging, /codex, /claude, /opencode and /pi switching, /confirm approvals, file transfer, and Codex 0.162+ --attach-current-session adoption of a running session. It is dual-licensed under AGPL-3.0-or-later plus a commercial option, and is distributed on npm as cli-wechat-bridge.
The bridge reads messages from WeChat, WeCom or Telegram and forwards them to a local Codex (WebSocket RPC), Claude Code (PTY interaction through node-pty), OpenCode (@opencode-ai/sdk session API) or Pi (native TUI extension), then routes CLI output, approval prompts and status back to the originating channel. wechat-setup performs QR login; wecom-setup opens a long connection via @wecom/aibot-node-sdk and takes Bot ID plus Secret; telegram-setup uses Bot API long polling with a Bot Token, and the latter two require sending /pair <code> in chat to pair the operator. In daemon mode, /codex, /claude, /opencode and /pi switch the active CLI, /all fans one prompt out to every started CLI, /status reports state, /model, /plan, /stop, /reset, /new and /resume control the session, /confirm, /deny and /answer handle approvals and structured questions, and /lang toggles Chinese or English. Files move both ways: inbound chat images and files are saved locally and their paths appended to the prompt, local files can be sent back, and Telegram attachments land in ~/.cli-bridge/telegram/inbound-attachments/. Each daemon also exposes a token-authenticated local IPC endpoint so scripts or web panels can inject text under exactly the same rules as chat messages.
- A developer running Codex or Claude Code in a local terminal who wants to keep sending tasks to the same session from WeChat while away from the desk.
- A team that needs an enterprise-sanctioned channel and uses a WeCom smart bot over WebSocket, with no public callback URL required.
- A Telegram user who creates a bot with @BotFather and drives a local project via telegram-codex.
- Someone working with several CLIs who switches between Codex, Claude Code and OpenCode by sending /codex, /claude or /opencode inside one daemon-bound working directory.
- A builder with a custom web panel or script who uses the daemon's local IPC endpoint to inject text into a CLI with the same semantics as chat.
- A Pi user who lets WeChat, WeCom or Telegram take over the same Pi session through the native TUI extension.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm install -g cli-wechat-bridge@latestnpm install -g cli-wechat-bridge@latest --allow-scripts=cli-wechat-bridge,node-pty
- Runtime
- Node.js 22.13.0+
- Install notes cover
- Windows · macOS · Linux
How do you install or deploy this agent?
Prerequisites: Node.js >= 22.13.0, at least one of Codex, Claude Code, OpenCode or Pi installed in PATH, and one remote channel (WeChat, WeCom or Telegram) ready.
Install globally from npm:
npm install -g cli-wechat-bridge@latestOn Linux you need native build tooling, and recent npm blocks install scripts, so allow them explicitly:
sudo apt install build-essential python3
npm uninstall -g cli-wechat-bridge
npm install -g cli-wechat-bridge@latest --allow-scripts=cli-wechat-bridge,node-ptyOn macOS, run xcode-select --install if compilation fails. On Windows, use Windows 10 1809 or newer, run npm rebuild node-pty if node-pty fails to load, and install the Visual C++ Redistributable. The older package name @unlinearity/cli-wechat-bridge still receives releases for existing users. After installing, wechat-daemon --doctor checks the environment.
How do you use this agent?
Log in or pair the channel you intend to use. WeChat QR login:
wechat-setupFor WeCom, create an API-mode smart bot in the WeCom client (Workbench → Smart Robot) with long-connection mode, then enter its Bot ID and Secret:
wecom-setupFor Telegram, create a bot with @BotFather using /newbot, then enter the token and send /pair <six-digit code> in the bot's private chat within 10 minutes:
telegram-setup
telegram-setup --checkChange into your project directory and launch the CLI you want directly:
cd D:\work\your-project
wechat-codex
wecom-claude
telegram-opencodeFor long-running use with switchable CLIs, start a daemon instead:
wechat-daemon --adapter codex
wecom-daemon --adapter claude --profile work
telegram-daemon --adapter codexTo attach a running Codex session (needs Codex >= 0.162, opens no visible CLI):
telegram-codex --attach-current-session
telegram-codex --attach-current-session --codex-thread-id <id>Then send plain text from WeChat, WeCom or Telegram to submit work. Under a daemon you can also use /codex, /claude, /opencode and /pi to switch, /status to inspect, /confirm or /deny to answer approvals, and /daemon-stop to stop. Send one message from WeChat first after startup so the bridge captures a fresh context_token.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Keeps the local CLI as the primary workspace with native terminal behavior and advanced launch flags; the chat app is only a remote entry point.
- One daemon can switch between Codex, Claude Code, OpenCode and Pi remotely via /codex, /claude, /opencode and /pi, opening or reusing the visible terminal automatically.
- Approvals and structured input work remotely: /confirm and /deny handle requests one at a time, and /answer supports single and multi-question replies like /answer 1=Yes;2=2.
- Bidirectional file transfer: inbound images and files are saved locally and their paths appended to the prompt, with Telegram also accepting video, voice and audio.
- Each daemon exposes a token-authenticated local IPC endpoint so scripts or web panels can inject text under the same rules as chat.
- The Claude Code adapter relies on node-pty PTY interaction; without node-pty it falls back to a compatibility mode where Claude Code may not bridge correctly.
- A daemon is bound to its start-up working directory, and switching directories from the remote channel is not supported.
- It only invokes standalone CLIs available in PATH, and will not discover or call private executables bundled inside apps such as ChatGPT.app.
- Version gates stack up: Codex --attach-current-session needs Codex >= 0.162, and Pi 0.85.0+ requires Node.js >= 22.19.0.
- After a cold start or long idle, sending from the local terminal first can fail on WeChat because the context_token has expired; you must send a message from WeChat first.
How does this agent compare with similar options?
The README names earlier reference work: openclaw-weixin (an early WeChat / Claude Code Channel project) and the @tencent-weixin/openclaw-weixin npm package from the Tencent WeChat team. Unlike those single-channel references, this project covers Codex, Claude Code, OpenCode and Pi together and unifies three remote entry points — WeChat, WeCom and Telegram.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| CLI WeChat Bridge This agent | 74 · Some gaps | CLIFree + model costs | ★ 581 | 4d ago | TypeScript | Codex · Claude Code |
| Alethe — Multi-Agent Coding Workspace | 70 · Some gaps | Desktop appFree + model costs | ★ 1.3k | 2d ago | TypeScript | Codex · Claude Code |
| Pairfob | 66 · Some gaps | — | ★ 188 | 2d ago | TypeScript | Codex · Claude Code |
| Reemoat | 72 · Some gaps | — | ★ 31 | 2d ago | TypeScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The materials say local CLIs run with the launching user's permissions; Pi runs with full permissions and --approve and adds no approval layer, so least privilege is weak (1). Approval rules for Codex, Claude, and OpenCode, strict mode, and item-by-item remote decisions support a stronger user-confirmation score (2). The README, configuration, and troubleshooting docs describe credentials, attachments, state directories, and message flows, but the code sample does not show encryption, access controls, or the full data lifecycle (data flow 2; sensitive data 2). Dependencies are listed and CI uses a lockfile with version overrides, but there is no audit or vulnerability-response evidence (1). Remote commands, CLI launches, network channels, and approval rules for external actions are documented (2). Failed-message storage, retries, and session recovery provide partial rollback paths (2). Repository metadata and file headers identify author and source, but publisher identity is unknown under the prompt, so no brand credit is given (attribution 2).
The README, AGENTS file, configuration, and package metadata mostly agree on Node versions, channels, adapters, and daemon modes, supporting consistency (2), with some friction from concurrent names and compatibility packages. Node/Bun, native PTY, external CLI, and network requirements and fallback behavior are described (dependency availability 2). Troubleshooting gives log keywords, doctor commands, and concrete failure cases, but this sample does not include the full runtime error-handling implementation (failure messages 2).
The README clearly describes local-terminal-first remote use, multiple CLIs, workspaces, and three messaging channels (3). Command applicability, Pi approval differences, attachment parsing limits, Codex attach prerequisites, and restrictions are explicit (3). The skill scopes itself to Codex TUI and the current session, excludes other CLIs and embedded sessions, and the README distinguishes launcher from attach workflows (3). Cross-platform and version guidance is detailed, though use still depends on external CLIs, Node, networking, and native build tools (2).
Documentation is divided into navigation, configuration, architecture, development, troubleshooting, and release material (3). Installation, upgrades, platform-specific PTY issues, and doctor checks are well documented (3). The project is moving from cli-wechat-bridge to cli-chat-bridge while retaining two old package names; compatibility guidance exists, but naming stability is limited (1). Command tables, examples, progressive modes, and extensive troubleshooting are concrete (3). Known limits are disclosed (3). The license file, package metadata, and README consistently state AGPL-3.0-or-later (3). The package is version 1.4.1 and the README points to release notes, but the supplied material omits the actual change entries (2). AGENTS documents project structure and release/contribution processes, and package metadata provides repository and issue paths; the publisher is unverified and no separate accountable maintainer is identified (2).
Remote messaging, approvals, status, session recovery, file transfer, and multi-window controls form usable workflows with many command examples (output usability 3). Connecting messaging channels to local native CLIs while retaining sessions and terminal workflows shows clear added value (3). That value comes with setup and upkeep costs for Node/CLIs, credentials, a resident daemon, networking, and native platform dependencies; the materials do not quantify costs or offer a lightweight deployment path (2).
The README's main claims can be partly traced to package commands, configuration, the skill, and test samples, but most implementation is outside the supplied sample (2). Package metadata, CI, configuration, and tests corroborate some capabilities, but do not cover the full product (2). Documentation distinguishes current behavior, conditional limits, and experimental features; test and CI files show configured automation only and do not establish that anything was run for this review. The boundary between documented facts and inference is generally clear (2).
- Pi runs with the launcher's local permissions and full access; --approve trusts project configuration and is not per-tool approval. Choose the working directory and Pi configuration carefully before remote access.
- The bridge stores WeChat, WeCom, or Telegram credentials and receives attachments locally; CLI child processes inherit the current terminal environment. Protect the data directory and credentials, and consider sensitive environment variables.
- This assessment uses only the supplied static sample. No execution, npm package verification, or publisher identity verification was performed; files not supplied remain unknown.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
> 中文说明 / Chinese release notes: [1.5.0_CN.md](https://github.com/UNLINEARITY/CLI-WeChat-Bridge/blob/1.5.0/docs/releases/1.5.0_CN.md) Version 1.5.0 Release Date: November 17, 2026 Overview Version 1.5.0 adds task delegation between CLIs managed by the same daemon. Codex can ask Claude Code to review a change, or start an independent session for a separate task. Task status, results, and approval requests appear in WeChat, WeCom, or Telegram, where you can follow the work and respond when needed. …View on GitHub ↗ -
Release notes excerpt
> 中文说明 / Chinese release notes: [1.4.1_CN.md](https://github.com/UNLINEARITY/CLI-WeChat-Bridge/blob/1.4.1/docs/releases/1.4.1_CN.md) Version 1.4.1 Release Date: October 21, 2026 Overview Version 1.4.1 includes the approval and question changes introduced in 1.4.0, plus Windows compatibility and first-run logging fixes. The 1.4 series changes how approvals and questions are handled from WeChat, WeCom, and Telegram. …View on GitHub ↗ -
Release notes excerpt
> 中文说明 / Chinese release notes: [1.3.0_CN.md](https://github.com/UNLINEARITY/CLI-WeChat-Bridge/blob/1.3.0/docs/releases/1.3.0_CN.md) Version 1.3.0 Release Date: October 20, 2026 Overview Version 1.3.0 is the largest release of CLI WeChat Bridge so far, and it has two parts that build on each other. …View on GitHub ↗
FAQ
Does using this cost anything?
What permissions does it have over my files and commands?
I already have a Codex session running locally — can I attach it?
What can't I do from the remote channel?
Which systems are supported, and where does installation usually break?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.