wx-cli-wechat-local-data

Query and export local WeChat messages, contacts, and moments from the command line.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/devtools-skills --skill wx-cli-wechat-local-data-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: wx-cli-wechat-local-data
Source: https://github.com/reason-machines/devtools-skills/tree/main/skills/wx-cli-wechat-local-data
Command: npx skills add https://github.com/reason-machines/devtools-skills --skill wx-cli-wechat-local-data-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @jackwener/wx-cli.

What problem does it solve? Accessing your own WeChat chat history, contacts, and moments outside the app is difficult because the data is locked in encrypted local databases. This Skill lets you search, query, and export that data directly from the command line as structured JSON, without any network calls. ## Core Features & Use Cases - Message Search & History: Search all messages by keyword, filter by contact, group, or date range, and retrieve incremental updates with new-messages. - Contacts, Moments & Articles: List contacts and group members, browse moments feeds and notifications, and read public account articles. - Attachment Extraction & Export: Decode encrypted image attachments (.dat files) and export full conversations to text or JSON. - Use Case: Ask your AI agent to check whether a specific contact mentioned a contract in the last week; the agent runs a single wx search command and returns matching messages with timestamps and senders. ## Quick Start Ask the AI to search your local WeChat chat history for a keyword from a specific contact within a date range and show the matching messages.

Frequently Asked Questions about wx-cli-wechat-local-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search my WeChat chat history from the command line?▼

Run `wx search "keyword"` after installing wx-cli and completing one-time initialization with `wx init`. You can filter by contact with `--in`, by date with `--since` and `--until`, and get structured JSON output with `--json`.

How to export WeChat conversations to JSON or text files?▼

Use `wx export "contact-name" -o chat.json --format json` to export a conversation to JSON, or omit the format flag for plain text. Date ranges can be limited with `--since` and `--until` options.

Does wx-cli work on macOS, Windows, and Linux?▼

Yes, wx-cli supports all three platforms via npm, curl, or PowerShell installers. macOS requires ad-hoc re-signing of WeChat and TCC resets, Windows requires Administrator privileges, and Linux image extraction lacks V2 decoder support.

Why does wx-cli show unknown_shards or stale data warnings?▼

The unknown_shards warning appears when WeChat creates new message database files after initialization. Run `wx init --force` to re-scan WeChat memory and refresh the daemon's cached decrypted databases.

Can wx-cli extract images from WeChat conversations?▼

Yes, list image attachments with `wx attachments "chat-name" --kind image`, then decode a specific .dat file using `wx extract <attachment_id> -o output.jpg`. It supports legacy XOR, V1 AES, and V2 decoders depending on platform.

Does wx-cli send my WeChat data to external servers?▼

No, wx-cli operates fully locally with no network calls. It reads WeChat's local databases, decrypts them in a background daemon, and returns results directly to your terminal as JSON.