Gemini Deep Research CLI — run Google's Deep Research from the terminal. Shares authentication with notebooklm-mcp-cli.
- Deep Research — Run Gemini's multi-source deep research investigations (currently uses regular chat due to upstream API limitations)
- Chat — Interactive REPL and single-message chat with Gemini (works in non-interactive environments)
- Session Management — List, view, and continue past conversations
- Model Selection — Choose specific Gemini models, check availability and subscription tier
- Shared Auth — Login once, use with both gdr and nlm
- CDP Login — Browser-based authentication via Chrome DevTools Protocol
uv tool install git+https://github.com/Xpos587/gdr-cli.gitOr from source:
git clone https://github.com/Xpos587/gdr-cli.git
cd gdr-cli
uv sync
uv run gdr --help- Python 3.12+
- uv
- Chrome/Chromium (for login)
- Gemini Advanced subscription (for Deep Research)
gdr loginOpens Chrome for Google authentication. Cookies are saved to ~/.notebooklm-mcp-cli/profiles/default/.
gdr research "AI safety research landscape 2026"
gdr research "quantum computing applications" --no-confirm
gdr research "Rust vs Go for systems programming" -o report.md
gdr research "long topic" --timeout 60 --poll 15Research prints the chat CID immediately on start. If something goes wrong, you can open the research in the browser at https://gemini.google.com/app/<cid> (e.g. https://gemini.google.com/app/1975e4a9e33a362).
# Interactive REPL
gdr chat
# Single message (works in scripts, pipes, Claude Code, etc.)
gdr chat "Explain the difference between TCP and UDP"
# Continue last conversation
gdr chat -c
# Continue specific conversation (with or without c_ prefix)
gdr chat -c <chat-id># List recent chats
gdr chats list
# View conversation history
gdr chats show <chat-id>
# Limit turns displayed
gdr chats show <chat-id> -n 10Chat IDs are displayed without the c_ prefix (e.g. 1975e4a9e33a362). This is the same ID used in Gemini web URLs: https://gemini.google.com/app/1975e4a9e33a362. The c_ prefix is added automatically when needed for API calls.
gdr modelsLists available Gemini models, shows which are accessible for your account, and detects your subscription tier (free, plus, advanced). Probing uses metadata requests only — no inference, no limit consumption.
gdr doctorChecks auth, cookies, Gemini connectivity, subscription tier, and Deep Research availability.
| Command | Description |
|---|---|
gdr research <query> |
Run Deep Research on a topic |
gdr chat [prompt] |
Interactive chat REPL or single message |
gdr chats list |
List recent chat sessions |
gdr chats show <cid> |
View conversation history |
gdr models |
List available models and subscription tier |
gdr login |
Authenticate via Chrome CDP |
gdr doctor |
Diagnose auth and connectivity |
--profile, -p— Auth profile name (default:default)--version, -v— Show version--debug, -d— Enable debug logging from gemini_webapi
--timeout, -t— Max research time in minutes (default: 30)--poll— Status polling interval in seconds (default: 10)--no-confirm, -n— Skip plan confirmation and start immediately--output, -o— Write report to file--output-dir— Auto-save toDIR/{date}-{slug}.md--model, -m— Model name, e.g.gemini-3-pro-advanced(default: auto)
-
--continue, -c [CID]— Continue a chat by ID (omit for last chat). Accepts1975e4a9e33a362orc_1975e4a9e33a362 -
--model, -m— Model name, e.g.gemini-3-pro-advanced(default: auto) -
--limit, -n— Number of turns to display (default: 20)
gdr-cli stores authentication in the same directory as notebooklm-mcp-cli:
~/.notebooklm-mcp-cli/
├── profiles/
│ └── default/
│ ├── cookies.json
│ └── metadata.json
└── gdr-config.json
Login once with either tool, both can use the same Google cookies.
Deep Research API Status: The gemini_webapi library's deep_research() and create_deep_research_plan() APIs are currently non-functional (they hang indefinitely). As a workaround, gdr research uses regular chat with your research query. This still provides helpful responses, but lacks the structured deep research experience (planning, status updates, multi-step investigation). This will be fixed once the upstream library is updated.
git clone https://github.com/Xpos587/gdr-cli.git
cd gdr-cli
uv sync- Ruff — Fast Python linter and formatter (linting + formatting)
- BasedPyright — Static type checker (type checking)
- pytest — Testing framework with async support
- EditorConfig — Consistent editor settings
# Install dev dependencies
uv sync --group dev
# Run all quality checks
go-task check
# Fix all auto-fixable issues
go-task fix
# Run type checker
go-task typecheck
# Run linter
go-task lint
# Format code
go-task fmt
# Run tests
go-task test
# Run tests with coverage
go-task test:covMIT