Open Kioku

Home › Docs › Gemini CLI

Gemini CLI + Open Kioku

Give Gemini CLI something to read before it edits.

Open Kioku runs as a local MCP server. Gemini CLI asks it what a task touches, plans inside a declared boundary, and has the finished diff checked against that plan. Nothing leaves your machine.

Setup

Install, connect, ask for a plan.

Indexing time depends on the size of the repository; a few thousand files take seconds. Everything is stored under the repository's own .ok/ directory.

  • cargo install open-kioku-cli, or cargo binstall for the prebuilt binary.
  • Binaries with checksums, an SBOM and provenance on GitHub releases ↗.
  • The server is read-only by default: source edits remain in Gemini CLI's own workflow.
  1. Install Open Kioku

    The npm package pulls the native binary for macOS, Linux or Windows.

    npm install -g open-kioku
  2. Connect Gemini CLI

    Index the repository, then print the server entry for it. ok setup agent --apply is wired for Claude Code and Cursor; for Gemini CLI the entry below is the supported path.

    ok index .
    ok mcp install gemini --repo .

    Paste what it prints into .gemini/settings.json or ~/.gemini/settings.json:

    settings.json
    {
      "mcpServers": {
        "open-kioku": {
          "command": "ok",
          "args": ["mcp", "serve", "--repo", "/absolute/path/to/repo", "--read-only"],
          "trust": false
        }
      }
    }
  3. Tell the agent to use it

    Add this to GEMINI.md, or paste it at the start of a session.

    GEMINI.md
    Use Open Kioku before editing. Check repo_status, search_code, get_definition, get_references, impact_analysis, and find_tests_for_change. Build a plan with plan_change first, then edit, and verify after the edit with verify_change.
What Gemini CLI can ask

Sixteen tools, each answering one question.

These are the ones an edit usually needs. Every tool runs against the local index and says what it could not find.

ToolWhat it answers
plan_changeAn edit plan with primary context, impact candidates, validation targets and the edit boundary.
verify_changeThe finished change checked against the plan's boundary.
build_context_packThe files, symbols and tests for one task, with confidence and caveats.
search_codeRanked code search with paths, line ranges and confidence.
get_definitionWhere a symbol is defined, from the local symbol index.
get_referencesWhere a symbol is used, from indexed relationship edges.
impact_analysisWhat a change to a file or symbol reaches, proven edges apart from possible ones.
find_tests_for_changeThe tests that cover what is about to change.
repo_statusIndex health, coverage by language, and what was skipped and why.

Measured every night on four real repositories: on a TypeScript repository of about nine hundred files, the right file is in the top five about four times in five. The numbers ↗ · All sixteen tools ↗

Other agents

The same server, a different client.