Gemini CLI¶
Base path: ~/.gemini (env override: GEMINI_CLI_HOME).
observed_version: gemini-cli v0.47.0 stable (observed 2026-06-21);
types pinned at HEAD 927170fc.
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:
-
- Role:
persistent_memory- Format:
text- Coverage:
inspectable- Adapter:
gemini.memory_text.v1
- Role:
app_state- Format:
text- Coverage:
inspectable- Adapter:
gemini.tool_outputs_text.v1
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.47.0 stable (2026-06-21)
- 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.47.0 stable (2026-06-21)
- 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.47.0 stable (2026-06-21)
- 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.47.0 stable (2026-06-21)
- 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.47.0 stable (2026-06-21)
- 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.47.0 stable (2026-06-21)
- Default search:
no
gemini.memory¶
Global user-authored context/memory Markdown injected into Gemini CLI sessions — the Gemini analogue of Claude’s CLAUDE.md. Standing instructions, not chat; inspectable opt-in rather than searched by default.
- Agent:
Gemini
- Role:
persistent_memory- Format:
text- Coverage:
inspectable- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/GEMINI.md- Adapter:
gemini.memory_text.v1- Data version:
gemini.memory.markdown.v1- Version strategies:
shape_inference, catalog_observation- Observed:
gemini-cli v0.47.0 stable (2026-06-21)
- Default search:
no
gemini.tool_outputs¶
Per-tool-call output text (run_shell_command / read_file / update_topic results) under tmp/<hash>/tool-outputs/session-<id>/. Tool output rather than user prompts (may echo file or command content), so inspectable opt-in, not searched by default.
- Agent:
Gemini
- Role:
app_state- Format:
text- Coverage:
inspectable- Path:
${GEMINI_CLI_HOME or ${HOME}/.gemini}/tmp/<project_hash>/tool-outputs/session-<id>/<name>.txt- Adapter:
gemini.tool_outputs_text.v1- Data version:
-- Version strategies:
-- Observed:
gemini-cli v0.47.0 stable (2026-06-21)
- 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.
gemini.memory¶
~/.gemini/GEMINI.md — the global user-authored context/memory file
injected into Gemini CLI sessions, the analogue of Claude’s
CLAUDE.md. Standing instructions rather than chat, so it is
inspectable (opt-in) rather than searched by default.
Path hashing¶
Gemini hashes project roots with SHA-256 to derive directory names.
agentgrep exposes gemini_project_hash()
to reproduce this derivation.