No description
- Shell 99.9%
- Python 0.1%
| .ai-chats | ||
| .cc-iterations | ||
| .claude/commands | ||
| .darren | ||
| .perpetual-motion | ||
| .resources | ||
| .specify | ||
| docs | ||
| input | ||
| src/ai_chat_extract | ||
| cli-ai-terminal-calls.md | ||
| pyproject.toml | ||
| README.md | ||
| tech-stack-matrix.md | ||
AI Chat Extract
A CLI tool to extract, organize, and index chat exports from AI platforms (ChatGPT, Claude, etc.) into browsable, searchable folders.
The Problem
AI chat exports are unwieldy:
- Large JSON blobs (e.g., 736 conversations, 78MB)
- Too big for direct context loading
- Nested structures that are hard to navigate
- No organization by date, project, or topic
The Solution
Stream-process exports into organized markdown files with full asset extraction:
output/
├── index.json # Quick lookup manifest
├── projects/
│ └── my-project/
│ ├── 2024-12-10-chat-about-feature/
│ │ ├── conversation.md
│ │ └── assets/
│ └── ...
└── conversations/
├── 2024-07/
│ ├── 2024-07-14-financial-planning/
│ │ ├── conversation.md
│ │ ├── artifacts/
│ │ └── assets/
│ └── ...
└── 2024-12/
└── ...
Features
- Stream processing - Memory-efficient parsing of large exports
- Multi-platform - Parsers for ChatGPT, Claude, and more
- Project-aware - Chats belonging to projects stay organized together
- Full extraction - Conversations, artifacts, attachments, memories
- Searchable index - JSON manifest for quick lookups
Tech Stack (Phase 1 - MVP)
| Component | Choice | Purpose |
|---|---|---|
| CLI | Typer + Rich | Beautiful command-line interface |
| Parsing | ijson | Memory-efficient JSON streaming |
| Models | Pydantic | Data validation and structure |
| Output | Markdown | Universal, portable format |
| Container | Docker | Consistent deployment |
Future Phases
- Phase 2: PostgreSQL for cross-conversation queries / Qdrant vector DB for semantic search ("find similar chats")
Usage
# Extract ChatGPT export
ai-extract chatgpt ./input/chatgpt-export.zip -o ./output
# Extract Claude export
ai-extract claude ./input/claude-export.json -o ./output
# Generate index only (no file extraction)
ai-extract index ./input/export.json
Supported Platforms
| Platform | Export Format | Status |
|---|---|---|
| ChatGPT | ZIP (conversations.json + assets) | 🔲 Planned |
| Claude | JSON | 🔲 Planned |
| Claude Projects | JSON | 🔲 Planned |
AI Instructions
We use spec-kit here. See the .specify folder for workflow details.
Development
# Install dependencies
uv sync
# Run CLI
uv run ai-extract --help
# Run with Docker
docker compose up