Query Google NotebookLM notebooks for source-grounded, citation-backed answers from Gemini. Reduces hallucinations by getting answers exclusively from your uploaded documents.
Interact with Google NotebookLM to query documentation with Gemini's source-grounded answers.
Trigger when user:
https://notebooklm.google.com/notebook/...)NEVER call scripts directly. ALWAYS use the full path with run.py:
# ✅ CORRECT - Use run.py with full path:
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py status
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py list
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py ask_question.py --question "..."
# ❌ WRONG - Never call directly:
python3 ~/.config/opencode/skills/notebooklm/scripts/auth_manager.py status
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py status
If not authenticated, proceed to setup.
# Browser MUST be visible for manual Google login
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py setup
Important:
# List all notebooks
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py list
# Add notebook to library (ALL parameters are REQUIRED!)
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py add \
--url "https://notebooklm.google.com/notebook/..." \
--name "Descriptive Name" \
--description "What this notebook contains" \
--topics "topic1,topic2,topic3"
# Search notebooks by topic
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py search --query "keyword"
# Set active notebook
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py activate --id notebook-id
# Remove notebook
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py remove --id notebook-id
# Basic query (uses active notebook if set)
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py ask_question.py --question "Your question here"
# Query specific notebook
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py ask_question.py --question "..." --notebook-id notebook-id
# Query with notebook URL directly
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py ask_question.py --question "..." --notebook-url "https://..."
# Show browser for debugging
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py ask_question.py --question "..." --show-browser
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py setup # Initial setup
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py status # Check status
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py reauth # Re-authenticate
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py clear # Clear auth
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py add --url URL --name NAME --description DESC --topics TOPICS
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py list
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py search --query QUERY
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py activate --id ID
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py remove --id ID
python3 ~/.config/opencode/skills/notebooklm/scripts/run.py ask_question.py --question "..." [--notebook-id ID] [--notebook-url URL]
User mentions NotebookLM
↓
Check auth → python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py status
↓
If not authenticated → python3 ~/.config/opencode/skills/notebooklm/scripts/run.py auth_manager.py setup
↓
Check/Add notebook → python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py list/add
↓
Activate notebook → python3 ~/.config/opencode/skills/notebooklm/scripts/run.py notebook_manager.py activate --id ID
↓
Ask question → python3 ~/.config/opencode/skills/notebooklm/scripts/run.py ask_question.py --question "..."
↓
Synthesize and respond to user
| Problem | Solution |
|---|---|
| ModuleNotFoundError | Use run.py wrapper with full path |
| Authentication fails | Browser must be visible for setup! |
| Rate limit (50/day) | Wait or switch Google account |
| Browser crashes | python3 ~/.config/opencode/skills/notebooklm/scripts/run.py cleanup_manager.py --preserve-library |
| Notebook not found | Check with notebook_manager.py list |
All data stored in ~/.config/opencode/skills/notebooklm/data/:
library.json - Notebook metadataauth_info.json - Authentication statusbrowser_state/ - Browser cookies and session