Repository navigation
Description
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-previewgemini-2.5-progemini-2.5-flash
Notes
I tested splitrail (which advertises Gemini support) and found two related issues there:
- It looks for
*.json, but Gemini CLI writes*.jsonl(mismatch causes 0 sessions detected). - 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.
Activity
iamtoruk commentedon Apr 28, 2026
on it
Add Gemini CLI provider for session tracking
Add Gemini CLI provider for session tracking (#168)
ozymandiashh commentedon Apr 28, 2026
Quick follow-up after testing on
0.9.3- I'm seeing the provider register but with 0 sessions detected, despite having 65 valid session files.Repro on my setup:
session-*.{json,jsonl}under~/.gemini/tmp/<project>/chats/discoverSessions()would return all 65codeburn today --provider geminiandcodeburn report --provider gemini --period 30days --format jsonboth return 0 cost / 0 sessions / 0 callsSample message format I have (Gemini CLI 0.39.1):
{"sessionId":"<uuid>","projectHash":"<sha>","startTime":"2026-04-27T00:00:27.112Z","lastUpdated":"...","kind":"main"} {"id":"<uuid>","timestamp":"...","type":"user","content":[{"text":"..."}]} {"$set":{"lastUpdated":"..."}} {"id":"<uuid>","timestamp":"...","type":"gemini","content":"...","tokens":{"input":9224,"output":24,"cached":0,"thoughts":0,"tool":0,"total":9248},"model":"gemini-3.1-pro-preview"}Note the
$setlines (mixed in between message records) and thetype: "gemini"for assistant messages. My guess is the parser might be choking silently on the$setlines or expecting a differenttypevalue.Also small unrelated nit:
codeburn export --provider <provider>help still lists onlyclaude, codex, cursor(missing gemini), whilereportandtodayaccept it correctly.Happy to provide a sanitized session sample if useful for repro.
iamtoruk commentedon Apr 28, 2026
Good catch! Gemini CLI 0.39+ switched to JSONL format with
$setmetadata lines mixed in. The parser was only handling the older single-JSON format.Fixed on main. Since this isn't published to npm yet, you can test from source:
git clone https://github.com/getagentseal/codeburn.git cd codeburn npm install npx tsx src/cli.ts report --provider gemini -p allLet us know if your 65 sessions show up!
iamtoruk commentedon Apr 28, 2026
Also -- if it works, would you mind sharing a screenshot of your
codeburn report --provider gemini -p alloutput? With 65 sessions that'd be a great demo for the Gemini community. No worries if not!ozymandiashh commentedon Apr 28, 2026
Confirmed working on
main(commit 64259c9)! 🎉Tested via
npx tsx src/cli.ts report --provider gemini -p all:$setmetadata lines)codeburn report output (project names redacted for privacy)
Notes:
tools.jsonand metadata-only entries don't count as completed sessions)Thanks for the fast turnaround on the fix!