Skip to main content

Module gemini

Module gemini 

Source
Expand description

Parser for Gemini CLI session logs (~/.gemini/tmp/<project_hash>/chats/*.jsonl).

The first line is a session-meta record; every subsequent line is an event. The parser deduplicates repeated message ids across incremental updates and snapshots, while retaining messages later hidden by a rewind because their usage was billed and their tools already ran. It then processes only type == "gemini" messages, which carry usage and tool calls.

Functionsยง

parse_gemini_events
Parse Gemini CLI session events from the JSONL event stream.