Content
# NotebookLM Skill
Query and manage Google NotebookLM notebooks from your AI coding assistant.
## Supported AI Clients
<p align="center">
<a href="#claude-code"><img src="https://img.shields.io/badge/Claude_Code-D97757?style=for-the-badge&logo=anthropic&logoColor=white" alt="Claude Code" /></a>
<a href="#gemini-cli"><img src="https://img.shields.io/badge/Gemini_CLI-8E75B2?style=for-the-badge&logo=google&logoColor=white" alt="Gemini CLI" /></a>
<a href="#google-antigravity"><img src="https://img.shields.io/badge/Antigravity-4285F4?style=for-the-badge&logo=google&logoColor=white" alt="Google Antigravity" /></a>
<a href="#cursor"><img src="https://img.shields.io/badge/Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white" alt="Cursor" /></a>
<a href="#openai-codex-cli"><img src="https://img.shields.io/badge/OpenAI_Codex-412991?style=for-the-badge&logo=openai&logoColor=white" alt="OpenAI Codex" /></a>
<a href="#goose"><img src="https://img.shields.io/badge/Goose-FF6B35?style=for-the-badge&logo=go&logoColor=white" alt="Goose" /></a>
</p>
## Features
- Query notebooks with natural language questions
- Batch questions (`q1||q2||q3`) and question files
- Multi-notebook comparison across notebooks
- Manage notebook library (add, list, search, activate)
- Remote operations: create notebooks, add/delete/sync sources
- Source sync with hash-based deduplication
- Directory uploads with filters (extensions, size, modified date)
- Dry-run mode for all destructive operations
- Multiple auth profiles (work, personal, etc.)
- Exports to JSON or Markdown
- Headless Playwright automation (`--show-browser` for debug)
## Quick Install
### Claude Code
```bash
/plugin marketplace add sanjay3290/notebooklm-skill
```
### Gemini CLI / Cursor / Codex / Goose
```bash
npx skills add sanjay3290/notebooklm-skill
```
## Setup
### 1. Install dependencies
```bash
pip install -r requirements.txt
python -m playwright install chromium
```
### 2. Authenticate with a profile
```bash
python scripts/auth_manager.py setup --profile work
```
This opens a browser window for Google sign-in. Your session is stored persistently at `~/.config/claude/notebooklm-skill/` (override with `NOTEBOOKLM_DATA_DIR`).
### 3. Register a notebook
```bash
python scripts/notebook_manager.py add \
--url "https://notebooklm.google.com/notebook/..." \
--name "My Notebook" \
--description "What this notebook contains" \
--topics "topic1,topic2"
```
## Usage Examples
```bash
# Ask a single question against the active notebook
python scripts/ask_question.py --question "What are the key implementation details?"
# Ask by notebook ID or URL
python scripts/ask_question.py --question "Summarize auth flow" --notebook-id notebook-id
python scripts/ask_question.py --question "What is covered here?" --notebook-url "https://notebooklm.google.com/notebook/..."
# Batch questions (pipe-separated)
python scripts/ask_question.py --questions "q1||q2||q3" --notebook-id notebook-id
# Questions from a file (one per line)
python scripts/ask_question.py --questions-file ./questions.txt --notebook-id notebook-id
# Compare one question across multiple notebooks
python scripts/ask_question.py --question "What changed this week?" --compare-notebook-ids "notebook-a,notebook-b"
# Export answer as Markdown
python scripts/ask_question.py --question "Summarize" --notebook-id notebook-id --export-format markdown --save-notes
# Upload a directory of sources with filters
python scripts/remote_manager.py add-source --notebook-id notebook-id --dir ./docs --recursive --include-ext "md,txt" --max-size "10MB"
# Sync local files to notebook (add new, optionally delete removed)
python scripts/remote_manager.py sync-sources --notebook-id notebook-id --dir ./docs --recursive --delete-missing --dry-run
# List all notebooks in your library
python scripts/notebook_manager.py list
```
## Full Command Reference
### Authentication
```bash
# Check auth status
python scripts/auth_manager.py status --profile default
# Initial setup (opens browser for Google sign-in)
python scripts/auth_manager.py setup --profile work
# Re-authenticate an expired session
python scripts/auth_manager.py reauth --profile work
# Clear a specific profile
python scripts/auth_manager.py clear --profile work
# Clear all profiles
python scripts/auth_manager.py clear --all-profiles
# List all profiles
python scripts/auth_manager.py profiles
```
### Notebook Library
```bash
# List all registered notebooks
python scripts/notebook_manager.py list
# Add a notebook to the library
python scripts/notebook_manager.py add \
--url "https://notebooklm.google.com/notebook/..." \
--name "Notebook Name" \
--description "What this notebook contains" \
--topics "topic1,topic2"
# Set active notebook
python scripts/notebook_manager.py activate --id notebook-id
# Search notebooks by keyword
python scripts/notebook_manager.py search --query "keyword"
# Remove a notebook from the library
python scripts/notebook_manager.py remove --id notebook-id
# Show library statistics
python scripts/notebook_manager.py stats
```
### Ask NotebookLM
```bash
# Single question (active notebook)
python scripts/ask_question.py --question "What are the key implementation details?"
# Ask by notebook ID or URL
python scripts/ask_question.py --question "Summarize auth flow" --notebook-id notebook-id
python scripts/ask_question.py --question "What is covered here?" --notebook-url "https://notebooklm.google.com/notebook/..."
# Batch questions (pipe-separated)
python scripts/ask_question.py --questions "q1||q2||q3" --notebook-id notebook-id
# Questions from a file
python scripts/ask_question.py --questions-file ./questions.txt --notebook-id notebook-id
# Compare one question across multiple notebooks
python scripts/ask_question.py --question "What changed this week?" --compare-notebook-ids "notebook-a,notebook-b"
# Save structured export
python scripts/ask_question.py --question "Summarize" --notebook-id notebook-id --export-format markdown --save-notes
```
### Remote NotebookLM Operations
```bash
# List all notebooks in your Google account
python scripts/remote_manager.py list-remote --profile work
# Create a new notebook remotely
python scripts/remote_manager.py create-remote --name "My Notebook" --description "Description" --topics "topic1,topic2"
python scripts/remote_manager.py create-remote --name "My Notebook" --skip-library
python scripts/remote_manager.py create-remote --name "My Notebook" --dry-run
# List sources in a notebook
python scripts/remote_manager.py list-sources --notebook-id notebook-id
# Add sources (text, URL, file, or directory)
python scripts/remote_manager.py add-source --notebook-id notebook-id --text "Some source text"
python scripts/remote_manager.py add-source --notebook-id notebook-id --url "https://example.com"
python scripts/remote_manager.py add-source --notebook-id notebook-id --file "/path/to/file.pdf"
python scripts/remote_manager.py add-source --notebook-id notebook-id --dir "/path/to/folder" --recursive
python scripts/remote_manager.py add-source --notebook-id notebook-id --dir "/path/to/folder" --include-ext "md,txt" --exclude "*.tmp" --max-size "10MB" --modified-since "7d"
python scripts/remote_manager.py add-source --notebook-id notebook-id --dir "/path/to/folder" --copy-to-temp
python scripts/remote_manager.py add-source --notebook-id notebook-id --dir "/path/to/folder" --dry-run
# Delete sources
python scripts/remote_manager.py delete-source --notebook-id notebook-id --source-title "source title"
python scripts/remote_manager.py delete-source --notebook-id notebook-id --source-title "temp" --contains --all-matches
python scripts/remote_manager.py delete-source --notebook-id notebook-id --source-title "temp" --contains --all-matches --dry-run
# Sync local directory to notebook (add new, optionally remove deleted)
python scripts/remote_manager.py sync-sources --notebook-id notebook-id --dir "/path/to/folder" --recursive
python scripts/remote_manager.py sync-sources --notebook-id notebook-id --dir "/path/to/folder" --recursive --delete-missing
python scripts/remote_manager.py sync-sources --notebook-id notebook-id --manifest ./source-manifest.json --dry-run
```
### Common Options
These flags work with `ask_question.py` and `remote_manager.py`:
```bash
--profile work # Named auth profile
--retries 3 # Retry transient browser failures
--artifacts-dir /tmp/x # Screenshot/HTML dump directory
--show-browser # Show browser window for debugging
```
## Part of AI Skills Collection
This skill is also available in the [ai-skills](https://github.com/sanjay3290/ai-skills) collection with 20+ other skills for databases, research, image generation, Google Workspace, and more.
## License
Apache-2.0
Connection Info
You Might Also Like
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Fetch
Retrieve and process content from web pages by converting HTML into markdown format.
Agent-Reach
Give your AI agent eyes to see the entire internet. Read & search Twitter,...
Context 7
Context7 MCP provides up-to-date code documentation for any prompt.
context7-mcp
Context7 MCP Server provides natural language access to documentation for...
mempalace
The highest-scoring AI memory system ever benchmarked. And it's free.