← Docs hub

Gemini CLI adapter

Status: Production (v0.5) Module: llmwiki.adapters.contrib.gemini_cli Source: llmwiki/adapters/contrib/gemini_cli.py Tracking issue: #38

What it reads

Gemini CLI stores session history under one of these paths:

~/.gemini/                    # primary
~/.config/gemini/             # XDG config
~/.local/share/gemini/        # XDG data

The adapter checks all three and discovers .jsonl files as well as chat-*.json and session-*.json patterns (Gemini CLI's JSON export format).

Project slug derivation

Uses the first directory under the root, lowercased and prefixed with gemini-:

~/.gemini/MyProject/session-001.jsonl
  -> gemini-myproject

Files directly in the root get slug gemini-root.

Schema versions supported

SUPPORTED_SCHEMA_VERSIONS = ["v1"]

Configuration

Override roots in config.json:

{
  "adapters": {
    "gemini_cli": {
      "roots": ["~/custom/gemini/path"]
    }
  }
}

Testing the adapter

python3 -m llmwiki adapters      # should list gemini_cli as available (if installed)
python3 -m pytest tests/test_adapter_graduation.py -k gemini -v

Fixture

A minimal synthetic fixture is provided at tests/fixtures/gemini_cli/minimal.jsonl for converter round-trip testing. It contains a single turn with a Bash tool call.

Reference

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date