{"id":49453524,"url":"https://github.com/ChatLab/ChatLab","last_synced_at":"2026-05-01T03:00:59.331Z","repository":{"id":331560357,"uuid":"1104370536","full_name":"ChatLab/ChatLab","owner":"ChatLab","description":"Rediscover your social memories with local, AI-powered analysis. 本地化的聊天记录分析工具，通过 AI Agent 回顾你的社交记忆。","archived":false,"fork":false,"pushed_at":"2026-04-26T06:10:56.000Z","size":6689,"stargazers_count":6095,"open_issues_count":12,"forks_count":1327,"subscribers_count":19,"default_branch":"main","last_synced_at":"2026-04-26T08:26:49.451Z","etag":null,"topics":["ai","chat-analysis","chat-history","data-analysis","data-visualization","electron","nlp","typescript"],"latest_commit_sha":null,"homepage":"https://chatlab.fun","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChatLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-26T05:54:26.000Z","updated_at":"2026-04-26T07:59:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ChatLab/ChatLab","commit_stats":null,"previous_names":["hellodigua/chatlab","chatlab/chatlab"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/ChatLab/ChatLab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLab%2FChatLab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLab%2FChatLab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLab%2FChatLab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLab%2FChatLab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChatLab","download_url":"https://codeload.github.com/ChatLab/ChatLab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChatLab%2FChatLab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32483406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chat-analysis","chat-history","data-analysis","data-visualization","electron","nlp","typescript"],"created_at":"2026-04-30T04:01:03.687Z","updated_at":"2026-05-01T03:00:59.324Z","avatar_url":"https://github.com/ChatLab.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Web Automation and UI Interaction","📊 Data \u0026 Analytics"],"sub_categories":["Browser Automation"],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"./public/images/chatlab.svg\" alt=\"ChatLab\" title=\"ChatLab\" width=\"300\" /\u003e\n\nRediscover your social memories with private, AI-powered analysis.\n\nEnglish | [简体中文](./docs/README.zh-CN.md) | [繁體中文](./docs/README.zh-TW.md) | [日本語](./docs/README.ja-JP.md)\n\n[Official Website](https://chatlab.fun/) · [Download](https://chatlab.fun/?type=download) · [Documentation](https://chatlab.fun/usage/) · [Roadmap](https://chatlabfun.featurebase.app/roadmap) · [Issue Submission](https://github.com/ChatLab/ChatLab/issues)\n\n\u003c/div\u003e\n\nChatLab is an open-source desktop app for understanding your social conversations. It combines a flexible SQL engine with AI agents so you can explore patterns, ask better questions, and extract insights from chat data, all on your own machine.\n\nCurrently supported: **WhatsApp, LINE, WeChat, QQ, Discord, Instagram, and Telegram**. Coming next: **iMessage, Messenger, and KakaoTalk**.\n\n## Core Features\n\n- 🚀 **Built for large histories**: Stream parsing and multi-worker processing keep imports and analysis responsive, even at million-message scale.\n- 🔒 **Private by default**: Your chat data and settings stay local. No mandatory cloud upload of raw conversations.\n- 🤖 **AI that can actually operate on data**: Agent + Function Calling workflows can search, summarize, and analyze chat records with context.\n- 📊 **Insight-rich visual views**: See trends, time patterns, interaction frequency, rankings, and more in one place.\n- 🧩 **Cross-platform normalization**: Different export formats are mapped into a unified model so you can analyze them consistently.\n\n## Usage Guides\n\n- [Download Guide](https://chatlab.fun/?type=download)\n- [Chat Record Export Guide](https://chatlab.fun/usage/how-to-export.html)\n- [Standardized Format Specification](https://chatlab.fun/standard/chatlab-format.html)\n- [Troubleshooting Guide](https://chatlab.fun/usage/troubleshooting.html)\n\n## Preview\n\nFor more previews, please visit the official website: [chatlab.fun](https://chatlab.fun/)\n\n![Preview Interface](/public/images/intro_en.png)\n\n## System Architecture\n\n### Architecture Principles\n\n- **Local-first by default**: Raw chat data, indexes, and settings remain on-device unless you explicitly choose otherwise.\n- **Streaming over buffering**: Stream-first parsing and incremental processing keep large imports stable and memory-efficient.\n- **Composable intelligence**: AI features are assembled through Agent + Tool Calling, not hard-coded into one model path.\n- **Schema-first evolution**: Import, query, analysis, and visualization share a consistent data model that scales with new features.\n\n### Runtime Architecture\n\n- **Main Process (control plane)**: `electron/main/index.ts` handles lifecycle and windows. `electron/main/ipc/` defines domain-scoped IPC, while `electron/main/ai/` and `electron/main/i18n/` provide shared AI and localization services.\n- **Worker Layer (compute plane)**: `electron/main/worker/` runs import, indexing, and query tasks via `workerManager`, keeping CPU-heavy work off the UI thread.\n- **Renderer Layer (interaction plane)**: Vue 3 + Nuxt UI + Tailwind CSS drive management, private chat, group chat, and analysis interfaces. `electron/preload/index.ts` exposes tightly scoped APIs for secure process boundaries.\n\n### Data Pipeline\n\n1. **Ingestion**: `parser/` detects file format and dispatches to the matching parser module.\n2. **Persistence**: Stream-based writes populate core local entities: sessions, members, and messages.\n3. **Indexing**: Session- and time-oriented indexes are built for timeline navigation and retrieval.\n4. **Query \u0026 Analysis**: `worker/query/*` powers activity metrics, interaction analysis, SQL Lab, and AI-assisted exploration.\n5. **Presentation**: The renderer turns query output into charts, rankings, timelines, and conversational analysis flows.\n\n### Extensibility \u0026 Reliability\n\n- **Pluggable parser architecture**: Adding a new import source is mostly an extension in `parser/formats/*`, without reworking downstream query logic.\n- **Full + incremental import paths**: `streamImport.ts` and `incrementalImport.ts` support both first-time onboarding and ongoing updates.\n- **Modular IPC boundaries**: Domain-based IPC segmentation reduces cross-layer coupling and limits permission spread.\n- **Unified i18n evolution**: Main and renderer processes share an i18n system that can evolve with product scope.\n\n---\n\n## Local Development\n\n### Requirements\n\n- Node.js \u003e= 20\n- pnpm\n\n### Setup\n\n```bash\n# install dependencies\npnpm install\n\n# run electron app in dev mode\npnpm dev\n```\n\nIf Electron encounters exceptions during startup, you can try using `electron-fix`:\n\n```bash\nnpm install electron-fix -g\nelectron-fix start\n\n```\n\n## Privacy Policy \u0026 User Agreement\n\nBefore using this software, please read the [Privacy Policy \u0026 User Agreement](./src/assets/docs/agreement_en.md).\n\n## Community\n\nPlease follow these principles before submitting a Pull Request:\n\n- Obvious bug fixes can be submitted directly.\n- For new features, please submit an Issue for discussion first; **PRs submitted without prior discussion will be closed**.\n- Keep one PR focused on one task; if changes are extensive, consider splitting them into multiple independent PRs.\n\nThanks to all contributors:\n\n\u003ca href=\"https://github.com/ChatLab/ChatLab/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=ChatLab/ChatLab\" /\u003e\n\u003c/a\u003e\n\n## License\n\nAGPL-3.0 License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChatLab%2FChatLab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChatLab%2FChatLab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChatLab%2FChatLab/lists"}