π¦ chatpack
Feed your chat history to LLMs. Compress exports 13x with CSV format.
Platforms: Windows β’ macOS β’ Linux
The Problem
You want to ask Claude/ChatGPT about your conversations, but:
- Raw exports are 80% metadata noise
- JSON structure wastes tokens on brackets and keys
- Context windows are expensive
The Solution
βββββββββββββββββββ ββββββββββββ βββββββββββββββββββ
β Telegram JSON β β β β Clean CSV β
β WhatsApp TXT β βββΆβ chatpack β βββΆβ Ready for LLM β
β Instagram JSON β β β β 13x less tokens β
βββββββββββββββββββ ββββββββββββ βββββββββββββββββββ
Real Numbers
| Format | Input (Telegram JSON) | Output | Savings |
|---|---|---|---|
| CSV | 11.2M tokens | 850K tokens | 92% (13x) π₯ |
| JSONL | 11.2M tokens | 1.0M tokens | 91% (11x) |
| JSON | 11.2M tokens | 1.3M tokens | 88% (8x) |
π‘ Use CSV for maximum token savings. JSONL is good for RAG pipelines. JSON keeps full structure but wastes tokens.
Use Cases
π¬ Chat with your chat history
# Paste into ChatGPT: "Based on this conversation, what did we decide about...?"
π Build RAG pipeline
# Each line = one document with timestamp for vector DB
π Analyze conversations
# Filter and export specific messages
Features
- π Fast β 20K+ messages/sec
- π± Multi-platform β Telegram, WhatsApp, Instagram
- π Smart merge β Consecutive messages from same sender β one entry
- π― Filters β By date, by sender
- π Formats β CSV (13x compression), JSON, JSONL (for RAG)
- π Library β Use as Rust crate in your projects
Installation
Pre-built binaries
| Platform | Download |
|---|---|
| Windows | chatpack-windows-x64.exe |
| macOS (Intel) | chatpack-macos-x64 |
| macOS (Apple Silicon) | chatpack-macos-arm64 |
| Linux | chatpack-linux-x64 |
Via Cargo
As a library
[]
= "0.2"
Quick Start (CLI)
# Telegram
# WhatsApp
# Instagram
Output: optimized_chat.csv β ready to paste into ChatGPT/Claude.
Library Usage
Basic example
use *;
Auto-detect format
use parse_auto;
// Automatically detects Telegram, WhatsApp, or Instagram
let messages = parse_auto?;
Filter messages
use *;
let parser = create_parser;
let messages = parser.parse?;
// Filter by sender
let config = new
.with_user;
let alice_only = apply_filters;
// Filter by date range
let config = new
.after_date?
.before_date?;
let filtered = apply_filters;
Output formats
use *;
let messages = vec!;
// Minimal output (sender + content only)
let config = new;
// Full metadata (timestamps, IDs, replies, edits)
let config = all;
// Custom selection
let config = new
.with_timestamps
.with_ids;
// Write to different formats
write_json?;
write_jsonl?;
write_csv?;
Processing statistics
use *;
let original_count = messages.len;
let merged = merge_consecutive;
let stats = new;
println!;
println!;
π Full API documentation: docs.rs/chatpack
CLI Reference
# Output formats
# Filters
# Metadata
# Other options
Documentation
| Guide | Description |
|---|---|
| π€ Export Guide | How to export from Telegram, WhatsApp, Instagram |
| π Usage Guide | All commands, flags, filters, formats |
| π Benchmarks | Performance stats and compression metrics |
| π§ͺ Stress Testing | Generate toxic data and run stress tests |
| π API Docs | Full library documentation |
Supported Platforms
| Source | Format | Features |
|---|---|---|
| Telegram | JSON | IDs, timestamps, replies, edits |
| TXT | Auto-detect locale (US/EU/RU), multiline | |
| JSON | Mojibake fix, empty message filter |
Performance
| Metric | Value |
|---|---|
| Speed | 20-50K messages/sec |
| CSV compression | 13x (92% token reduction) |
| Tested file size | 500MB+ |