Skip to main content

Unofficial terminal-first client for Google's Gemini Deep Research and Deep Research Max agents (not affiliated with Google).

Project description

gdr — Gemini Deep Research CLI

PyPI version Python versions License: MIT CI Ruff Checked with mypy

Status: Alpha. APIs and commands may change before v1.0.

Disclaimer: Unofficial, community-built CLI. Not affiliated with, endorsed by, or sponsored by Google LLC. "Gemini" and "Deep Research" are trademarks of Google LLC, used here nominatively to describe the APIs this tool interacts with.

A terminal-first client for Google's Gemini Deep Research and Deep Research Max agents. Run long-horizon research tasks from your shell and get cleanly organized artifacts — markdown reports, charts, citations, and a full transcript — saved to disk.

gdr is a thin, honest wrapper over the google-genai SDK. The SDK does the work; gdr adds ergonomics: streaming UI, safe config/secret management, local history, a collaborative planning flow, resume-after-disconnect, and safe MCP wiring.

Why

Deep Research tasks run for 5–60 minutes. Running them from a web UI means keeping a browser tab open. gdr decouples the task from your terminal session: start a research run, live-stream thought summaries, walk away, resume later by ID, and get artifacts on disk that fit into any downstream pipeline.

Install

# With pipx (recommended — isolated install)
pipx install gemini-deep-research

# With uv tool
uv tool install gemini-deep-research

# From source (dev)
git clone https://github.com/johnswyou/gemini-deep-research
cd gemini-deep-research
uv sync --extra dev
uv run gdr --help

Quickstart

export GEMINI_API_KEY=...             # get one at https://aistudio.google.com/apikey

# One-line research with the fast agent
gdr research "Latest trends in RISC-V adoption"

# Maximum-quality agent for due diligence
gdr research --max "Competitive landscape of EV batteries"

# Review and refine the agent's plan before it spends tokens
gdr research --plan "Impact of AI on semiconductor supply chain"

# Ground in your own documents
gdr research --file ~/Downloads/10k.pdf \
  "Compare risk factors vs our 2024 filing"

Each run produces a timestamped directory under ~/gdr-reports/ containing report.md, sources.json, transcript.json, metadata.json, and any generated images.

Command reference

Command Purpose
gdr research <query> Run a research task (fast agent by default, --max for Max)
gdr research --plan <query> Collaborative planning — review and refine the plan before execution
gdr status <id> Check the status of a running or completed task
gdr resume <id> Re-attach to a running task after Ctrl+C or disconnect
gdr follow-up <id> <question> Ask a follow-up using the previous interaction as context
gdr plan refine <id> <feedback> Iterate on a pending plan without executing
gdr plan approve <id> Approve and execute a pending plan
gdr cancel <id> Cancel a running task
gdr ls List recent interactions
gdr show <id> Render a saved artifact
gdr config {path,get,set,edit} Manage the TOML config file
gdr doctor [--fix] Diagnose and optionally repair your setup

Run gdr --help or gdr <command> --help for full flag reference.

See docs/USAGE.md for long-form command documentation, docs/MCP.md for MCP server integration, and docs/TROUBLESHOOTING.md for common failure modes and recovery recipes. Runnable demos live in examples/.

Configuration

Config lives at ~/.config/gdr/config.toml. Run gdr doctor --fix to scaffold it. Environment variables referenced with env:VAR_NAME are expanded at load time so secrets stay out of the file.

api_key = "env:GEMINI_API_KEY"
default_agent = "deep-research-preview-04-2026"
output_dir = "~/gdr-reports"
auto_open = true
confirm_max = true                  # prompt before running the Max agent
default_tools = ["google_search", "url_context", "code_execution"]
thinking_summaries = "auto"         # "auto" or "none"
visualization = "auto"              # "auto" or "off"
safe_untrusted = true               # auto-strip dangerous tools when --file/--url is used

[mcp_servers.factset]
url = "https://mcp.factset.com"
headers.Authorization = "Bearer env:FACTSET_TOKEN"

Safety

Deep Research agents can read files and the public web. gdr ships with:

  • Redaction of MCP auth headers and API keys from transcript.json.
  • Path confinement: derived artifact directories are confined to the configured output_dir and slug names are sanitized (an explicit --output is honored verbatim).
  • Header validation for MCP servers (no CRLF injection, no reserved names).
  • --untrusted-input flag that disables code_execution and mcp_server tools for a run — use when grounding in attacker-controlled files or URLs.

See docs/MCP.md for the MCP security model and docs/TROUBLESHOOTING.md for the --untrusted-input recipe.

Development

uv sync --extra dev
uv run ruff check .
uv run mypy src
uv run pytest -q

Roadmap

Deferred to v1.1: HTML/PDF export, cost estimation, SQLite history backend, interactive setup wizard. See docs/USAGE.md for the currently-shipping surface.

License

MIT. See LICENSE.

Credits

Built on Google's Gemini Interactions API and the google-genai Python SDK.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemini_deep_research-0.2.0.tar.gz (130.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gemini_deep_research-0.2.0-py3-none-any.whl (91.6 kB view details)

Uploaded Python 3

File details

Details for the file gemini_deep_research-0.2.0.tar.gz.

File metadata

  • Download URL: gemini_deep_research-0.2.0.tar.gz
  • Upload date:
  • Size: 130.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for gemini_deep_research-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b50b725de6c79172c7f84e219f73f9c689dd678cf0daf971aa048eb36b91dab9
MD5 434a6eabefeb3f522a7a191e86c3a5e3
BLAKE2b-256 8bcf2a4bd280cc4d96e54b5b7ce67ce6258b1bf1d4c0ce473fe5560bc23c97d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gemini_deep_research-0.2.0.tar.gz:

Publisher: release.yml on johnswyou/gemini-deep-research

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gemini_deep_research-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gemini_deep_research-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e74f0a64023687f4cf01bd6a71863a9f1be022622a86178b9443f4227f2c2960
MD5 41985bbb5b634c394832c18398ecb6f1
BLAKE2b-256 a54893106186dca5b8a1a12539bba7c1eca43a5abc823699b70cd1507ced343d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gemini_deep_research-0.2.0-py3-none-any.whl:

Publisher: release.yml on johnswyou/gemini-deep-research

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page