Skip to content

Gemini CLI

Gemini CLI is a historical import source. Hansard preserves existing saved chats and checkpoints, but does not offer or install a new live Gemini CLI workflow. Antigravity is the current Google-agent integration.

Source Use it for
gemini-cli Existing Gemini CLI history under the provider’s saved stores.

Hansard scans the provider-owned records below ~/.gemini/tmp/<project-id>/: saved chat JSON/JSONL, root manual checkpoints, tool checkpoints, prompt logs, and one nested subagent level. It does not treat shell history or user-selected exports as automatic conversations. User and model messages, function calls and results, checkpoints, model information, usage, and project context are normalized when the source recorded them.

Append-only JSONL is replayed before normalization. Repeated message ids replace earlier values, rewinds remove the selected turn and everything after it, and a whole-history snapshot replaces the current message set. When both a legacy hash directory and its copied project-slug directory survive, the provider session id selects one conversation and JSONL takes precedence over stale JSON.

Only durable records that remain in the provider store can be imported; Gemini CLI may already have pruned older or temporary files. Child sessions are kept as linked conversations rather than merged into the parent. This source exists to preserve historical Gemini CLI work and can be rerun to refresh those saved records. It is not a new live integration target; current Google-agent coverage is provided by the Antigravity importers.

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

After the import finishes, open Conversations and selectFilter & sort. Set Source toGemini CLI, choose the backfill window underTime, and use Folder when the same harness appears in several projects. Select a result to inspect its messages, tool calls and results, files, commits, model and usage fields, and source provenance in one conversation view.

For a local source that should stay current, open Settings → Indexing & Imports. Automatic follows detected local harnesses; Custom lets Sources scannedselect an explicit set. Explicit cloud and account-export sources do not turn into background network jobs here. If the expected result is absent after resetting the conversation filters, return to the terminal import in this guide and add --explain-skips where supported.

  • Saved JSON and JSONL conversations, manual checkpoints, tool checkpoints, prompt logs, and linked subagent records.
  • User and model turns, function calls and results, shell or code execution, usage metadata, title updates, and structured lifecycle data when recorded.
  • Linked subagent sessions and parent invocation metadata.
  • Provider shutdown summaries as session metadata rather than invented chat turns.
  • Gemini CLI retention settings may have pruned older provider files before Hansard imported them.
  • User-selected /chat share and /export-session files are not automatic provider stores and require an explicit manual import workflow.
  • Hansard does not assume a stable Gemini CLI resume command.
  • A historical record cannot gain fields the provider never persisted.

The current parser revision narrows discovery to official upstream layouts and replays JSONL rewinds before normalization. Refresh existing Gemini archives from the provider records:

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