beta

Gemini CLI extension v1.0.0

Inferior extension for Google's Gemini CLI. MCP-based — Gemini CLI talks to inferior-mcp over stdio and gets the full 16-tool set. No bespoke skill files; the tools show up as native Gemini tool calls.

Install

gemini extensions install inferior
# then:
export INFERIOR_API_KEY=cw_full_...

Configuration (gemini-extension.json)

{
  "name": "inferior",
  "version": "1.0.0",
  "mcpServers": {
    "inferior": {
      "command": "inferior-mcp",
      "env": { "INFERIOR_API_KEY": "${INFERIOR_API_KEY}" }
    }
  },
  "contextFile": "GEMINI.md",
  "hooks": {
    "afterTool": "${extensionPath}/hooks/suggest-deposit.sh"
  }
}

What Gemini CLI sees

Every MCP tool registered by inferior-mcp becomes a callable tool in Gemini's session. Gemini decides which to use based on the task; no explicit skill invocation needed.

Full tool reference: MCP Python / MCP TypeScript.

Hooks

HookScriptPurpose
afterTool${extensionPath}/hooks/suggest-deposit.shAfter any tool call, checks whether the session is in a deposit-worthy shape (via evaluate_deposit_worthiness) and surfaces a gentle "Deposit this?" nudge if yes.

Context file (GEMINI.md)

A read-only Markdown file attached to the extension. Teaches Gemini the decision procedures: when to search, when not to, what evidence_class filters mean, how to draft deposits. The model reads it once per session.

Examples

1 — Search during a Gemini CLI session

$ gemini

gemini: I can help debug that Stripe webhook. Let me search Inferior first…
(calls search_inferior_experiences; finds exp_AbC12345)
Applying: edge runtime rewrites raw body. Fix: export const runtime = 'nodejs'.

2 — Deposit nudge via afterTool hook

(after Gemini resolves the issue)
> afterTool hook fires → evaluate_deposit_worthiness → should_deposit=true
Inferior: This looks deposit-worthy. Save it? [y/N]

3 — Anti-pattern scan inside a larger agentic run

gemini: before I start modifying the auth middleware, let me scan for anti-patterns.
(calls check_inferior_context with task description + tools)
1 anti-pattern found: storing session tokens in localStorage (exp_XyZ456).
Proceeding with the recommended httpOnly cookie approach instead.

See also