jackwener/wx-cli-again
WeChat local data CLI (query/decrypt/export) — fresh start from wx-cli
What it solves
wx-cli provides a way to query and export local WeChat data (sessions, chat history, contacts, and moments) directly from the command line. It solves the problem of accessing encrypted local WeChat databases without requiring the user to disable System Integrity Protection (SIP) on macOS or manually decrypt entire databases.
How it works
The tool consists of a CLI and a background daemon. It uses a memory scanning technique and LLDB hooks to extract the necessary AES-256-CBC keys from the running WeChat process. Once keys are obtained, the daemon opens the SQLCipher-encrypted databases. To ensure high performance, it implements a caching system that tracks file modification times (mtime) to reuse decrypted data and avoid redundant decryption cycles.
Who it’s for
- Power users and developers who want to programmatically access their own WeChat data.
- AI Agent developers who want to give agents (like Claude Code or Cursor) the ability to read a user's local chat history for context.
- Data archivists looking to export their chat logs into formats like Markdown or JSON.
Highlights
- AI-Ready Output: Returns data wrapped in metadata (freshness, source info) specifically designed for consumption by AI agents.
- Zero Dependencies: Distributed as a single Rust binary for easy installation across macOS, Linux, and Windows.
- Local-First: All decryption and data processing happen on the local machine; no data is uploaded to external servers.
- Comprehensive Extraction: Supports querying chat history, unread messages, official account articles, and even decrypting image attachments from
.datfiles.
Related
- Project
- Project
- Project
- Project