Introduction¶
Under DSH’s plugin usage, dsh-plugin-wechat provides a WeChat entry. It solves a specific problem: allowing you to trigger DeepSeek Harness (DSH) AI via text messages in WeChat and receive replies that include tools and memory.
If you are already using DSH and wish to have a WeChat entry for queries and text tasks, here are its features, installation commands, and maintenance methods.
What is this¶
Repository name: gnulife/dsh-plugin-wechat.
License: MIT.
One-sentence positioning: Turn DeepSeek Harness (DSH) into a personal WeChat bot — scan code to connect via WeChat, and every WeChat message is replied to by DSH’s AI (with tools and memory).
It uses Tencent’s official ClawBot (iLink) channel and must comply with the “WeChat ClawBot Feature Usage Terms”.
Core Features¶
- Scan code to connect via WeChat.
- Every WeChat message is replied to by DSH’s AI (with tools and memory).
- Supports web search using the
web_searchtool; can be disabled withWECHAT_ENABLE_SEARCH=false. - Currently only supports text messages; other types will receive a “Not supported yet” prompt.
- Supports macOS launchd auto-start on boot and automatic restart after crashes.
- Supports setting
workspace,session mode,force login,mode,enable search,DSH_WEB_PORTvia environment variables or the DSH plugin configuration interface.
Installation and Enablement¶
Start¶
First run:
npx -y dsh-plugin-wechat
After starting, a QR code will appear in the terminal. Scan it with your mobile WeChat to confirm.
Then open:
http://127.0.0.1:3080
Fill in the DeepSeek API Key in “Settings → Model”. After completion, send a text message via WeChat to test the reply.
Daily Usage¶
Re-run the initialization script:
bash scripts/setup.sh
The script is idempotent and can be run repeatedly.
Stop¶
pkill -f "dsh web"
Logs¶
Log directory:
~/.dsh-plugin-wechat/logs/
Typical Usage¶
Switch Account or Re-login¶
Delete local login credentials and re-scan:
rm -rf ~/.dsh/wechat/accounts.json && node scripts/login.js
You can also use:
dsh-wechat-login
Login credentials are saved in:
~/.dsh/wechat/accounts.json
The first login still requires scanning the code once in the terminal.
macOS Auto-start¶
First confirm that you have logged into WeChat:
node scripts/login.js
Install and start the background service:
bash scripts/service.sh install
Check status:
bash scripts/service.sh status
Daily commands:
bash scripts/service.sh status
bash scripts/service.sh start
bash scripts/service.sh stop
bash scripts/service.sh uninstall
This service supports macOS launchd auto-start on boot and automatic restart after crashes.
Specify Working Directory¶
Let the WeChat agent work in a specified directory:
WECHAT_WORKSPACE=/Users/you/my-projects bash scripts/service.sh start
You can also fill in the workspace field in the DSH plugin configuration interface. Modifying the configuration requires restarting DSH to take effect:
bash scripts/service.sh start
Configuration Items¶
Can be set via environment variables or the DSH plugin configuration interface:
WECHAT_WORKSPACE/workspaceWECHAT_SESSION_MODE/session modeWECHAT_FORCE_LOGIN/force loginWECHAT_MODE/modeWECHAT_ENABLE_SEARCH/enable searchDSH_WEB_PORT
Disable web search:
WECHAT_ENABLE_SEARCH=false
Scan Code Network Error¶
If you encounter a network error while scanning, it may be that a proxy tool has hijacked the WeChat domain. You need to add a direct connection rule for the WeChat domain, for example:
prepend-rules:
- DOMAIN-SUFFIX,weixin.qq.com,DIRECT
- DOMAIN-SUFFIX,liteapp.weixin.qq.com,DIRECT
After adding rules, run again:
bash scripts/setup.sh
Applicable Scenarios and Notes¶
Suitable scenarios:
- You want to trigger DSH’s AI via WeChat text messages.
- You want to maintain a passive-reply WeChat bot on your local machine.
- You need auto-start on boot and crash auto-restart on macOS.
Notes:
- Currently only supports text messages; image, voice, etc. will receive a “Not supported yet” prompt.
- It is recommended to only do passive replies, not mass sending or marketing.
- Keep DSH permissions as
workspace-write; do not enabledanger-full-access; the bridge listens on localhost by default. - The plugin runs with the current DSH process permissions; check source code and license before installing.
- For Windows environments, please use Git Bash or WSL.
- Modifying the configuration requires restarting DSH to take effect.
Conclusion¶
The value of dsh-plugin-wechat lies in connecting WeChat text messages to DSH’s AI session, allowing you to complete queries and text tasks within WeChat.
Repository address:
https://github.com/gnulife/dsh-plugin-wechat.git