[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74641":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},74641,"weclaw","fastclaw-ai\u002Fweclaw","fastclaw-ai","Connect to any agents with WeChat ClawBot.","",null,"Go",1496,184,4,30,0,7,19,79,21,19.8,"MIT License",false,"main",[26,27,28,29,5,30],"clawbot","openclaw","openclaw-weixin","wechat-clawbot","weixin-agent-sdk","2026-06-12 02:03:26","# WeClaw\n\n[中文文档](README_CN.md)\n\nWeChat AI Agent Bridge — connect WeChat to AI agents (Claude, Codex, Gemini, Kimi, etc.).\n\n> This project is inspired by [@tencent-weixin\u002Fopenclaw-weixin](https:\u002F\u002Fnpmx.dev\u002Fpackage\u002F@tencent-weixin\u002Fopenclaw-weixin). For personal learning only, not for commercial use.\n\n| | | |\n|:---:|:---:|:---:|\n| \u003Cimg src=\"previews\u002Fpreview1.png\" width=\"280\" \u002F> | \u003Cimg src=\"previews\u002Fpreview2.png\" width=\"280\" \u002F> | \u003Cimg src=\"previews\u002Fpreview3.png\" width=\"280\" \u002F> |\n\n## Quick Start\n\n```bash\n# One-line install\ncurl -sSL https:\u002F\u002Fraw.githubusercontent.com\u002Ffastclaw-ai\u002Fweclaw\u002Fmain\u002Finstall.sh | sh\n\n# Start (first run will prompt QR code login)\nweclaw start\n```\n\nThat's it. On first start, WeClaw will:\n1. Show a QR code — scan with WeChat to login\n2. Auto-detect installed AI agents (Claude, Codex, Gemini, etc.)\n3. Save config to `~\u002F.weclaw\u002Fconfig.json`\n4. Start receiving and replying to WeChat messages\n\nUse `weclaw login` to add additional WeChat accounts.\n\n### Other install methods\n\n```bash\n# Via Go\ngo install github.com\u002Ffastclaw-ai\u002Fweclaw@latest\n\n# Via Docker\ndocker run -it -v ~\u002F.weclaw:\u002Froot\u002F.weclaw ghcr.io\u002Ffastclaw-ai\u002Fweclaw start\n```\n\n## How It Works\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"previews\u002Farchitecture.png\" width=\"600\" \u002F>\n\u003C\u002Fp>\n\n**Agent modes:**\n\n| Mode | How it works | Examples |\n|------|-------------|----------|\n| ACP  | Long-running subprocess, JSON-RPC over stdio. Fastest — reuses process and sessions. | Claude, Codex, Kimi, Gemini, Cursor, OpenCode, OpenClaw |\n| CLI  | Spawns a new process per message. Supports session resume via `--resume`. | Claude (`claude -p`), Codex (`codex exec`) |\n| HTTP | OpenAI-compatible chat completions API. | OpenClaw (HTTP fallback) |\n\nAuto-detection picks ACP over CLI when both are available.\n\n## Chat Commands\n\nSend these as WeChat messages:\n\n| Command | Description |\n|---------|-------------|\n| `hello` | Send to default agent |\n| `\u002Fcodex write a function` | Send to a specific agent |\n| `\u002Fcc explain this code` | Send to agent by alias |\n| `\u002Fclaude` | Switch default agent to Claude |\n| `\u002Fcwd \u002Fpath\u002Fto\u002Fproject` | Switch workspace directory |\n| `\u002Fnew` | Start a new conversation (clear session) |\n| `\u002Finfo` | Show current agent info |\n| `\u002Fhelp` | Show help message |\n\n### Aliases\n\n| Alias | Agent |\n|-------|-------|\n| `\u002Fcc` | claude |\n| `\u002Fcx` | codex |\n| `\u002Fcs` | cursor |\n| `\u002Fkm` | kimi |\n| `\u002Fgm` | gemini |\n| `\u002Focd` | opencode |\n| `\u002Foc` | openclaw |\n\nYou can also define custom aliases per agent in config:\n\n```json\n{\n  \"agents\": {\n    \"claude\": {\n      \"type\": \"acp\",\n      \"aliases\": [\"ai\", \"c\"]\n    }\n  }\n}\n```\n\nThen `\u002Fai hello` or `\u002Fc hello` will route to claude.\n\nSwitching default agent is persisted to config — survives restarts.\n\n## Media Messages\n\nWeClaw supports sending images, videos, files, and voice messages to\u002Ffrom WeChat.\n\n**Voice messages:** When you send a voice message in WeChat, WeClaw automatically uses WeChat's speech-to-text transcription and forwards the text to the AI agent. Duplicate voice message events are automatically deduplicated.\n\n**From agent replies:** When an AI agent returns markdown with images (`![](url)`), WeClaw automatically extracts the image URLs, downloads them, uploads to WeChat CDN (AES-128-ECB encrypted), and sends them as image messages.\n\n**Markdown handling:** Agent responses are automatically converted from markdown to plain text for WeChat display — code fences are stripped, links show display text only, bold\u002Fitalic markers are removed, etc.\n\n## Proactive Messaging\n\nSend messages to WeChat users without waiting for them to message first.\n\n**CLI:**\n\n```bash\n# Send text\nweclaw send --to \"user_id@im.wechat\" --text \"Hello from weclaw\"\n\n# Send image\nweclaw send --to \"user_id@im.wechat\" --media \"https:\u002F\u002Fexample.com\u002Fphoto.png\"\n\n# Send text + image\nweclaw send --to \"user_id@im.wechat\" --text \"Check this out\" --media \"https:\u002F\u002Fexample.com\u002Fphoto.png\"\n\n# Send file\nweclaw send --to \"user_id@im.wechat\" --media \"https:\u002F\u002Fexample.com\u002Freport.pdf\"\n```\n\n**HTTP API** (runs on `127.0.0.1:18011` when `weclaw start` is running):\n\n```bash\n# Send text\ncurl -X POST http:\u002F\u002F127.0.0.1:18011\u002Fapi\u002Fsend \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"to\": \"user_id@im.wechat\", \"text\": \"Hello from weclaw\"}'\n\n# Send image\ncurl -X POST http:\u002F\u002F127.0.0.1:18011\u002Fapi\u002Fsend \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"to\": \"user_id@im.wechat\", \"media_url\": \"https:\u002F\u002Fexample.com\u002Fphoto.png\"}'\n\n# Send text + media\ncurl -X POST http:\u002F\u002F127.0.0.1:18011\u002Fapi\u002Fsend \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"to\": \"user_id@im.wechat\", \"text\": \"See this\", \"media_url\": \"https:\u002F\u002Fexample.com\u002Fphoto.png\"}'\n```\n\nSupported media types: images (png, jpg, gif, webp), videos (mp4, mov), files (pdf, doc, zip, etc.).\n\nSet `WECLAW_API_ADDR` to change the listen address (e.g. `0.0.0.0:18011`).\n\n## Configuration\n\nConfig file: `~\u002F.weclaw\u002Fconfig.json`\n\n```json\n{\n  \"default_agent\": \"claude\",\n  \"agents\": {\n    \"claude\": {\n      \"type\": \"acp\",\n      \"command\": \"\u002Fusr\u002Flocal\u002Fbin\u002Fclaude-agent-acp\",\n      \"env\": {\n        \"ANTHROPIC_API_KEY\": \"sk-ant-xxx\"\n      },\n      \"model\": \"sonnet\"\n    },\n    \"codex\": {\n      \"type\": \"acp\",\n      \"command\": \"\u002Fusr\u002Flocal\u002Fbin\u002Fcodex-acp\",\n      \"env\": {\n        \"OPENAI_API_KEY\": \"sk-xxx\"\n      }\n    },\n    \"openclaw\": {\n      \"type\": \"http\",\n      \"endpoint\": \"https:\u002F\u002Fapi.example.com\u002Fv1\u002Fchat\u002Fcompletions\",\n      \"api_key\": \"sk-xxx\",\n      \"model\": \"openclaw:main\"\n    }\n  }\n}\n```\n\nEnvironment variables:\n- `WECLAW_DEFAULT_AGENT` — override default agent\n- `OPENCLAW_GATEWAY_URL` — OpenClaw HTTP fallback endpoint\n- `OPENCLAW_GATEWAY_TOKEN` — OpenClaw API token\n\nCustom agent CLI environment variables:\n\n```json\n{\n  \"default_agent\": \"...\",\n  \"agents\": {\n    \"...\": {\n      ...\n      \"env\": {\n        \"ENV_NAME\": \"ENV_VALUE\"\n      }\n    },\n  }\n}\n```\n\n### Permission bypass\n\nBy default, some agents require interactive permission approval which doesn't work in WeChat. Add `args` to your agent config to bypass:\n\n| Agent | Flag | What it does |\n|-------|------|-------------|\n| Claude (CLI) | `--dangerously-skip-permissions` | Skip all tool permission prompts |\n| Codex (CLI) | `--skip-git-repo-check` | Allow running outside git repos |\n\nExample:\n\n```json\n{\n  \"claude\": {\n    \"type\": \"cli\",\n    \"command\": \"\u002Fusr\u002Flocal\u002Fbin\u002Fclaude\",\n    \"cwd\": \"\u002Fhome\u002Fuser\u002Fmy-project\",\n    \"args\": [\"--dangerously-skip-permissions\"]\n  },\n  \"codex\": {\n    \"type\": \"cli\",\n    \"command\": \"\u002Fusr\u002Flocal\u002Fbin\u002Fcodex\",\n    \"cwd\": \"\u002Fhome\u002Fuser\u002Fmy-project\",\n    \"args\": [\"--skip-git-repo-check\"]\n  }\n}\n```\n\nSet `cwd` to specify the agent's working directory (workspace). If omitted, defaults to `~\u002F.weclaw\u002Fworkspace`.\n\n> **Warning:** These flags disable safety checks. Only enable them if you understand the risks. ACP agents handle permissions automatically and don't need these flags.\n\n## Background Mode\n\n```bash\n# Start (runs in background by default)\nweclaw start\n\n# Check if running\nweclaw status\n\n# Stop\nweclaw stop\n\n# Run in foreground (for debugging)\nweclaw start -f\n```\n\nLogs are written to `~\u002F.weclaw\u002Fweclaw.log`.\n\n### System service (auto-start on boot)\n\n**macOS (launchd):**\n\n```bash\ncp service\u002Fcom.fastclaw.weclaw.plist ~\u002FLibrary\u002FLaunchAgents\u002F\nlaunchctl load ~\u002FLibrary\u002FLaunchAgents\u002Fcom.fastclaw.weclaw.plist\n```\n\n**Linux (systemd):**\n\n```bash\nsudo cp service\u002Fweclaw.service \u002Fetc\u002Fsystemd\u002Fsystem\u002F\nsudo systemctl enable --now weclaw\n```\n\n## Docker\n\n```bash\n# Build\ndocker build -t weclaw .\n\n# Login (interactive — scan QR code)\ndocker run -it -v ~\u002F.weclaw:\u002Froot\u002F.weclaw weclaw login\n\n# Start with HTTP agent\ndocker run -d --name weclaw \\\n  -v ~\u002F.weclaw:\u002Froot\u002F.weclaw \\\n  -e OPENCLAW_GATEWAY_URL=https:\u002F\u002Fapi.example.com \\\n  -e OPENCLAW_GATEWAY_TOKEN=sk-xxx \\\n  weclaw\n\n# View logs\ndocker logs -f weclaw\n```\n\n> Note: ACP and CLI agents require the agent binary inside the container.\n> The Docker image ships only WeClaw itself. For ACP\u002FCLI agents, mount\n> the binary or build a custom image. HTTP agents work out of the box.\n\n## Release\n\n```bash\n# Tag a new version to trigger GitHub Actions build & release\ngit tag v0.1.0\ngit push origin v0.1.0\n```\n\nThe workflow builds binaries for `darwin\u002Flinux\u002Fwindows` x `amd64\u002Farm64`, creates a GitHub Release, and uploads all artifacts with checksums.\n\n## Update\n\n```bash\n# Update to the latest version (auto-restarts if running)\nweclaw update\n\n# Check current version\nweclaw version\n```\n\n## Development\n\n```bash\n# Hot reload\nmake dev\n\n# Build\ngo build -o weclaw .\n\n# Run\n.\u002Fweclaw start\n```\n\n## Contributors\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ffastclaw-ai\u002Fweclaw\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=fastclaw-ai\u002Fweclaw\" \u002F>\n\u003C\u002Fa>\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=fastclaw-ai\u002Fweclaw&type=Timeline)](https:\u002F\u002Fstar-history.com\u002F#fastclaw-ai\u002Fweclaw&Timeline)\n\n## License\n\n[MIT](LICENSE)\n","WeClaw 是一个连接微信与AI代理（如Claude、Codex、Gemini等）的桥梁。其核心功能包括通过扫描二维码登录微信，自动检测并连接已安装的AI代理，并支持多种消息类型如文本、图片、视频和语音。技术上，WeClaw使用Go语言开发，支持ACP、CLI及HTTP三种模式与AI代理交互，其中ACP模式性能最优。适用于希望将个人微信聊天与先进AI助手集成以提升沟通效率或进行个性化学习的研究者和个人用户。项目遵循MIT许可证，适合非商业用途下的探索和学习。",2,"2026-06-11 03:50:15","high_star"]