Gemini CLI Source
Default location
Section titled “Default location”~/.gemini/tmp/*/chats/*.json(or$GEMINI_CLI_HOME/tmp/*/chats/*.jsonwhenGEMINI_CLI_HOMEis set)
Override
Section titled “Override”llm-usage daily --gemini-dir /path/to/.gemini# orllm-usage daily --source-dir gemini=/path/to/.geminiParsing notes
Section titled “Parsing notes”- each file is a single JSON session object
- only
message.type === "gemini"rows with token usage are emitted - token mapping:
tokens.input - tokens.cached + tokens.tool→inputTokens(Gemini’sinputalready includes cached input)tokens.output + tokens.thoughts→outputTokens(thinking tokens are billed at the output rate)tokens.thoughts→reasoningTokens(a breakdown of output, as for other sources)tokens.cached→cacheReadTokenstokens.total→totalTokenswhen present
repoRootis resolved fromprojects.jsonin the Gemini directory ($GEMINI_CLI_HOME,--gemini-dir, or~/.gemini) when available. The file maps each project root to itstmp/<name>directory, and a session’sprojectHashis the SHA-256 of that root, so sessions resolve by hash first and bytmp/<name>otherwise. The older{"<id>": {"absolutePath": ...}}layout is still read. When several roots map to the sametmp/<name>, the last entry inprojects.jsonwins.