Gemini CLI¶
Base path: ~/.gemini (env override: GEMINI_CLI_HOME).
observed_version: gemini-cli v0.42.0 stable; types from
v0.44.0-nightly HEAD 77e65c0d.
Stores¶
- Role:
primary_chat- Format:
jsonl- Coverage:
default_search- Adapter:
gemini.tmp_chats_jsonl.v1
- Role:
supplementary_chat- Format:
json_object- Coverage:
catalog_only- Adapter:
-
- Role:
prompt_history- Format:
json_array- Coverage:
default_search- Adapter:
gemini.tmp_logs_json.v1
- Role:
supplementary_chat- Format:
json_object- Coverage:
default_search- Adapter:
gemini.tmp_chats_legacy_json.v1
- Role:
app_state- Format:
md_frontmatter- Coverage:
catalog_only- Adapter:
-
- Role:
app_state- Format:
json_object- Coverage:
catalog_only- Adapter:
-
gemini.tmp.chats¶
JSONL with mixed record types. Line 1 is a SessionMetadataRecord (sessionId, projectHash, startTime, lastUpdated, kind). Subsequent lines are MessageRecord turns (id, timestamp, type, content, optional toolCalls/thoughts/tokens/model) interleaved with MetadataUpdateRecord updates ({$set: ...}). Upstream types also declare RewindRecord and PartialMetadataRecord plus type values info/error/warning — these are valid in the schema but do not appear in observed real-world session files; only user and gemini type values were seen in v1 adapter sampling. Adapter store field uses the underscore-flattened form gemini.tmp_chats.
- Agent:
Gemini
- Role:
primary_chat- Format:
jsonl- Coverage:
default_search- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/tmp/<project_hash>/chats/session-<timestamp><id>.jsonl- Adapter:
gemini.tmp_chats_jsonl.v1- Data version:
-- Version strategies:
-- Observed:
gemini-cli v0.42.0 stable; types from v0.44.0-nightly @77e65c0d (2026-05-17)
- Default search:
yes
Parsed by agentgrep via parse_gemini_chat_file (gemini.tmp_chats_jsonl.v1). When a gemini-typed record’s content is empty, the assistant’s prose is drawn from thoughts[*].subject/description and the tool-call context from toolCalls[*].name/description — concatenated into one SearchRecord per turn.
gemini.tmp.checkpoints¶
Single-file conversation snapshot written by the /chat save command. JSON object { history: Content[]; authType?: AuthType } where each Content is {role: 'user'|'model', parts: [...]}.
- Agent:
Gemini
- Role:
supplementary_chat- Format:
json_object- Coverage:
catalog_only- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/tmp/<project_hash>/chats/checkpoint-<tag>.json- Adapter:
-
- Data version:
-- Version strategies:
-- Observed:
gemini-cli v0.42.0 stable; types from v0.44.0-nightly @77e65c0d (2026-05-17)
- Default search:
no
User-named snapshots vs. continuous transcript.
gemini.tmp.logs¶
JSON array of LogEntry { sessionId, messageId, timestamp, type, message } — user-prompt audit log. Adapter store field uses the underscore-flattened form gemini.tmp_logs.
- Agent:
Gemini
- Role:
prompt_history- Format:
json_array- Coverage:
default_search- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/tmp/<project_hash>/logs.json- Adapter:
gemini.tmp_logs_json.v1- Data version:
-- Version strategies:
-- Observed:
gemini-cli v0.42.0 stable; types from v0.44.0-nightly @77e65c0d (2026-05-17)
- Default search:
yes
Parsed by agentgrep via parse_gemini_logs_file (gemini.tmp_logs_json.v1).
gemini.tmp.chats_legacy¶
Pre-Feb 2026 single-file session format. JSON object with top-level sessionId, projectHash, startTime, lastUpdated, and a messages array carrying the same per-turn fields as the current JSONL format. Upstream still reads this shape via the isLegacyRecord discriminator. Adapter store field uses the underscore-flattened form gemini.tmp_chats_legacy.
- Agent:
Gemini
- Role:
supplementary_chat- Format:
json_object- Coverage:
default_search- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/tmp/<project_hash>/chats/session-<timestamp><id>.json- Adapter:
gemini.tmp_chats_legacy_json.v1- Data version:
-- Version strategies:
-- Observed:
gemini-cli v0.42.0 stable; types from v0.44.0-nightly @77e65c0d (2026-05-17)
- Default search:
yes
Parsed by agentgrep via parse_gemini_chat_legacy_file (gemini.tmp_chats_legacy_json.v1). Covers sessions whose files predate the JSONL migration; upstream still handles them.
gemini.skills¶
Skill definitions; not chat.
- Agent:
Gemini
- Role:
app_state- Format:
md_frontmatter- Coverage:
catalog_only- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/skills/- Adapter:
-
- Data version:
-- Version strategies:
-- Observed:
gemini-cli v0.42.0 stable (2026-05-17)
- Default search:
no
gemini.settings¶
Configuration; not chat.
- Agent:
Gemini
- Role:
app_state- Format:
json_object- Coverage:
catalog_only- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/settings.json- Adapter:
-
- Data version:
-- Version strategies:
-- Observed:
gemini-cli v0.42.0 stable (2026-05-17)
- Default search:
no
Record schemas¶
gemini.tmp.chats¶
JSONL with mixed record types. Line 1 is a SessionMetadataRecord
(sessionId, projectHash, startTime, lastUpdated, kind).
Subsequent lines are MessageRecord turns (id, timestamp,
type, content) interleaved with MetadataUpdateRecord updates
({$set: {...}}).
For gemini-typed records whose content is empty, the assistant’s
prose is drawn from thoughts[*].subject/description and the
tool-call context from toolCalls[*].name/description.
gemini.tmp.chats_legacy¶
Pre-Feb 2026 single-file .json format. JSON object with session
metadata at the top level and the full conversation under a
messages array.
gemini.tmp.logs¶
Flat JSON array of LogEntry { sessionId, messageId, timestamp, type, message } — user-prompt audit log.
Path hashing¶
Gemini hashes project roots with SHA-256 to derive directory names.
agentgrep exposes gemini_project_hash()
to reproduce this derivation.