
Multi-Account WeChat Publishing for Agents
Named accounts, an explicit selection chain, and a discovery command that never prints secrets.
Multi-Account WeChat Publishing for Agents
One machine, several official accounts: name each account in config, then make the target explicit on every side effect. Full reference.
Config
wechat:
default_account: main
accounts:
main:
appid: wx1234567890abcdef
secret: your_main_secret
client-a:
appid: wx0987654321fedcba
secret: your_client_secretAccount names must match ^[a-z0-9][a-z0-9_-]{0,63}$.
Selection is explicit
The chain is: --wechat-account flag → WECHAT_ACCOUNT env → wechat.default_account → direct wechat.appid/secret → the single named account. Multiple accounts without a default fail closed with WECHAT_ACCOUNT_AMBIGUOUS instead of guessing.
Discovery without secrets
md2wechat config wechat-accounts --jsonReturns accounts[{name, appid, current}] and default_account. It never outputs secrets — not even masked.
Per-command targeting
md2wechat convert article.md --draft --cover cover.jpg --wechat-account client-aThe API key boundary
Named accounts and fixed-egress proxy mode require a valid MD2WECHAT_API_KEY, validated via HEAD /api/auth/validate before any side effect. The legacy single-account path keeps working without one. See Whitelist for the egress story and Publishing API for the draft flow.
More Posts

md2wechat 3.x for Agents: What Changed
From the 3.0 single-source layout catalog through 3.2 preflight and the official OpenClaw installer to 3.4 subject-reference images.

WeChat IP Whitelist Errors and the Fixed Egress Fix
Why the ip-not-in-whitelist error appears, how to clear it in three steps, and when a fixed egress proxy is the right answer.

md2wechat 2.0.6: You Can Now Install It with npm
A practical release note for md2wechat 2.0.6, focused on npm installation, shared GitHub Release binaries, checksum verification, and why this matters for Claude Code, Codex, OpenCode, and other agent workflows.
Newsletter
Join the community
Subscribe to our newsletter for the latest news and updates