This tool uses the Gemini CLI to retrieve up-to-date information directly from the internet in a single streamed response. It is suited for requesting the model to actively search the public web for best practices and fresh knowledge beyond local context.
Explicitly instructing the model to search the internet for a focused topic:
gemini -y -p "Find best practices on applying @MainActor in swift6, search internet"
You provide a natural language instruction via -p
(prompt). The response is streamed as Markdown (headings, lists, code blocks, links) which you can parse or summarize directly.
-p <prompt>
: The full prompt string (quote it if it has spaces or special characters).-y
: (Assume/auto confirm) non-interactive / always yes mode so the tool runs without additional confirmations.
The CLI streams Markdown. Typical elements you may see:
- Headings summarizing the topic or news clusters.
- Bullet lists of key points, dates, entities.
- Inline source links (when available) or reference-style links at the bottom.
- Code fences for technical examples.
There is no intermediate JSON layer; consume the Markdown directly. If you require structured data, post‑process the Markdown (e.g., extract links, headings, bullet items).
- Craft a precise prompt describing the needed information and, when web freshness matters, explicitly include phrases like "search internet" or "latest".
- Ask for structured formatting (e.g., "Provide a table", "Return a bullet list of sources with URLs") inside the prompt if you need easier parsing.
- If additional depth on a subtopic is required, issue a follow-up prompt referencing the earlier result (no need to restate everything, just the refinement).
- Capture streamed Markdown; optionally persist then parse for citations, entities, or summaries.
- Be explicit when real-time or external lookup is required (e.g., include "search internet", "current", "latest", or a date range).
- Request source URLs: e.g., "Include source links for each claim".
- Ask for separation of speculative vs confirmed info when dealing with emerging stories.
- For large scopes, constrain: "Summarize top 5 developments in over the past 7 days; list each with a one-line rationale and a source link."
- If output may be long, you can pipe to a temp file for later filtering:
gemini -y -p "latest developments in webgpu adoption, search internet, provide sources" > /tmp/gemini_webgpu.md
gemini -y -p "Summarize the 5 most impactful iOS performance tuning techniques announced in the last 3 months, search internet, include source links, output a markdown table."
gemini -y -p "Find best practices on applying @MainActor in swift6, search internet, distinguish official guidance vs community patterns, list risks."