mirror of
https://github.com/mikeyobrien/pi-gemini-search.git
synced 2026-04-26 16:56:02 +03:00
No description
| demos | ||
| extensions/gemini-search | ||
| lib | ||
| test | ||
| .gitignore | ||
| package.json | ||
| README.md | ||
pi-gemini-search
Pi extension package that exposes Gemini CLI web research as a native Pi tool.
What it adds
- Tool:
gemini_search - Command:
/gemini-search <question> - Live progress updates: elapsed time + search counters while Gemini runs
- Prompt visibility: returned details include the exact rendered search prompt
Demo
Behavior
The tool runs Gemini in headless mode via:
gemini -p <prompt>--output-format stream-json
It parses stream events (tool_use, tool_result, message, result) and builds a structured result with:
answeras_ofsourcesnotes- optional
confidence(if Gemini provides it)
Important caveat
Gemini CLI tool restriction semantics differ from Codex CLI.
- This package targets feature parity with
pi-codex-search(UX + structured details), not strict behavioral parity. - Non-web tool usage is surfaced as warnings by default.
- Set
fail_on_command_event=trueto fail on non-web tool events.
Install with pi install
Global install from GitHub
pi install git:github.com/mikeyobrien/pi-gemini-search
Project-local install
pi install -l git:github.com/mikeyobrien/pi-gemini-search
Local path install (development)
pi install /path/to/pi-gemini-search
Verify install
pi list
Quick test
pi -p --no-session "Use gemini_search with question 'What is the latest stable npm version?' as_of_period 'early' and as_of_year 2026. Return a short answer."
Tool API
gemini_search
Parameters:
question(required): research questionas_of_period(optional):early|mid|late(default:early)as_of_year(optional): reference year (default: current UTC year)model(optional): Gemini model overridetimeout_sec(optional): default180, max3600max_sources(optional): default8, max20fail_on_command_event(optional): defaultfalse
Returns:
- human-readable answer with sources and progress summary
- structured
details, including:searchPrompt(rendered prompt used)as_of_period,as_of_year,model- parsed search telemetry summary and final stats
Development
Test
npm test
Requirements
geminiCLI installed and authenticated- network access for web search
