chatlog  by sjzar

CLI tool for local chat data access

created 4 months ago
7,443 stars

Top 7.1% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a tool for accessing and utilizing personal chat logs, primarily WeChat data, for AI integration and analysis. It targets users who want to leverage their own chat history with AI assistants or for personal data management. The benefit is easy, local access and processing of chat data, including multimedia, with AI-friendly protocols.

How It Works

Chatlog extracts data directly from local WeChat database files. It supports automatic decryption of chat data, including multimedia like images and voice messages (transcoded to MP3). The tool offers a Terminal UI, a command-line interface, and an HTTP API for querying chat logs, contacts, and group chats. A key feature is its support for the MCP SSE protocol, enabling seamless integration with AI assistants that support this standard.

Quick Start & Requirements

  • Install: Download pre-compiled binaries from the Releases page or use go install github.com/sjzar/chatlog@latest.
  • Run: Execute chatlog to start the Terminal UI. Use chatlog key to get the WeChat data key, chatlog decrypt to decrypt databases, and chatlog server to start the HTTP service.
  • Prerequisites:
    • macOS users may need to temporarily disable System Integrity Protection (SIP) to obtain the encryption key.
    • Ensure WeChat, chatlog, and the terminal are not running under Rosetta on Apple Silicon.
    • For Windows, using Windows Terminal is recommended for display issues.
  • Docs: MCP 集成指南, Prompt 指南

Highlighted Details

  • Supports WeChat versions 3.x and 4.0.
  • Real-time decryption of encrypted images and transcoding of SILK voice messages to MP3.
  • HTTP API supports filtering by time, talker (wxid, group ID, nickname), and pagination.
  • MCP SSE endpoint (/sse) for direct integration with AI assistants like ChatWise and Cherry Studio.

Maintenance & Community

The project is maintained by sjzar. It acknowledges contributions from other open-source projects like wechat-dump-rs and PyWxDump, and Anthropic for the MCP protocol. Discussions are encouraged for sharing prompts and usage tips.

Licensing & Compatibility

Licensed under Apache-2.0. The project states it does not collect user data, with all processing done locally. Use with third-party LLM services requires adherence to their terms.

Limitations & Caveats

The project is intended for personal, legal use with data the user owns or is authorized to access. Unauthorized access or use for illegal purposes is strictly prohibited, and the developer disclaims liability for misuse.

Health Check
Last commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
16
Star History
4,485 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.