notebooklm

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

NotebookLM Deep Research & Slide Generator

NotebookLM深度研究与幻灯片生成工具

Primary Workflow

核心工作流程

When user requests a presentation or research on a topic:
当用户请求针对某一主题生成演示文稿或开展研究时:

Step 1: Deep Research via NotebookLM MCP

步骤1:通过NotebookLM MCP开展深度研究

  1. Invoke the NotebookLM MCP to perform deep research on the topic
  2. Gather comprehensive sources and insights
  3. Extract key findings, data points, and citations
  1. 调用NotebookLM MCP针对指定主题进行深度研究
  2. 收集全面的研究素材与洞察信息
  3. 提取关键结论、数据点及引用来源

Step 2: Generate Highly Infographic Slide Presentation

步骤2:生成高信息密度的幻灯片演示文稿

Based on the user's topic outline, create visually-rich infographic slides:
Design Specifications:
  • Background: White (#FFFFFF)
  • Font: Arial (all text)
  • Style: HIGHLY INFOGRAPHIC - visual-first design
  • Content: Based exclusively on deep research sources
  • Citations: Include source references on each slide
Infographic Elements (REQUIRED on every content slide):
  • 📊 Charts & Graphs - Bar charts, pie charts, line graphs for data
  • 📈 Statistics Callouts - Large numbers with context (e.g., "87% of users...")
  • 🎯 Icons - Use relevant icons for each concept
  • 🔲 Flowcharts - Process diagrams, decision trees
  • 📋 Comparison Tables - Side-by-side comparisons
  • 🗺️ Diagrams - Concept maps, timelines, hierarchies
  • 💡 Highlight Boxes - Key takeaways in colored boxes
  • ➡️ Visual Hierarchy - Clear information flow
Infographic Design Rules:
  1. Minimal text - Max 6 bullet points per slide, each under 10 words
  2. Data visualization - Convert all statistics to visual charts
  3. Icon-driven - Every section header has an icon
  4. Color coding - Use consistent colors for categories
  5. White space - 40% of slide should be empty for clarity
  6. One idea per slide - Don't overcrowd
Slide Structure:
  1. Title Slide - Topic name, subtitle, date, hero image/icon
  2. Agenda/Outline - Visual roadmap with icons
  3. Content Slides - Infographic-style, one concept per slide
  4. Key Statistics - Large numbers with visual context
  5. Key Findings - Summary infographic
  6. Sources/References - Clean list with icons
基于用户的主题大纲,创建视觉丰富的信息图式幻灯片:
设计规范:
  • 背景: 白色(#FFFFFF)
  • 字体: Arial(所有文本)
  • 风格: 高信息密度——视觉优先设计
  • 内容: 完全基于深度研究素材
  • 引用: 每张幻灯片均包含来源参考
每张内容幻灯片必填的信息图元素:
  • 📊 图表与图形 - 用于数据展示的柱状图、饼图、折线图
  • 📈 统计数据标注 - 带有上下文的大字号数字(例如:“87%的用户...”)
  • 🎯 图标 - 为每个概念使用相关图标
  • 🔲 流程图 - 流程示意图、决策树
  • 📋 对比表格 - 并列对比内容
  • 🗺️ 示意图 - 概念图、时间线、层级图
  • 💡 高亮框 - 彩色框标注的关键要点
  • ➡️ 视觉层级 - 清晰的信息流转逻辑
信息图设计规则:
  1. 极简文本 - 每张幻灯片最多6个项目符号,每个不超过10个单词
  2. 数据可视化 - 将所有统计数据转换为可视化图表
  3. 图标驱动 - 每个章节标题都配有图标
  4. 颜色编码 - 为不同类别使用统一的颜色
  5. 留白 - 幻灯片40%区域应为空白以保证清晰度
  6. 单页单主题 - 避免内容过度拥挤
幻灯片结构:
  1. 标题页 - 主题名称、副标题、日期、主视觉图片/图标
  2. 议程/大纲页 - 带有图标的视觉化路线图
  3. 内容页 - 信息图风格,每页一个核心概念
  4. 关键统计数据页 - 带有视觉上下文的大字号数字
  5. 关键结论页 - 总结性信息图
  6. 来源/参考页 - 简洁的图标化列表

Step 3: Output Format

步骤3:输出格式

Generate slides as:
  • Markdown format (for review)
  • Or HTML/reveal.js format (for presentation)

生成的幻灯片支持以下格式:
  • Markdown格式(用于审阅)
  • 或HTML/reveal.js格式(用于演示)

NotebookLM API Reference

NotebookLM API参考文档

Complete programmatic access to Google NotebookLM—including capabilities not exposed in the web UI. Create notebooks, add sources (URLs, YouTube, PDFs, audio, video, images), chat with content, generate all artifact types, and download results in multiple formats.
可通过编程方式全面访问Google NotebookLM——包括网页界面未开放的功能。创建笔记本、添加素材(URL、YouTube视频、PDF、音频、视频、图片)、与内容对话、生成各类成果物,并以多种格式下载结果。

Installation

安装方法

From PyPI (Recommended):
bash
pip install notebooklm-py
From GitHub (use latest release tag, NOT main branch):
bash
undefined
从PyPI安装(推荐):
bash
pip install notebooklm-py
从GitHub安装(使用最新发布版本标签,而非main分支):
bash
undefined

Get the latest release tag (using curl)

获取最新发布版本标签(使用curl)


⚠️ **DO NOT install from main branch** (`pip install git+https://github.com/teng-lin/notebooklm-py`). The main branch may contain unreleased/unstable changes. Always use PyPI or a specific release tag, unless you are testing unreleased features.

After installation, install the Claude Code skill:
```bash
notebooklm skill install

⚠️ **请勿从main分支安装**(`pip install git+https://github.com/teng-lin/notebooklm-py`)。main分支可能包含未发布/不稳定的变更。请始终使用PyPI或特定的发布版本标签,除非您正在测试未发布功能。

安装完成后,安装Claude Code技能:
```bash
notebooklm skill install

Prerequisites

前置条件

IMPORTANT: Before using any command, you MUST authenticate:
bash
notebooklm login          # Opens browser for Google OAuth
notebooklm list           # Verify authentication works
If commands fail with authentication errors, re-run
notebooklm login
.
重要提示: 在使用任何命令之前,您必须完成身份验证:
bash
notebooklm login          # 打开浏览器进行Google OAuth验证
notebooklm list           # 验证身份验证是否成功
如果命令因身份验证错误失败,请重新运行
notebooklm login

CI/CD, Multiple Accounts, and Parallel Agents

CI/CD、多账户与并行Agent

For automated environments, multiple accounts, or parallel agent workflows:
VariablePurpose
NOTEBOOKLM_HOME
Custom config directory (default:
~/.notebooklm
)
NOTEBOOKLM_AUTH_JSON
Inline auth JSON - no file writes needed
CI/CD setup: Set
NOTEBOOKLM_AUTH_JSON
from a secret containing your
storage_state.json
contents.
Multiple accounts: Use different
NOTEBOOKLM_HOME
directories per account.
Parallel agents: The CLI stores notebook context in a shared file (
~/.notebooklm/context.json
). Multiple concurrent agents using
notebooklm use
can overwrite each other's context.
Solutions for parallel workflows:
  1. Always use explicit notebook ID (recommended): Pass
    -n <notebook_id>
    (for
    wait
    /
    download
    commands) or
    --notebook <notebook_id>
    (for others) instead of relying on
    use
  2. Per-agent isolation: Set unique
    NOTEBOOKLM_HOME
    per agent:
    export NOTEBOOKLM_HOME=/tmp/agent-$ID
  3. Use full UUIDs: Avoid partial IDs in automation (they can become ambiguous)
针对自动化环境、多账户或并行Agent工作流:
变量用途
NOTEBOOKLM_HOME
自定义配置目录(默认值:
~/.notebooklm
NOTEBOOKLM_AUTH_JSON
内联身份验证JSON - 无需写入文件
CI/CD设置: 从包含您
storage_state.json
内容的密钥中设置
NOTEBOOKLM_AUTH_JSON
多账户: 为每个账户使用不同的
NOTEBOOKLM_HOME
目录。
并行Agent: CLI将笔记本上下文存储在共享文件(
~/.notebooklm/context.json
)中。多个并发Agent使用
notebooklm use
命令可能会互相覆盖对方的上下文。
并行工作流解决方案:
  1. 始终使用明确的笔记本ID(推荐):传递
    -n <notebook_id>
    (用于
    wait
    /
    download
    命令)或
    --notebook <notebook_id>
    (用于其他命令),而非依赖
    use
    命令
  2. Agent级隔离: 为每个Agent设置唯一的
    NOTEBOOKLM_HOME
    export NOTEBOOKLM_HOME=/tmp/agent-$ID
  3. 使用完整UUID: 在自动化中避免使用部分ID(可能会产生歧义)

Agent Setup Verification

Agent设置验证

Before starting workflows, verify the CLI is ready:
  1. notebooklm status
    → Should show "Authenticated as: email@..."
  2. notebooklm list --json
    → Should return valid JSON (even if empty notebooks list)
  3. If either fails → Run
    notebooklm login
在启动工作流之前,请验证CLI是否已准备就绪:
  1. notebooklm status
    → 应显示“Authenticated as: email@...”
  2. notebooklm list --json
    → 应返回有效的JSON(即使笔记本列表为空)
  3. 如果任一命令失败 → 运行
    notebooklm login

When This Skill Activates

技能触发条件

Explicit: User says "/notebooklm", "use notebooklm", or mentions the tool by name
Intent detection: Recognize requests like:
  • "Create a podcast about [topic]"
  • "Summarize these URLs/documents"
  • "Generate a quiz from my research"
  • "Turn this into an audio overview"
  • "Create flashcards for studying"
  • "Generate a video explainer"
  • "Make an infographic"
  • "Create a mind map of the concepts"
  • "Download the quiz as markdown"
  • "Add these sources to NotebookLM"
显式触发: 用户输入"/notebooklm"、"use notebooklm"或直接提及该工具名称
意图检测: 识别以下类型的请求:
  • "创建关于[主题]的播客"
  • "总结这些URL/文档"
  • "根据我的研究生成测验"
  • "将此内容转换为音频概述"
  • "创建用于学习的抽认卡"
  • "生成视频讲解"
  • "制作信息图"
  • "创建概念思维导图"
  • "以Markdown格式下载测验"
  • "将这些素材添加到NotebookLM"

Autonomy Rules

自主运行规则

Run automatically (no confirmation):
  • notebooklm status
    - check context
  • notebooklm auth check
    - diagnose auth issues
  • notebooklm list
    - list notebooks
  • notebooklm source list
    - list sources
  • notebooklm artifact list
    - list artifacts
  • notebooklm language list
    - list supported languages
  • notebooklm language get
    - get current language
  • notebooklm language set
    - set language (global setting)
  • notebooklm artifact wait
    - wait for artifact completion (in subagent context)
  • notebooklm source wait
    - wait for source processing (in subagent context)
  • notebooklm research status
    - check research status
  • notebooklm research wait
    - wait for research (in subagent context)
  • notebooklm use <id>
    - set context (⚠️ SINGLE-AGENT ONLY - use
    -n
    flag in parallel workflows)
  • notebooklm create
    - create notebook
  • notebooklm ask "..."
    - chat queries
  • notebooklm source add
    - add sources
Ask before running:
  • notebooklm delete
    - destructive
  • notebooklm generate *
    - long-running, may fail
  • notebooklm download *
    - writes to filesystem
  • notebooklm artifact wait
    - long-running (when in main conversation)
  • notebooklm source wait
    - long-running (when in main conversation)
  • notebooklm research wait
    - long-running (when in main conversation)
自动运行(无需确认):
  • notebooklm status
    - 检查上下文
  • notebooklm auth check
    - 诊断身份验证问题
  • notebooklm list
    - 列出笔记本
  • notebooklm source list
    - 列出素材
  • notebooklm artifact list
    - 列出成果物
  • notebooklm language list
    - 列出支持的语言
  • notebooklm language get
    - 获取当前语言设置
  • notebooklm language set
    - 设置语言(全局设置)
  • notebooklm artifact wait
    - 等待成果物完成(在子Agent上下文中)
  • notebooklm source wait
    - 等待素材处理完成(在子Agent上下文中)
  • notebooklm research status
    - 检查研究状态
  • notebooklm research wait
    - 等待研究完成(在子Agent上下文中)
  • notebooklm use <id>
    - 设置上下文(⚠️ 仅支持单Agent - 在并行工作流中使用
    -n
    标志)
  • notebooklm create
    - 创建笔记本
  • notebooklm ask "..."
    - 对话查询
  • notebooklm source add
    - 添加素材
运行前需确认:
  • notebooklm delete
    - 破坏性操作
  • notebooklm generate *
    - 运行时间长,可能失败
  • notebooklm download *
    - 写入文件系统
  • notebooklm artifact wait
    - 运行时间长(在主对话中)
  • notebooklm source wait
    - 运行时间长(在主对话中)
  • notebooklm research wait
    - 运行时间长(在主对话中)

Quick Reference

快速参考

TaskCommand
Authenticate
notebooklm login
Diagnose auth issues
notebooklm auth check
Diagnose auth (full)
notebooklm auth check --test
List notebooks
notebooklm list
Create notebook
notebooklm create "Title"
Set context
notebooklm use <notebook_id>
Show context
notebooklm status
Add URL source
notebooklm source add "https://..."
Add file
notebooklm source add ./file.pdf
Add YouTube
notebooklm source add "https://youtube.com/..."
List sources
notebooklm source list
Wait for source processing
notebooklm source wait <source_id>
Web research (fast)
notebooklm source add-research "query"
Web research (deep)
notebooklm source add-research "query" --mode deep --no-wait
Check research status
notebooklm research status
Wait for research
notebooklm research wait --import-all
Chat
notebooklm ask "question"
Chat (new conversation)
notebooklm ask "question" --new
Chat (specific sources)
notebooklm ask "question" -s src_id1 -s src_id2
Chat (with references)
notebooklm ask "question" --json
Get source fulltext
notebooklm source fulltext <source_id>
Get source guide
notebooklm source guide <source_id>
Generate podcast
notebooklm generate audio "instructions"
Generate podcast (JSON)
notebooklm generate audio --json
Generate podcast (specific sources)
notebooklm generate audio -s src_id1 -s src_id2
Generate video
notebooklm generate video "instructions"
Generate quiz
notebooklm generate quiz
Check artifact status
notebooklm artifact list
Wait for completion
notebooklm artifact wait <artifact_id>
Download audio
notebooklm download audio ./output.mp3
Download video
notebooklm download video ./output.mp4
Download report
notebooklm download report ./report.md
Download mind map
notebooklm download mind-map ./map.json
Download data table
notebooklm download data-table ./data.csv
Download quiz
notebooklm download quiz quiz.json
Download quiz (markdown)
notebooklm download quiz --format markdown quiz.md
Download flashcards
notebooklm download flashcards cards.json
Download flashcards (markdown)
notebooklm download flashcards --format markdown cards.md
Delete notebook
notebooklm notebook delete <id>
List languages
notebooklm language list
Get language
notebooklm language get
Set language
notebooklm language set zh_Hans
Parallel safety: Use explicit notebook IDs in parallel workflows. Commands supporting
-n
shorthand:
artifact wait
,
source wait
,
research wait/status
,
download *
. Download commands also support
-a/--artifact
. Other commands use
--notebook
. For chat, use
--new
to start fresh conversations (avoids conversation ID conflicts).
Partial IDs: Use first 6+ characters of UUIDs. Must be unique prefix (fails if ambiguous). Works for:
use
,
delete
,
wait
commands. For automation, prefer full UUIDs to avoid ambiguity.
任务命令
身份验证
notebooklm login
诊断身份验证问题
notebooklm auth check
完整身份验证诊断
notebooklm auth check --test
列出笔记本
notebooklm list
创建笔记本
notebooklm create "Title"
设置上下文
notebooklm use <notebook_id>
显示上下文
notebooklm status
添加URL素材
notebooklm source add "https://..."
添加文件
notebooklm source add ./file.pdf
添加YouTube视频
notebooklm source add "https://youtube.com/..."
列出素材
notebooklm source list
等待素材处理完成
notebooklm source wait <source_id>
快速网页研究
notebooklm source add-research "query"
深度网页研究
notebooklm source add-research "query" --mode deep --no-wait
检查研究状态
notebooklm research status
等待研究完成
notebooklm research wait --import-all
对话
notebooklm ask "question"
新对话
notebooklm ask "question" --new
指定素材对话
notebooklm ask "question" -s src_id1 -s src_id2
带引用的对话
notebooklm ask "question" --json
获取素材全文
notebooklm source fulltext <source_id>
获取素材指南
notebooklm source guide <source_id>
生成播客
notebooklm generate audio "instructions"
生成播客(JSON格式)
notebooklm generate audio --json
指定素材生成播客
notebooklm generate audio -s src_id1 -s src_id2
生成视频
notebooklm generate video "instructions"
生成测验
notebooklm generate quiz
检查成果物状态
notebooklm artifact list
等待成果物完成
notebooklm artifact wait <artifact_id>
下载音频
notebooklm download audio ./output.mp3
下载视频
notebooklm download video ./output.mp4
下载报告
notebooklm download report ./report.md
下载思维导图
notebooklm download mind-map ./map.json
下载数据表
notebooklm download data-table ./data.csv
下载测验
notebooklm download quiz quiz.json
下载测验(Markdown格式)
notebooklm download quiz --format markdown quiz.md
下载抽认卡
notebooklm download flashcards cards.json
下载抽认卡(Markdown格式)
notebooklm download flashcards --format markdown cards.md
删除笔记本
notebooklm notebook delete <id>
列出支持语言
notebooklm language list
获取当前语言
notebooklm language get
设置语言
notebooklm language set zh_Hans
并行安全: 在并行工作流中使用明确的笔记本ID。支持
-n
简写的命令:
artifact wait
,
source wait
,
research wait/status
,
download *
。下载命令还支持
-a/--artifact
。其他命令使用
--notebook
。对于对话,使用
--new
启动新对话(避免对话ID冲突)。
部分ID: 使用UUID的前6个以上字符。必须是唯一前缀(如果有歧义则会失败)。适用于:
use
,
delete
,
wait
命令。在自动化中,优先使用完整UUID以避免歧义。

Command Output Formats

命令输出格式

Commands with
--json
return structured data for parsing:
Create notebook:
$ notebooklm create "Research" --json
{"id": "abc123de-...", "title": "Research"}
Add source:
$ notebooklm source add "https://example.com" --json
{"source_id": "def456...", "title": "Example", "status": "processing"}
Generate artifact:
$ notebooklm generate audio "Focus on key points" --json
{"task_id": "xyz789...", "status": "pending"}
Chat with references:
$ notebooklm ask "What is X?" --json
{"answer": "X is... [1] [2]", "conversation_id": "...", "turn_number": 1, "is_follow_up": false, "references": [{"source_id": "abc123...", "citation_number": 1, "cited_text": "Relevant passage from source..."}, {"source_id": "def456...", "citation_number": 2, "cited_text": "Another passage..."}]}
Source fulltext (get indexed content):
$ notebooklm source fulltext <source_id> --json
{"source_id": "...", "title": "...", "char_count": 12345, "content": "Full indexed text..."}
Understanding citations: The
cited_text
in references is often a snippet or section header, not the full quoted passage. The
start_char
/
end_char
positions reference NotebookLM's internal chunked index, not the raw fulltext. Use
SourceFulltext.find_citation_context()
to locate citations:
python
fulltext = await client.sources.get_fulltext(notebook_id, ref.source_id)
matches = fulltext.find_citation_context(ref.cited_text)  # Returns list[(context, position)]
if matches:
    context, pos = matches[0]  # First match; check len(matches) > 1 for duplicates
Extract IDs: Parse the
id
,
source_id
, or
task_id
field from JSON output.
带有
--json
标志的命令返回结构化数据以便解析:
创建笔记本:
$ notebooklm create "Research" --json
{"id": "abc123de-...", "title": "Research"}
添加素材:
$ notebooklm source add "https://example.com" --json
{"source_id": "def456...", "title": "Example", "status": "processing"}
生成成果物:
$ notebooklm generate audio "Focus on key points" --json
{"task_id": "xyz789...", "status": "pending"}
带引用的对话:
$ notebooklm ask "What is X?" --json
{"answer": "X is... [1] [2]", "conversation_id": "...", "turn_number": 1, "is_follow_up": false, "references": [{"source_id": "abc123...", "citation_number": 1, "cited_text": "Relevant passage from source..."}, {"source_id": "def456...", "citation_number": 2, "cited_text": "Another passage..."}]}
素材全文(获取索引内容):
$ notebooklm source fulltext <source_id> --json
{"source_id": "...", "title": "...", "char_count": 12345, "content": "Full indexed text..."}
理解引用: 引用中的
cited_text
通常是片段或章节标题,而非完整引用段落。
start_char
/
end_char
位置指向NotebookLM的内部分块索引,而非原始全文。使用
SourceFulltext.find_citation_context()
定位引用:
python
fulltext = await client.sources.get_fulltext(notebook_id, ref.source_id)
matches = fulltext.find_citation_context(ref.cited_text)  # 返回列表[(context, position)]
if matches:
    context, pos = matches[0]  # 第一个匹配项;如果len(matches) > 1则检查重复项
提取ID: 从JSON输出中解析
id
source_id
task_id
字段。

Generation Types

生成类型

All generate commands support:
  • -s, --source
    to use specific source(s) instead of all sources
  • --language
    to set output language (defaults to configured language or 'en')
  • --json
    for machine-readable output (returns
    task_id
    and
    status
    )
  • --retry N
    to automatically retry on rate limits with exponential backoff
TypeCommandOptionsDownload
Podcast
generate audio
--format [deep-dive|brief|critique|debate]
,
--length [short|default|long]
.mp3
Video
generate video
--format [explainer|brief]
,
--style [auto|classic|whiteboard|kawaii|anime|watercolor|retro-print|heritage|paper-craft]
.mp4
Slide Deck
generate slide-deck
--format [detailed|presenter]
,
--length [default|short]
.pdf
Infographic
generate infographic
--orientation [landscape|portrait|square]
,
--detail [concise|standard|detailed]
.png
Report
generate report
--format [briefing-doc|study-guide|blog-post|custom]
.md
Mind Map
generate mind-map
(sync, instant).json
Data Table
generate data-table
description required.csv
Quiz
generate quiz
--difficulty [easy|medium|hard]
,
--quantity [fewer|standard|more]
.json/.md/.html
Flashcards
generate flashcards
--difficulty [easy|medium|hard]
,
--quantity [fewer|standard|more]
.json/.md/.html
所有生成命令支持:
  • -s, --source
    使用特定素材而非全部素材
  • --language
    设置输出语言(默认为配置语言或'en')
  • --json
    用于机器可读输出(返回
    task_id
    status
  • --retry N
    在遇到速率限制时自动重试,使用指数退避策略
类型命令选项下载格式
播客
generate audio
--format [deep-dive|brief|critique|debate]
,
--length [short|default|long]
.mp3
视频
generate video
--format [explainer|brief]
,
--style [auto|classic|whiteboard|kawaii|anime|watercolor|retro-print|heritage|paper-craft]
.mp4
幻灯片
generate slide-deck
--format [detailed|presenter]
,
--length [default|short]
.pdf
信息图
generate infographic
--orientation [landscape|portrait|square]
,
--detail [concise|standard|detailed]
.png
报告
generate report
--format [briefing-doc|study-guide|blog-post|custom]
.md
思维导图
generate mind-map
(同步,即时生成).json
数据表
generate data-table
需要描述信息.csv
测验
generate quiz
--difficulty [easy|medium|hard]
,
--quantity [fewer|standard|more]
.json/.md/.html
抽认卡
generate flashcards
--difficulty [easy|medium|hard]
,
--quantity [fewer|standard|more]
.json/.md/.html

Features Beyond the Web UI

超出网页界面的功能

These capabilities are available via CLI but not in NotebookLM's web interface:
FeatureCommandDescription
Batch downloads
download <type> --all
Download all artifacts of a type at once
Quiz/Flashcard export
download quiz --format json
Export as JSON, Markdown, or HTML (web UI only shows interactive view)
Mind map extraction
download mind-map
Export hierarchical JSON for visualization tools
Data table export
download data-table
Download structured tables as CSV
Source fulltext
source fulltext <id>
Retrieve the indexed text content of any source
Programmatic sharing
share
commands
Manage sharing permissions without the UI
以下功能仅可通过CLI使用,网页界面不支持:
功能命令描述
批量下载
download <type> --all
一次性下载所有指定类型的成果物
测验/抽认卡导出
download quiz --format json
导出为JSON、Markdown或HTML格式(网页界面仅显示交互式视图)
思维导图提取
download mind-map
导出层级化JSON以便在可视化工具中使用
数据表导出
download data-table
以CSV格式下载结构化表格
素材全文获取
source fulltext <id>
获取任意素材的索引文本内容
程序化分享
share
命令
无需通过界面管理分享权限

Common Workflows

常见工作流

Research to Podcast (Interactive)

从研究到播客(交互式)

Time: 5-10 minutes total
  1. notebooklm create "Research: [topic]"
    if fails: check auth with
    notebooklm login
  2. notebooklm source add
    for each URL/document — if one fails: log warning, continue with others
  3. Wait for sources:
    notebooklm source list --json
    until all status=READY — required before generation
  4. notebooklm generate audio "Focus on [specific angle]"
    (confirm when asked) — if rate limited: wait 5 min, retry once
  5. Note the artifact ID returned
  6. Check
    notebooklm artifact list
    later for status
  7. notebooklm download audio ./podcast.mp3
    when complete (confirm when asked)
耗时: 总计5-10分钟
  1. notebooklm create "Research: [topic]"
    如果失败:使用
    notebooklm login
    检查身份验证
  2. notebooklm source add
    添加每个URL/文档 — 如果某个素材添加失败:记录警告,继续添加其他素材
  3. 等待素材处理完成:
    notebooklm source list --json
    直到所有素材状态为READY — 生成前必须完成
  4. notebooklm generate audio "Focus on [specific angle]"
    (运行前需确认) — 如果遇到速率限制:等待5分钟,重试一次
  5. 记录返回的成果物ID
  6. 稍后使用
    notebooklm artifact list
    检查状态
  7. 完成后使用
    notebooklm download audio ./podcast.mp3
    下载(运行前需确认)

Research to Podcast (Automated with Subagent)

从研究到播客(使用子Agent自动化)

Time: 5-10 minutes, but continues in background
When user wants full automation (generate and download when ready):
  1. Create notebook and add sources as usual
  2. Wait for sources to be ready (use
    source wait
    or check
    source list --json
    )
  3. Run
    notebooklm generate audio "..." --json
    → parse
    artifact_id
    from output
  4. Spawn a background agent using Task tool:
    Task(
      prompt="Wait for artifact {artifact_id} in notebook {notebook_id} to complete, then download.
              Use: notebooklm artifact wait {artifact_id} -n {notebook_id} --timeout 600
              Then: notebooklm download audio ./podcast.mp3 -a {artifact_id} -n {notebook_id}",
      subagent_type="general-purpose"
    )
  5. Main conversation continues while agent waits
Error handling in subagent:
  • If
    artifact wait
    returns exit code 2 (timeout): Report timeout, suggest checking
    artifact list
  • If download fails: Check if artifact status is COMPLETED first
Benefits: Non-blocking, user can do other work, automatic download on completion
耗时: 5-10分钟,但在后台运行
当用户需要完全自动化(生成完成后自动下载):
  1. 按常规方式创建笔记本并添加素材
  2. 等待素材处理完成(使用
    source wait
    或检查
    source list --json
  3. 运行
    notebooklm generate audio "..." --json
    → 从输出中解析
    artifact_id
  4. 使用Task工具启动后台Agent:
    Task(
      prompt="等待笔记本{notebook_id}中的成果物{artifact_id}完成,然后下载。
              使用命令:notebooklm artifact wait {artifact_id} -n {notebook_id} --timeout 600
              然后执行:notebooklm download audio ./podcast.mp3 -a {artifact_id} -n {notebook_id}",
      subagent_type="general-purpose"
    )
  5. 主对话继续进行,同时Agent在后台运行
子Agent错误处理:
  • 如果
    artifact wait
    返回退出码2(超时):报告超时,建议检查
    artifact list
  • 如果下载失败:先检查成果物状态是否为COMPLETED
优势: 非阻塞,用户可同时进行其他操作,完成后自动下载

Document Analysis

文档分析

Time: 1-2 minutes
  1. notebooklm create "Analysis: [project]"
  2. notebooklm source add ./doc.pdf
    (or URLs)
  3. notebooklm ask "Summarize the key points"
  4. notebooklm ask "What are the main arguments?"
  5. Continue chatting as needed
耗时: 1-2分钟
  1. notebooklm create "Analysis: [project]"
  2. notebooklm source add ./doc.pdf
    (或URL)
  3. notebooklm ask "Summarize the key points"
  4. notebooklm ask "What are the main arguments?"
  5. 根据需要继续对话

Bulk Import

批量导入

Time: Varies by source count
  1. notebooklm create "Collection: [name]"
  2. Add multiple sources:
    bash
    notebooklm source add "https://url1.com"
    notebooklm source add "https://url2.com"
    notebooklm source add ./local-file.pdf
  3. notebooklm source list
    to verify
Source limits: Max 50 sources per notebook Supported types: PDFs, YouTube URLs, web URLs, Google Docs, text files, Markdown, Word docs, audio files, video files, images
耗时: 取决于素材数量
  1. notebooklm create "Collection: [name]"
  2. 添加多个素材:
    bash
    notebooklm source add "https://url1.com"
    notebooklm source add "https://url2.com"
    notebooklm source add ./local-file.pdf
  3. notebooklm source list
    验证导入结果
素材限制: 每个笔记本最多50个素材 支持类型: PDF、YouTube URL、网页URL、Google Docs、文本文件、Markdown、Word文档、音频文件、视频文件、图片

Bulk Import with Source Waiting (Subagent Pattern)

带素材等待的批量导入(子Agent模式)

Time: Varies by source count
When adding multiple sources and needing to wait for processing before chat/generation:
  1. Add sources with
    --json
    to capture IDs:
    bash
    notebooklm source add "https://url1.com" --json  # → {"source_id": "abc..."}
    notebooklm source add "https://url2.com" --json  # → {"source_id": "def..."}
  2. Spawn a background agent to wait for all sources:
    Task(
      prompt="Wait for sources {source_ids} in notebook {notebook_id} to be ready.
              For each: notebooklm source wait {id} -n {notebook_id} --timeout 120
              Report when all ready or if any fail.",
      subagent_type="general-purpose"
    )
  3. Main conversation continues while agent waits
  4. Once sources are ready, proceed with chat or generation
Why wait for sources? Sources must be indexed before chat or generation. Takes 10-60 seconds per source.
耗时: 取决于素材数量
当添加多个素材且需要等待处理完成后再进行对话/生成时:
  1. 使用
    --json
    添加素材以捕获ID:
    bash
    notebooklm source add "https://url1.com" --json  # → {"source_id": "abc..."}
    notebooklm source add "https://url2.com" --json  # → {"source_id": "def..."}
  2. 启动后台Agent等待所有素材处理完成:
    Task(
      prompt="等待笔记本{notebook_id}中的素材{source_ids}处理完成。
              对每个素材执行:notebooklm source wait {id} -n {notebook_id} --timeout 120
              当所有素材准备就绪或有素材失败时进行报告。",
      subagent_type="general-purpose"
    )
  3. 主对话继续进行,同时Agent在后台运行
  4. 素材准备就绪后,继续进行对话或生成操作
为什么要等待素材? 素材必须完成索引后才能进行对话或生成。每个素材需要10-60秒。

Deep Web Research (Subagent Pattern)

深度网页研究(子Agent模式)

Time: 2-5 minutes, runs in background
Deep research finds and analyzes web sources on a topic:
  1. Create notebook:
    notebooklm create "Research: [topic]"
  2. Start deep research (non-blocking):
    bash
    notebooklm source add-research "topic query" --mode deep --no-wait
  3. Spawn a background agent to wait and import:
    Task(
      prompt="Wait for research in notebook {notebook_id} to complete and import sources.
              Use: notebooklm research wait -n {notebook_id} --import-all --timeout 300
              Report how many sources were imported.",
      subagent_type="general-purpose"
    )
  4. Main conversation continues while agent waits
  5. When agent completes, sources are imported automatically
Alternative (blocking): For simple cases, omit
--no-wait
:
bash
notebooklm source add-research "topic" --mode deep --import-all
耗时: 2-5分钟,后台运行
深度研究可查找并分析指定主题的网页素材:
  1. 创建笔记本:
    notebooklm create "Research: [topic]"
  2. 启动深度研究(非阻塞):
    bash
    notebooklm source add-research "topic query" --mode deep --no-wait
  3. 启动后台Agent等待并导入素材:
    Task(
      prompt="等待笔记本{notebook_id}中的研究完成并导入素材。
              使用命令:notebooklm research wait -n {notebook_id} --import-all --timeout 300
              报告导入的素材数量。",
      subagent_type="general-purpose"
    )
  4. 主对话继续进行,同时Agent在后台运行
  5. Agent完成后,素材将自动导入
替代方案(阻塞式): 对于简单场景,省略
--no-wait
bash
notebooklm source add-research "topic" --mode deep --import-all

Blocks for up to 5 minutes

最多阻塞5分钟


**When to use each mode:**
- `--mode fast`: Specific topic, quick overview needed (5-10 sources, seconds)
- `--mode deep`: Broad topic, comprehensive analysis needed (20+ sources, 2-5 min)

**Research sources:**
- `--from web`: Search the web (default)
- `--from drive`: Search Google Drive

**模式选择:**
- `--mode fast`: 特定主题,需要快速概述(5-10个素材,数秒完成)
- `--mode deep`: 广泛主题,需要全面分析(20+个素材,2-5分钟完成)

**研究来源:**
- `--from web`: 搜索网页(默认)
- `--from drive`: 搜索Google Drive

Output Style

输出风格

Progress updates: Brief status for each step
  • "Creating notebook 'Research: AI'..."
  • "Adding source: https://example.com..."
  • "Starting audio generation... (task ID: abc123)"
Fire-and-forget for long operations:
  • Start generation, return artifact ID immediately
  • Do NOT poll or wait in main conversation - generation takes 5-45 minutes (see timing table)
  • User checks status manually, OR use subagent with
    artifact wait
JSON output: Use
--json
flag for machine-readable output:
bash
notebooklm list --json
notebooklm auth check --json
notebooklm source list --json
notebooklm artifact list --json
JSON schemas (key fields):
notebooklm list --json
:
json
{"notebooks": [{"id": "...", "title": "...", "created_at": "..."}]}
notebooklm auth check --json
:
json
{"checks": {"storage_exists": true, "json_valid": true, "cookies_present": true, "sid_cookie": true, "token_fetch": true}, "details": {"storage_path": "...", "auth_source": "file", "cookies_found": ["SID", "HSID", "..."], "cookie_domains": [".google.com"]}}
notebooklm source list --json
:
json
{"sources": [{"id": "...", "title": "...", "status": "ready|processing|error"}]}
notebooklm artifact list --json
:
json
{"artifacts": [{"id": "...", "title": "...", "type": "Audio Overview", "status": "in_progress|pending|completed|unknown"}]}
Status values:
  • Sources:
    processing
    ready
    (or
    error
    )
  • Artifacts:
    pending
    or
    in_progress
    completed
    (or
    unknown
    )
进度更新: 每个步骤的简短状态
  • "正在创建笔记本'Research: AI'..."
  • "正在添加素材:https://example.com..."
  • "正在启动音频生成...(任务ID:abc123)"
长时操作的即发即忘模式:
  • 启动生成后立即返回成果物ID
  • 主对话中不轮询或等待 - 生成需要5-45分钟(见时间表格)
  • 用户手动检查状态,或使用子Agent的
    artifact wait
    命令
JSON输出: 使用
--json
标志获取机器可读输出:
bash
notebooklm list --json
notebooklm auth check --json
notebooklm source list --json
notebooklm artifact list --json
JSON schema(关键字段):
notebooklm list --json
:
json
{"notebooks": [{"id": "...", "title": "...", "created_at": "..."}]}
notebooklm auth check --json
:
json
{"checks": {"storage_exists": true, "json_valid": true, "cookies_present": true, "sid_cookie": true, "token_fetch": true}, "details": {"storage_path": "...", "auth_source": "file", "cookies_found": ["SID", "HSID", "..."], "cookie_domains": [".google.com"]}}
notebooklm source list --json
:
json
{"sources": [{"id": "...", "title": "...", "status": "ready|processing|error"}]}
notebooklm artifact list --json
:
json
{"artifacts": [{"id": "...", "title": "...", "type": "Audio Overview", "status": "in_progress|pending|completed|unknown"}]}
状态值:
  • 素材:
    processing
    ready
    (或
    error
  • 成果物:
    pending
    in_progress
    completed
    (或
    unknown

Error Handling

错误处理

On failure, offer the user a choice:
  1. Retry the operation
  2. Skip and continue with something else
  3. Investigate the error
Error decision tree:
ErrorCauseAction
Auth/cookie errorSession expiredRun
notebooklm auth check
then
notebooklm login
"No notebook context"Context not setUse
-n <id>
or
--notebook <id>
flag (parallel), or
notebooklm use <id>
(single-agent)
"No result found for RPC ID"Rate limitingWait 5-10 min, retry
GENERATION_FAILED
Google rate limitWait and retry later
Download failsGeneration incompleteCheck
artifact list
for status
Invalid notebook/source IDWrong IDRun
notebooklm list
to verify
RPC protocol errorGoogle changed APIsMay need CLI update
操作失败时,为用户提供选择:
  1. 重试操作
  2. 跳过并继续其他操作
  3. 调查错误原因
错误决策树:
错误原因操作
身份验证/ cookie错误会话过期运行
notebooklm auth check
然后
notebooklm login
"No notebook context"未设置上下文使用
-n <id>
--notebook <id>
标志(并行模式),或
notebooklm use <id>
(单Agent模式)
"No result found for RPC ID"速率限制等待5-10分钟后重试
GENERATION_FAILED
Google速率限制稍后等待并重试
下载失败生成未完成检查
artifact list
查看状态
无效的笔记本/素材IDID错误运行
notebooklm list
验证
RPC协议错误Google API变更可能需要更新CLI

Exit Codes

退出码

All commands use consistent exit codes:
CodeMeaningAction
0SuccessContinue
1Error (not found, processing failed)Check stderr, see Error Handling
2Timeout (wait commands only)Extend timeout or check status manually
Examples:
  • source wait
    returns 1 if source not found or processing failed
  • artifact wait
    returns 2 if timeout reached before completion
  • generate
    returns 1 if rate limited (check stderr for details)
所有命令使用一致的退出码:
代码含义操作
0成功继续
1错误(未找到、处理失败)检查stderr,参考错误处理部分
2超时(仅等待命令)延长超时时间或手动检查状态
示例:
  • source wait
    如果素材未找到或处理失败返回1
  • artifact wait
    如果在超时前未完成返回2
  • generate
    如果遇到速率限制返回1(检查stderr获取详细信息)

Known Limitations

已知限制

Rate limiting: Audio, video, quiz, flashcards, infographic, and slide deck generation may fail due to Google's rate limits. This is an API limitation, not a bug.
Reliable operations: These always work:
  • Notebooks (list, create, delete, rename)
  • Sources (add, list, delete)
  • Chat/queries
  • Mind-map, study-guide, report, data-table generation
Unreliable operations: These may fail with rate limiting:
  • Audio (podcast) generation
  • Video generation
  • Quiz and flashcard generation
  • Infographic and slide deck generation
Workaround: If generation fails:
  1. Check status:
    notebooklm artifact list
  2. Retry after 5-10 minutes
  3. Use the NotebookLM web UI as fallback
Processing times vary significantly. Use the subagent pattern for long operations:
OperationTypical timeSuggested timeout
Source processing30s - 10 min600s
Research (fast)30s - 2 min180s
Research (deep)15 - 30+ min1800s
Notesinstantn/a
Mind-mapinstant (sync)n/a
Quiz, flashcards5 - 15 min900s
Report, data-table5 - 15 min900s
Audio generation10 - 20 min1200s
Video generation15 - 45 min2700s
Polling intervals: When checking status manually, poll every 15-30 seconds to avoid excessive API calls.
速率限制: 音频、视频、测验、抽认卡、信息图和幻灯片生成可能因Google的速率限制而失败。这是API限制,而非Bug。
可靠操作: 以下操作始终有效:
  • 笔记本(列出、创建、删除、重命名)
  • 素材(添加、列出、删除)
  • 对话/查询
  • 思维导图、学习指南、报告、数据表生成
不可靠操作: 以下操作可能因速率限制失败:
  • 音频(播客)生成
  • 视频生成
  • 测验和抽认卡生成
  • 信息图和幻灯片生成
解决方法: 如果生成失败:
  1. 检查状态:
    notebooklm artifact list
  2. 5-10分钟后重试
  3. 作为备选方案使用NotebookLM网页界面
处理时间差异很大。 对于长时操作使用子Agent模式:
操作典型耗时建议超时时间
素材处理30秒 - 10分钟600秒
快速研究30秒 - 2分钟180秒
深度研究15 - 30+分钟1800秒
笔记即时不适用
思维导图即时(同步)不适用
测验、抽认卡5 - 15分钟900秒
报告、数据表5 - 15分钟900秒
音频生成10 - 20分钟1200秒
视频生成15 - 45分钟2700秒
轮询间隔: 手动检查状态时,每15-30秒轮询一次,避免过多API调用。

Language Configuration

语言配置

Language setting controls the output language for generated artifacts (audio, video, etc.).
Important: Language is a GLOBAL setting that affects all notebooks in your account.
bash
undefined
语言设置控制生成成果物(音频、视频等)的输出语言。
重要提示: 语言是全局设置,会影响您账户中的所有笔记本。
bash
undefined

List all 80+ supported languages with native names

列出80+种支持的语言及本地名称

notebooklm language list
notebooklm language list

Show current language setting

显示当前语言设置

notebooklm language get
notebooklm language get

Set language for artifact generation

设置成果物生成语言

notebooklm language set zh_Hans # Simplified Chinese notebooklm language set ja # Japanese notebooklm language set en # English (default)

**Common language codes:**
| Code | Language |
|------|----------|
| `en` | English |
| `zh_Hans` | 中文(简体) - Simplified Chinese |
| `zh_Hant` | 中文(繁體) - Traditional Chinese |
| `ja` | 日本語 - Japanese |
| `ko` | 한국어 - Korean |
| `es` | Español - Spanish |
| `fr` | Français - French |
| `de` | Deutsch - German |
| `pt_BR` | Português (Brasil) |

**Override per command:** Use `--language` flag on generate commands:
```bash
notebooklm generate audio --language ja   # Japanese podcast
notebooklm generate video --language zh_Hans  # Chinese video
Offline mode: Use
--local
flag to skip server sync:
bash
notebooklm language set zh_Hans --local  # Save locally only
notebooklm language get --local  # Read local config only
notebooklm language set zh_Hans # 简体中文 notebooklm language set ja # 日语 notebooklm language set en # 英语(默认)

**常用语言代码:**
| 代码 | 语言 |
|------|----------|
| `en` | 英语 |
| `zh_Hans` | 中文(简体) |
| `zh_Hant` | 中文(繁體) |
| `ja` | 日本語 |
| `ko` | 한국어 |
| `es` | Español - 西班牙语 |
| `fr` | Français - 法语 |
| `de` | Deutsch - 德语 |
| `pt_BR` | Português (Brasil) - 巴西葡萄牙语 |

**命令级覆盖:** 在生成命令中使用`--language`标志:
```bash
notebooklm generate audio --language ja   # 日语播客
notebooklm generate video --language zh_Hans  # 中文视频
离线模式: 使用
--local
标志跳过服务器同步:
bash
notebooklm language set zh_Hans --local  # 仅本地保存
notebooklm language get --local  # 仅读取本地配置

Troubleshooting

故障排除

bash
notebooklm --help              # Main commands
notebooklm auth check          # Diagnose auth issues
notebooklm auth check --test   # Full auth validation with network test
notebooklm notebook --help     # Notebook management
notebooklm source --help       # Source management
notebooklm research --help     # Research status/wait
notebooklm generate --help     # Content generation
notebooklm artifact --help     # Artifact management
notebooklm download --help     # Download content
notebooklm language --help     # Language settings
Diagnose auth:
notebooklm auth check
- shows cookie domains, storage path, validation status Re-authenticate:
notebooklm login
Check version:
notebooklm --version
Update skill:
notebooklm skill install
bash
notebooklm --help              # 主命令帮助
notebooklm auth check          # 诊断身份验证问题
notebooklm auth check --test   # 完整身份验证验证(含网络测试)
notebooklm notebook --help     # 笔记本管理帮助
notebooklm source --help       # 素材管理帮助
notebooklm research --help     # 研究状态/等待帮助
notebooklm generate --help     # 内容生成帮助
notebooklm artifact --help     # 成果物管理帮助
notebooklm download --help     # 内容下载帮助
notebooklm language --help     # 语言设置帮助
诊断身份验证:
notebooklm auth check
- 显示cookie域、存储路径、验证状态 重新身份验证:
notebooklm login
检查版本:
notebooklm --version
更新技能:
notebooklm skill install