Skip to content

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 Use it for
gemini-cli Saved Gemini CLI chats, checkpoints, and prompt logs under ~/.gemini/tmp/ and ~/.cache/.gemini/tmp/.

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.

Terminal window
hansard import --source gemini-cli --since all

You do not need Gemini CLI installed to import its saved history.

  1. When the import finishes, open Sessions and selectFilter & sort.
  2. 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.
  3. 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.

  • 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.
  • Gemini CLI’s retention settings may have deleted older files before Hansard imported them.
  • Hansard does not import files you created with /chat share or /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.

To reread only conversations with an older parser version from available Gemini CLI files:

Terminal window
hansard rebuild --stale-parsers --source-type gemini-cli-history --since all

To reparse only Hansard’s preserved bytes, without reading Gemini CLI’s store:

Terminal window
hansard rebuild --from-raw --source-type gemini-cli-history --since all

Neither 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.