Overview
ChatLab is an open-source desktop application for analysing your own conversation history. It imports chat exports, normalizes the different formats into one data model, stores them locally, and then lets you interrogate them two ways: directly with SQL, or through AI agents that call tools against the same data. WhatsApp, LINE, QQ, Discord, Instagram, Telegram, iMessage and Google Chat are supported today, with Messenger and KakaoTalk listed as next.
It is built for large archives. Parsing is stream-first rather than buffered and processing is spread over multiple workers, so million-message imports stay responsive and memory-stable. The pipeline runs in five stages — format detection, stream parsing, local persistence, SQL plus AI query, then visualization — and the visual side ships trend, time-pattern, interaction-frequency and ranking views out of the box. The AI layer is assembled from agents and function calling over 24+ tools rather than one hard-coded model path, so it can search, summarize and analyse records with context instead of only answering from a prompt.
Privacy is the design constraint: raw chat data, indexes and settings stay on the device unless you explicitly send them elsewhere, and there is no mandatory cloud upload. The codebase is a pnpm monorepo on Electron, Vue 3, Nuxt UI and Tailwind, with the business logic in shared packages (`@openchatlab/core`, `@openchatlab/node-runtime`, `@openchatlab/tools`) used by both the desktop app and the CLI so the two cannot drift. Besides the desktop build there is a `chatlab-cli` npm package that serves the same web UI and an API — including a headless mode intended for scripts and AI agents — and a browser-only WASM target. Licensed AGPL-3.0.
What it does
- Imports and normalizes exports from WhatsApp, LINE, QQ, Discord, Instagram, Telegram, iMessage and Google Chat into one schema
- Stream parsing with multi-worker processing, aimed at million-message histories
- SQL access to the normalized store alongside agent + function-calling workflows over 24+ tools
- Built-in visual views: trends, time-of-day patterns, interaction frequency and rankings
- Local-first — raw data, indexes and settings stay on-device, with no mandatory cloud upload
- Three ways to run it: Electron desktop app, `chatlab-cli` (web UI, API, or headless for scripts and agents), or browser-only WASM
- `clb web --daemon` installs a background service on macOS and Linux that auto-starts on login and restarts on crash
Getting started
Either install the desktop app or run the CLI. The CLI needs Node.js ≥ 20; the desktop app needs nothing else. Exporting the chat history from each platform is the step before either, and the docs have a per-platform guide.
Install the desktop app
Download the installer for your OS from the official site or GitHub Releases and run it.
https://chatlab.fun/?type=download
https://github.com/ChatLab/ChatLab/releasesOr install the CLI
Requires Node.js ≥ 20.
npm i chatlab-cli -gStart it
`clb web` serves the API and web UI and opens a browser; the headless mode is the one to use from scripts or an AI agent. Common options are --port (default 3110), --host and --token.
clb web # API + web UI, opens the browser
clb web --no-open # API + web UI, no browser
clb web --headless # API only — for scripts and AI agentsRun it as a service
On macOS and Linux the daemon flag installs a system service that starts on login and restarts after a crash.
clb web --daemon # install as a system service
clb status # check it
clb stop # stop and uninstallExport your chats, then import
Each platform exports differently; ChatLab documents the procedure per platform and the normalized format it maps them into.
https://docs.chatlab.fun/usage/how-to-export
https://docs.chatlab.fun/standard/chatlab-formatCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Query years of personal or group chat history with SQL without first writing a parser per platform
- Ask an agent to summarize or find patterns across a million-message archive that is too large to scroll
- Keep sensitive conversation data on your own machine while still getting AI analysis of it
- Compare histories from several messaging apps side by side once they share one normalized schema
- Drive the same analysis from a script or another agent through the headless CLI API
How ChatLab compares
ChatLab alongside other open-source data wrangling tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Hugging Face Datasets | ★ 22k | An Apache Arrow-backed Python library that loads datasets from the Hugging Face Hub or local files in one line and maps, filters and streams them without holding them in RAM. |
| Rerun | ★ 11.5k | A data layer for physical AI that logs, visualises and queries multi-rate multimodal streams — images, point clouds, transforms, joint states, video — and streams them straight into training. |
| Datasette | ★ 11.5k | An open source multi-tool that points at a SQLite file and serves it as a browsable website with a JSON API, plus commands for publishing the result online. |
| ChatLab | ★ 7.5k | A local-first desktop app that imports chat exports from eight platforms and lets SQL and AI agents analyse them on your own machine |
| Lance | ★ 7.1k | An open lakehouse format for multimodal AI: one dataset holding images, video, audio, text and embeddings, with 100x faster random access than Parquet, vector and full-text indices, and zero-copy versioning. |
| Daft | ★ 5.8k | High-performance data engine for AI: process images, audio, video and embeddings alongside structured data in one Python dataframe, with a Rust core that scales from a laptop to a Ray or Kubernetes cluster. |
| sqlite-utils | ★ 2.2k | A Python CLI and library that turns JSON, CSV and TSV into SQLite databases, creating schemas automatically and adding full-text search, table transforms and migrations. |