CTK (Conversation Toolkit) is a powerful, plugin-based system for managing AI conversations from multiple providers. Import, store, search, and export your conversations in a unified tree format while preserving provider-specific details.
The Fragmentation Problem
If you use multiple AI assistants, you've experienced this pain:
- ChatGPT conversations live in OpenAI's web app
- Claude conversations are siloed in Anthropic's interface
- GitHub Copilot chat history is buried in VS Code storage
- Local LLMs (Ollama, etc.) have no standard export format
Result: Your valuable conversations are scattered across incompatible platforms, unsearchable, and at risk of being lost.
CTK's Solution: Universal Tree Format
CTK provides a universal tree representation for all conversations:
User: "What is Python?"
└── Assistant: "Python is a programming language..."
└── User: "How do I install it?"
└── Assistant: "You can install Python by..."
Key insight: Linear chats are just single-path trees. Branching conversations (like ChatGPT's "regenerate" feature) are multi-path trees. This preserves all branching structure while providing a uniform interface.
Quick Start
# Setup
pip install conversation-tk
# Import from multiple providers
ctk import chatgpt_export.json --db my_chats.db
ctk import claude_export.json --db my_chats.db --format anthropic
# Search with beautiful tables
ctk search "python async" --db my_chats.db --limit 10
# Interactive chat - talk with ALL your conversations
ctk chat --db my_chats.db
The Core Feature: Interactive Chat
The most powerful feature: The chat command lets you talk with all your conversations using an LLM:
ctk chat --db chats.db
This creates a conversational interface where you can:
- Ask questions about your conversation history: "What did I discuss with Claude about Python decorators last month?"
- Get summaries: "Summarize my recent conversations about machine learning"
- Find patterns: "What topics come up most often in my ChatGPT conversations?"
- Perform operations: "Star all conversations about async programming"
The LLM has access to your entire conversation database and can search, filter, and manipulate it through natural language via tool calling.
Natural Language Commands with say
Use LLM-powered tool calling to manage your conversations naturally:
ctk say "show me starred conversations" --db chats.db
ctk say "find discussions about async python" --db chats.db
ctk say "star the last conversation about machine learning" --db chats.db
How it works: The LLM interprets your command and calls the appropriate CTK tools to execute it. This goes beyond queries - you can actually perform operations like starring, tagging, and exporting through natural language.
Core Features
Plugin Architecture
CTK auto-discovers importers and exporters. Adding support for a new provider is trivial - just drop a Python file in the integrations folder.
Supported Providers
| Provider | Branch Support |
|---|---|
| ChatGPT | ✅ Full tree (preserves regenerations) |
| Claude | ✅ Full tree |
| GitHub Copilot | Linear |
| Google Gemini | Partial |
| Generic JSONL | Linear (for local LLMs) |
Privacy First
- 100% local - no data leaves your machine
- No analytics or telemetry
- Optional secret masking for sharing
Terminal TUI
In addition to the chat interface, there's a full terminal UI for visual management:
- Browse conversations with Rich table view
- Emoji flags for status: ⭐ (starred) 📌 (pinned) 📦 (archived)
- Tree view for branching conversations
- Fork conversations to explore alternatives
- MCP tool support
Export for Fine-Tuning
# JSONL format for training
ctk export training.jsonl --db chats.db --format jsonl
# Path selection for branching conversations
ctk export out.jsonl --db chats.db --path-selection longest
The Long Echo Connection
CTK was built for preserving AI conversations for the long term. Export to formats that will survive platform changes:
- HTML5: Self-contained, works in any browser
- Markdown: Plain text, readable anywhere
- JSON: Structured data, easy to parse decades later
Links
- Repository: github.com/queelius/ctk
- Full Documentation: See repository README
Originally published at metafunctor.com
Top comments (0)