Culeot
dsh-weixin-bridge
test
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 15, 2026
- Updated
- Aug 15, 2026
Introduction
dsh-weixin-bridge
Chat with your local DeepSeek Harness (DSH) from WeChat. Send a message on your phone; DSH runs it as a real task on your computer (tools, files, commands); the reply comes back to WeChat.
No public IP needed, no desktop WeChat, nothing to install on your phone — it talks through the official WeChat iLink channel (the same API WeChat's own bots use) with a QR-code login.
No API key needed. Replies are produced by your local DSH in agent mode — it reuses the model already configured in DSH. You never paste a DeepSeek/OpenAI key into this tool.
How it works
WeChat message
→ bridge polls the official iLink channel (long-polling)
→ task runs through `dsh --profile headless "message"` (a DSH dialog / agent on your PC)
→ the agent's reply is sent back to WeChat
- Context kept: the bridge remembers the last 20 turns, so the bot keeps one continuous dialog instead of forgetting everything each message.
- Progress feedback: you immediately get "⏳ processing…" and periodic updates while a task runs — no silent waiting.
- Only you: only the WeChat account that scanned the QR code can trigger tasks.
Installation guide (from zero)
- Install Node.js >= 20 — https://nodejs.org
- Install DeepSeek Harness (global, so its
bin.jslives under Node'snode_modules):
Then verify the one-shot mode works:npm install -g @deepseek-ai/dshdsh --profile headless "hi" # should print a reply; if it errors, check the headless profile / your DSH installIf DSH is installed elsewhere, set
DSH_BINto itsdsh/lib/bin.jspath before starting the bridge. - Install this tool:
npm install -g dsh-weixin-bridge # or clone https://github.com/Culeot/dsh-weixin-bridge and npm install - Log in with WeChat (one time):
node login.js # a QR code appears → scan with WeChat → confirm → the bot is linked - Start the bridge:
node bridge.js # logs "bridge started, waiting for WeChat messages" - Test: in WeChat, message the bot — "hi", or "list what's in C:\ai项目". You should get "⏳ processing…" then the reply.
Configuration
Edit the top of bridge.js:
| Constant | Default | Meaning |
|---|---|---|
AGENT_CWD | C:/ai项目 | working directory for agent tasks (change to your own) |
AGENT_TIMEOUT | 300s | per-task timeout |
POLL_INTERVAL | 5s | WeChat poll interval |
MAX_HISTORY | 20 | conversation turns kept for context |
The bot token is saved to account.json after login (git-ignored).
Run at startup (optional)
Register in the registry:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
WeixinBridge = powershell -WindowStyle Hidden -Command "Start-Process node -ArgumentList 'C:\path\to\bridge.js' -WindowStyle Hidden"
Troubleshooting
- Bot doesn't reply: check
bridge.login the project folder; most issues aredsh --profile headlessfailing — run that command manually first. - "找不到 DSH / DSH not found": DSH isn't reachable from this Node — install it globally or set
DSH_BIN. - QR code expired: re-run
node login.js. - Slow replies: headless starts a fresh DSH process per message (cold start takes a few seconds); progress messages tell you it's working.
- Model config: the agent uses whatever model DSH is configured with (set it in DSH, e.g.
deepseek-v4-flash). No key needed here.
Security notes
- Only the account that scanned the QR code can trigger tasks — nobody else's messages are acted on.
- A task can execute commands on the PC. Keep the token private:
account.jsonandbridge.logare git-ignored. - Uses the official WeChat iLink API; no third-party WeChat protocol involved.
Files
| File | Purpose |
|---|---|
bridge.js | the bridge: poll → headless task → reply (with context & progress) |
login.js | QR-code login, saves the bot account |
License
MIT