← all repositories
huohuoer/wechat-cli

Prying open WeChat’s local vault for terminal-dwelling AI agents

Scans running WeChat process memory to extract SQLCipher keys, then exposes your chat database as a JSON-first CLI designed for AI agent consumption.

wechat-cli
Velocity · 7d
+13
★ / day
Trend
accelerating
star history

What it does WeChat CLI reads your locally stored WeChat data—chats, contacts, favorites, group members—without ever touching a remote server. It extracts the SQLCipher encryption key by scanning the running WeChat process’s memory, then decrypts the SQLite database on-the-fly to answer queries. Output is JSON by default, though you can ask for Markdown or plain text if you’re still human.

The interesting bit The project is essentially a polished wrapper around wechat-decrypt, but its real trick is positioning itself as an AI agent tool rather than a manual forensics utility. It expects to be driven by Claude Code or OpenClaw, offering commands like new-messages that maintain incremental state for automation loops.

Key highlights

  • Scans process memory and re-signs the WeChat macOS app with required entitlements if needed to grab decryption keys.
  • All decryption happens locally with AES-256-CBC; no data leaves the machine.
  • Eleven query commands including search by message type (text, image, file, call), chat statistics, and time-range exports.
  • Bundles a native macOS arm64 binary via npm; Windows and Linux rely on pip or source installs.
  • Explicitly read-only: it queries the local SQLite files but does not send, modify, or delete messages.

Caveats

  • Version compatibility is narrow: the README specifies WeChat for Mac ≤ 4.1.8.100, and newer versions may break key extraction.
  • macOS setup can require sudo, Full Disk Access for your terminal, and potentially re-signing WeChat’s entitlements, which the authors note may disrupt WeChat’s auto-updater.
  • The core decryption and parsing logic comes from the upstream wechat-decrypt project; this repo adds the CLI interface and AI-agent packaging.

Verdict Worth a look if you want your local AI coding agent to have context from your actual WeChat conversations without cloud-privacy gymnastics. Skip it if you’re on an unsupported WeChat version or unwilling to tamper with app entitlements.

Frequently asked

What is huohuoer/wechat-cli?
Scans running WeChat process memory to extract SQLCipher keys, then exposes your chat database as a JSON-first CLI designed for AI agent consumption.
Is wechat-cli open source?
Yes — huohuoer/wechat-cli is open source, released under the Apache-2.0 license.
How popular is wechat-cli?
huohuoer/wechat-cli has 1.7k stars on GitHub and is currently accelerating.
Where can I find wechat-cli?
huohuoer/wechat-cli is on GitHub at https://github.com/huohuoer/wechat-cli.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.