Gemini CLI
Gemini CLI is a historical import-only source in Hansard. Hansard imports its saved chats, checkpoints, and prompt logs without setting up integrations. For current Google agents, use Antigravity.
Source IDs
Section titled “Source IDs”| Source | Use it for |
|---|---|
gemini-cli |
Saved Gemini CLI chats, checkpoints, and prompt logs under ~/.gemini/tmp/ and ~/.cache/.gemini/tmp/. |
How the import works
Section titled “How the import works”Hansard scans Gemini CLI’s project folders under ~/.gemini/tmp/<project-id>/
and the macOS Seatbelt location ~/.cache/.gemini/tmp/<project-id>/: saved chat JSON and JSONL files, manual
checkpoints, tool checkpoints, prompt logs, and one level of subagent sessions.
It does not import shell history or files you exported yourself. User and model
messages, function calls and results, checkpoints, model details, usage, and
the project are kept when Gemini CLI recorded them.
HANSARD_GEMINI_HOME_DIR or GEMINI_HOME selects one alternate root and
disables default-root discovery. Each root uses its own projects.json and
.project_root markers to resolve project identity.
Hansard replays each JSONL file in order before importing it. A repeated message ID replaces the earlier message, a rewind removes the chosen turn and everything after it, and a full-history snapshot replaces the current messages. When both an older hash-named folder and its copied project-name folder exist, the session ID picks one conversation, and the JSONL file wins over an older JSON copy.
Only files still in Gemini CLI’s folders can be imported, and Gemini CLI may already have deleted older or temporary files. Subagent sessions stay as linked conversations instead of being merged into the parent. Run the import again to pick up changes to the saved files.
Import and keep current
Section titled “Import and keep current”hansard import --source gemini-cli --since allYou do not need Gemini CLI installed to import its saved history.
Gemini CLI remains a historical source. Run the import again after copying additional saved history into the selected store. For current Google agents, follow the Antigravity guide.
Review the import in the app
Section titled “Review the import in the app”- When the import finishes, open Sessions and selectFilter & sort.
- Set Source to Gemini CLI and setTime to the window you imported. UseFolder to narrow the list when you use this harness in several projects.
- Select a conversation to check its messages, tool calls, files, commits, model, and token usage.
To keep archiving new sessions from a local harness, openSettings → Imports. Automaticfollows every supported harness installed on this computer.Custom lets you turn individual harnesses on or off. Cloud sources turn on separately under Cloud agents, and ChatGPT, Claude.ai, Gemini, and Gemini Notebook / NotebookLM exports import withImport export…. Each also has its own import command. If a conversation you expect is missing after you reset the filters, run the import command on this page again with --explain-skips where the source supports it.
What Hansard preserves
Section titled “What Hansard preserves”- Saved JSON and JSONL chats, manual checkpoints, tool checkpoints, prompt logs, and subagent sessions.
- User and model messages, function calls and results, shell and code execution, usage, title changes, and session events when recorded.
- Links between each subagent session and the call that started it.
- Gemini CLI’s end-of-session summary, stored with the session’s details rather than as a chat message.
Known limitations
Section titled “Known limitations”- Gemini CLI’s retention settings may have deleted older files before Hansard imported them.
- Hansard does not import files you created with
/chat shareor/export-session. - Hansard does not offer a command to resume a Gemini CLI conversation.
- An older session cannot gain details that Gemini CLI never saved.
Refresh an existing archive
Section titled “Refresh an existing archive”To reread only conversations with an older parser version from available Gemini CLI files:
hansard rebuild --stale-parsers --source-type gemini-cli-history --since allTo reparse only Hansard’s preserved bytes, without reading Gemini CLI’s store:
hansard rebuild --from-raw --source-type gemini-cli-history --since allNeither command needs a complete archive reimport or a separate index rebuild.
Use hansard import --source gemini-cli --since all when a previously skipped
provider file has no archived raw copy. Gemini CLI remains historical import-only.