| name | notebooklm |
| description | Interact with Google NotebookLM notebooks — chat with the AI, generate artifacts (slides, audio, video, mind maps, quizzes, flashcards, infographics, reports, data tables), manage sources (add URLs, YouTube, files, text), run research (fast/deep web research), and manage notes. Use when the user wants to query, create content from, or manage their NotebookLM notebooks and sources. |
NotebookLM AI Plugin
Supports:
- Chat with Notebook AI (source-grounded Q&A with citations)
- Slide Deck generation (PDF/PPTX)
- Audio Overview (M4A -- deep dive, brief, critique, debate formats)
- Video Overview (MP4 -- classic, whiteboard, kawaii, anime, watercolor styles)
- Mind Map (HTML)
- Flashcards (HTML/JSON)
- Quiz (HTML/JSON)
- Infographic (PNG -- landscape, portrait, square)
- Report (Markdown -- briefing doc, study guide, blog post)
- Data Table (CSV / Google Sheets export)
- Source management (add URLs, YouTube, files, pasted text; list, delete)
- Fast/Deep web research with auto-import
- Notes management (create, update, delete, list)
- Notebook library management (add, list, search, activate)
Quick start
npx -y bun scripts/main.ts login
npx -y bun scripts/main.ts notebooks add https://notebooklm.google.com/notebook/abc123 --name "My Research"
npx -y bun scripts/main.ts generate slide_deck --notebook abc123 --output slides.pdf
npx -y bun scripts/main.ts generate audio --format deep_dive --length long
npx -y bun scripts/main.ts generate video --style whiteboard --output explainer.mp4
npx -y bun scripts/main.ts generate quiz --difficulty medium --quantity more --json
npx -y bun scripts/main.ts generate mind_map --output mindmap.png
npx -y bun scripts/main.ts generate infographic --orientation portrait --output info.png
npx -y bun scripts/main.ts generate report --format study_guide --output report.md
npx -y bun scripts/main.ts generate flashcards --difficulty easy --json
npx -y bun scripts/main.ts generate data_table --output data.csv
Commands
Authentication
npx -y bun scripts/main.ts login
First run opens Chrome for Google login. Cookies are cached for subsequent runs.
npx -y bun scripts/main.ts login --force
GARY — the candidate context notebook (create / RECREATE)
GARY keeps ONE notebook per user = the candidate RAG (CV + technical/soft skills + role families + onboarding
answers). It is created during onboarding. If the user deletes it from the NotebookLM website (or the saved
id 404s), recreate it the SAME way — this is the supported recovery path, done by you (the LM supervisor):
npx -y bun scripts/main.ts notebooks create --name GARY --json
npx -y bun scripts/main.ts sources add-file data/cv/base/<cv-file>.pdf --notebook <uuid>
npx -y bun scripts/main.ts sources add-file data/cv/base/gary-context.md --notebook <uuid>
Then write the new <uuid> back to GARY's onboarding state so the app opens the right notebook (the desktop
app persists it as notebookId; from the app the ingest emits a gary://ingest {kind:"notebook", id} event).
Notes:
- Auth reuses the ONE automation browser
:9333 (the same one all job-board connections use — it already
holds the Google/Gmail session). GARY bridges its cookies via engines/notebooklm-session.mjs →
login --cookies "<header>". Do NOT spawn a second browser or run login (which polls for 5 min). Just being
logged into Gmail is not enough — the browser must have entered NotebookLM (passed Google's account chooser).
- The RPC auth works because
rpc-client.ts init() follows redirects (refreshing the rotating
__Secure-1PSIDTS); only the long-lived __Secure-1PSID must stay valid.
- Host (NotebookLM → Gemini migration): the app moved to
notebook.google.com. The legacy
notebooklm.google.com still serves the app HTML via redirect, but every batchexecute RPC posted there
answers 401 — that's why notebooks create blew up while login/status looked healthy. The host is now
resolved at runtime (scripts/host.ts): init() pins the origin where the redirect chain lands and all
requests (RPC, chat stream, upload, media) target it. Never hardcode a host; if Google moves it again this
keeps working. engines/notebooklm-session.mjs validates by PROBING a real read-only RPC (wXbhsf) on the
resolved origin — "the page loaded" is not proof the session authorizes RPCs.
login NUNCA guarda una sesión sin probarla (scripts/session.ts → assertSessionAuthorizes: init()
- un
wXbhsf real). Tener SID + __Secure-1PSID NO prueba nada — sobreviven a una sesión muerta y
notebook.google.com/login también es "una URL de NotebookLM". Antes eso hacía que "Verificar sesión"
dijera OK, sobrescribiera cookies.json con cookies muertas, y el fallo apareciera tarde en
notebooks create → "NotebookLM redirected to Google login". Ahora los tres caminos validan:
login --cookies <hdr> (puente :9333) rechaza y sale 1 sin tocar el archivo; login sin --force
re-loguea si la sesión guardada ya no autoriza; login --force sigue sondeando hasta que el probe pase.
Además se guarda el jar REFRESCADO (Google rota durante el ).
Notebook Management
npx -y bun scripts/main.ts notebooks list
npx -y bun scripts/main.ts notebooks add <url> [--name <name>] [--description <desc>] [--topics <t1,t2>]
npx -y bun scripts/main.ts notebooks remove <id>
npx -y bun scripts/main.ts notebooks activate <id>
npx -y bun scripts/main.ts notebooks search <query>
Chat with Notebook AI
npx -y bun scripts/main.ts chat --question "What are the key findings?" --notebook abc123
npx -y bun scripts/main.ts chat --question "Tell me more about that" --conversation-id <id>
npx -y bun scripts/main.ts chat --question "Summarize the methodology" --json
Source Management
npx -y bun scripts/main.ts sources list --notebook abc123
npx -y bun scripts/main.ts sources add-url https://example.com/article --notebook abc123
npx -y bun scripts/main.ts sources add-youtube https://youtube.com/watch?v=xxx --notebook abc123
npx -y bun scripts/main.ts sources add-text --title "My Notes" --content "Important findings..." --notebook abc123
npx -y bun scripts/main.ts sources add-file ./paper.pdf --notebook abc123
npx -y bun scripts/main.ts sources delete <sourceId> --notebook abc123
Supported file types: PDF, TXT, MD, DOCX, CSV, EPUB, images (PNG, JPG, WEBP, etc.), audio/video files.
Research
npx -y bun scripts/main.ts research fast --query "latest AI agent frameworks" --notebook abc123
npx -y bun scripts/main.ts research deep --query "state of LLM reasoning" --notebook abc123
npx -y bun scripts/main.ts research fast --query "topic" --notebook abc123 --import
npx -y bun scripts/main.ts research status --notebook abc123
Notes
npx -y bun scripts/main.ts notes list --notebook abc123
npx -y bun scripts/main.ts notes create --title "Key Takeaways" --content "1. Finding one..." --notebook abc123
npx -y bun scripts/main.ts notes update <noteId> --title "Updated Title" --content "New content" --notebook abc123
npx -y bun scripts/main.ts notes delete <noteId> --notebook abc123
Artifact Generation
npx -y bun scripts/main.ts generate <type> [options]
Types: slide_deck, audio, video, mind_map, flashcards, quiz, infographic, report, data_table
Options
Global Options
| Option | Description |
|---|
--notebook <url|id> | Notebook URL or library ID (defaults to active notebook) |
--output <path> | Output file path (auto-named if omitted) |
--instructions <text> | Custom instructions for generation |
--json | Output as JSON |
--login | Refresh cookies only, then exit |
--help, -h | Show help |
Slide Deck Options
| Option | Description |
|---|
--format <type> | Output format: pdf (default), pptx |
Audio Overview Options
| Option | Description |
|---|
--format <type> | Audio format: deep_dive (default), brief, critique, debate |
--length <length> | Duration: short, default, long |
--language <lang> | Language code (default: en) |
Video Overview Options
| Option | Description |
|---|
--style <style> | Visual style: auto (default), classic, whiteboard, kawaii, anime, watercolor |
--format <type> | Video format: explainer (default), brief |
Quiz Options
| Option | Description |
|---|
--difficulty <level> | Difficulty: easy, medium (default), hard |
--quantity <amount> | Number of questions: fewer, standard, more |
Flashcards Options
| Option | Description |
|---|
--difficulty <level> | Difficulty: easy, medium (default), hard |
--quantity <amount> | Number of cards: fewer, standard, more |
Infographic Options
| Option | Description |
|---|
--orientation <type> | Layout: landscape (default), portrait, square |
Report Options
| Option | Description |
|---|
--format <type> | Report format: briefing_doc (default), study_guide, blog_post |
Data Table Options
| Option | Description |
|---|
--format <type> | Output format: csv (default), sheets (Google Sheets export) |
Artifact Types
| Type | Output Format | Description |
|---|
slide_deck | PDF/PPTX | Presentation slides summarizing notebook sources |
audio | M4A | Audio overview in conversation format (deep dive, brief, critique, debate) |
video | MP4 | Animated video overview with visual styles |
mind_map | PNG | Visual mind map of key concepts and relationships |
flashcards | HTML/JSON | Study flashcards generated from source material |
quiz | HTML/JSON | Multiple-choice quiz with answer key |
infographic | PNG | Visual summary infographic in various orientations |
report | Markdown | Written report (briefing doc, study guide, blog post) |
data_table | CSV/Sheets | Structured data extracted from sources |
Authentication
First run opens Chrome to authenticate with Google. Cookies are cached for subsequent runs. Uses CDP browser automation for the login flow, then direct batchexecute RPC calls for all operations.
npx -y bun scripts/main.ts login --force
Environment variables
| Variable | Description |
|---|
NOTEBOOKLM_DATA_DIR | Data directory override |
NOTEBOOKLM_COOKIE_PATH | Cookie file path |
NOTEBOOKLM_CHROME_PROFILE_DIR | Chrome profile directory |
NOTEBOOKLM_OUTPUT_DIR | Default output directory |
Rate Limits
NotebookLM free tier limits:
| Resource | Limit |
|---|
| Audio/video overviews | 3 per day |
| Reports/flashcards/quizzes | 10 per day |
| Daily chats | 50 |
| Total notebooks | 100 |
| Sources per notebook | 50 |
Examples
Generate a slide deck from a specific notebook
npx -y bun scripts/main.ts generate slide_deck \
--notebook https://notebooklm.google.com/notebook/abc123 \
--output presentation.pdf
Create an audio deep dive with custom instructions
npx -y bun scripts/main.ts generate audio \
--format deep_dive \
--length long \
--instructions "Focus on the methodology section and compare approaches"
Generate a whiteboard-style video overview
npx -y bun scripts/main.ts generate video \
--style whiteboard \
--length medium \
--output explainer.mp4
Create a quiz and get JSON output for integration
npx -y bun scripts/main.ts generate quiz \
--difficulty hard \
--quantity more \
--json > quiz_data.json
Generate a portrait infographic
npx -y bun scripts/main.ts generate infographic \
--orientation portrait \
--instructions "Highlight the three main findings" \
--output summary.png
Export structured data as CSV
npx -y bun scripts/main.ts generate data_table \
--format csv \
--output extracted_data.csv