claude-conversation-extractor  by ZeroSumQuant

Extract and manage local Claude Code chat logs

Created 9 months ago
354 stars

Top 79.1% on SourcePulse

GitHubView on GitHub
Project Summary

This tool addresses the critical need for exporting and managing conversation logs from Claude Code, a desktop application that lacks a native export feature. It provides Claude Code users with a reliable method to back up, search, and archive their AI programming sessions, ensuring valuable data is not lost. The primary benefit is enabling data preservation and accessibility for users who rely on Claude Code for development and research.

How It Works

The extractor operates by locating Claude Code's internal conversation storage, typically found in ~/.claude/projects/, which contains chat logs in an undocumented JSONL format. It parses these files, preserving user inputs, Claude's responses, and optionally, detailed information like tool use, MCP responses, and system messages. The tool then converts these logs into clean, readable Markdown, structured JSON, or visually appealing HTML formats, making them easily searchable and archival.

Quick Start & Requirements

  • Primary install: pipx install claude-conversation-extractor or pip install claude-conversation-extractor.
  • Prerequisites: Python 3.8+ (3.9, 3.10, 3.11, 3.12 supported). Claude Code must be installed and have existing conversations. Optional: spacy and en_core_web_sm for advanced semantic search capabilities.
  • Links: CONTRIBUTING.md and INSTALL.md are mentioned for further details.

Highlighted Details

  • Offers both an interactive UI (claude-start) and a CLI (claude-extract, claude-search) for flexible usage.
  • Supports multiple export formats: Markdown (default), JSON, and HTML, with a --detailed flag for comprehensive transcripts including tool invocations and system messages.
  • Features real-time, case-insensitive full-text search across all conversations, with previews and direct extraction options.
  • Designed for zero configuration, automatically detecting log locations, and operates 100% locally and offline, ensuring privacy and security.

Maintenance & Community

The project includes a CONTRIBUTING.md file and outlines a roadmap with completed and planned features, indicating active development. Specific community channels (like Discord/Slack) or notable contributors/sponsorships are not detailed in the README.

Licensing & Compatibility

The project is released under the MIT License, which generally permits broad use, including commercial applications, with minimal restrictions. It is compatible with Windows, macOS, and Linux.

Limitations & Caveats

This tool is specifically designed for the Claude Code desktop application and does not support the Claude.ai web version. It requires Claude Code to have been used previously to generate log files. Advanced search functionality requires optional external dependencies.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
1
Star History
63 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Ishaan Jaffer Ishaan Jaffer(Cofounder of LiteLLM), and
4 more.

chathub by chathub-dev

0.1%
11k
All-in-one chatbot client
Created 3 years ago
Updated 3 months ago
Feedback? Help us improve.