Google Web Search CLI
A lightweight Rust binary for executing grounded Google Web Searches via the Gemini API. Use this instead of MCP-based search servers — it connects using the shared gemini-cli OAuth credentials, requires no background server process, and consumes very few tokens.
Prerequisites
If no valid OAuth token is found, the CLI will automatically trigger the login flow and open Chrome for authentication.
# To force a login flow manually:
gsearch --login
Core workflow
Run the gsearch command followed by your search query. Do not use quotes around the query unless necessary; the CLI handles spaced arguments automatically.
gsearch latest news about rust programming language
Commands
Search
gsearch <query...> # Search Google and return summarized results
Authentication
gsearch --login # Refresh or initiate OAuth authentication
Output Format
The binary returns a concise, summarized answer generated by Gemini, followed by a list of source citations mapping directly to markers in the text (e.g. [1], [2]).
Typical task pattern
- Determine that external, up-to-date information is needed.
- Formulate a precise search query.
gsearch <query>— execute the search.- Read the resulting summary and citations.
- Use the provided information to fulfill the user's request, referencing the citations if helpful.