Skip to content

Add support for Gemini CLI session tracking #166

@ozymandiashh

Description

@ozymandiashh

Summary

Codeburn currently supports Claude Code, Codex CLI, and Cursor (per --provider flag in 0.9.2). Adding Gemini CLI would close the loop for the most common multi-provider setup.

Why

Many users run all three concurrently (Claude Code as primary, Codex for code review, Gemini for research / large-context work). Codeburn already gives the cleanest TUI in this space, so the lack of Gemini means we either compromise on UX or run a second tracker just for Gemini cost visibility.

Where Gemini CLI stores logs

Path:

~/.gemini/tmp/<project>/chats/session-<timestamp>-<hash>.jsonl

In my install I have 83 active session files across multiple projects.

Tested with:

  • Gemini CLI: 0.39.1
  • macOS (Apple Silicon)

Format (verified, real sample, sanitized)

First line is session metadata, then JSONL with messages:

{"sessionId":"<uuid>","projectHash":"<sha256>","startTime":"2026-04-27T01:55:42.605Z","lastUpdated":"2026-04-27T01:55:42.605Z","kind":"main"}
{"id":"<uuid>","timestamp":"2026-04-27T01:55:45.373Z","type":"user","content":[{"text":"..."}]}
{"$set":{"lastUpdated":"2026-04-27T01:55:45.373Z"}}
{"id":"<uuid>","timestamp":"2026-04-27T01:55:50.123Z","type":"model","content":[{"text":"..."}]}

Message type values seen: user, model, plus stream-update lines with $set.

Pricing references

For cost calculation, Gemini API pricing is published at https://ai.google.dev/pricing. Models I use most often:

  • gemini-3.1-pro-preview
  • gemini-2.5-pro
  • gemini-2.5-flash

Notes

I tested splitrail (which advertises Gemini support) and found two related issues there:

  1. It looks for *.json, but Gemini CLI writes *.jsonl (mismatch causes 0 sessions detected).
  2. After renaming a sample to .json, splitrail registers the analyzer but parses 0 messages, suggesting the schema check expects an older format.

Sharing in case it's useful when designing the codeburn parser.

Happy to test pre-release builds against my 83 sessions if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions