UNLINEARITY/CLI-WeChat-Bridge

将 AI 命令行工具以最为原生的方式,集成到微信 ClawBot 中,目前支持集成 Codex、Claude Code、OpenCode、Pi Agent。 支持微信和本地终端线程(thread/session)共享、双向对话,支持将本地文件传输至微信,微信也支持发送文件到终端。现已支持多 cli 切换、微信表情绑定指令、双向 /resume 对话恢复。

What it solves

This project allows users to remotely interact with AI coding assistants that run locally in a terminal. It bridges the gap between a local development environment and WeChat, enabling users to send requests to their local AI tools and receive outputs, status updates, and permission requests (approvals) on their mobile device without needing to migrate to a web interface or a hosted bot.

How it works

The tool acts as a bridge between the WeChat messaging platform and several local CLI-based AI agents. It supports bridging to Codex, Claude Code, OpenCode, and Pi. The system maintains the local terminal as the primary interface, while WeChat serves as a remote input/output channel. It uses node-pty for terminal emulation and supports a daemon mode for long-term connectivity and switching between different AI adapters.

Who it’s for

Developers who prefer using native CLI tools (like Claude Code or Codex) for their primary workflow but want the ability to send commands and monitor AI agent progress from their phone via WeChat while away from their computer.

Highlights

  • Multi-Agent Support: Bridges to Codex, Claude Code, OpenCode, and Pi.
  • Remote Approvals: Handle CLI permission requests (confirm/deny) directly from WeChat.
  • Daemon Mode: Maintain a persistent connection and switch between different AI tools using WeChat commands (e.g., /claude, /codex).
  • Emoji Bindings: Map specific WeChat emojis to common commands like /confirm or /stop for faster interaction.
  • File Transfer: Supports sending files from WeChat to the local CLI for the AI to parse, and sending local files back to WeChat.
  • Workspace Isolation: Uses the current directory as the workspace, ensuring that different project directories remain isolated.

Related

  • Project
  • Project
  • Project
  • Project
  • Project