cai-ingest
Data ingestion from AI coding platforms.
Overview
cai-ingest provides parsers and scanners for extracting AI coding interactions from various sources including Claude Code conversations, Codex CLI history, and Git commit history.
Key Features
- Claude Code parser - Parse conversation JSON files
- Codex CLI parser - Parse Codex command history
- Git scanner - Extract commits as entries
- Unified API - Single
Ingestorfor all sources - Extensible - Easy to add new parsers
Usage
Using Ingestor
use ;
use MemoryStorage;
async
Individual Parsers
use ;
// Parse Claude conversations
let claude_parser = with_default_path?;
let entries = claude_parser.parse_all?;
// Parse Codex history
let codex_parser = with_default_path?;
let entries = codex_parser.parse_all?;
// Scan Git repository
let git_scanner = new;
let entries = git_scanner.scan?;
Data Format
Each parser produces cai_core::Entry instances:
use ;
use Utc;
Entry
Usage
Add to your Cargo.toml:
[]
= { = "../cai-ingest" }
Design Decisions
- Streaming: Support large files without loading entirely into memory
- Error recovery: Continue parsing on malformed entries
- Extensible: Easy to add new source parsers
Testing
License
MIT OR Apache-2.0