notebooklm

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

NotebookLM Skill

NotebookLM Skill

Query NotebookLM notebooks and manage notebooks/sources via Playwright browser automation.
All commands run from the skill directory. All scripts output JSON to stdout and exit 1 on error. Use
--help
on any script for full flag reference.
通过Playwright浏览器自动化工具查询NotebookLM笔记本,并管理笔记本/数据源。
所有命令均在skill目录下运行。所有脚本会将JSON输出到标准输出,出错时退出码为1。在任意脚本后添加
--help
可查看完整的参数参考。

Workflow

工作流程

  1. Authenticate:
    python scripts/auth_manager.py setup --profile <name>
  2. Register notebook:
    python scripts/notebook_manager.py add --url <url> --name <name> --description <desc> --topics <topics>
  3. Ask questions:
    python scripts/ask_question.py --question "..." --notebook-id <id>
  4. Manage sources:
    python scripts/remote_manager.py add-source|sync-sources ...
  1. 认证
    python scripts/auth_manager.py setup --profile <name>
  2. 注册笔记本
    python scripts/notebook_manager.py add --url <url> --name <name> --description <desc> --topics <topics>
  3. 提问
    python scripts/ask_question.py --question "..." --notebook-id <id>
  4. 管理数据源
    python scripts/remote_manager.py add-source|sync-sources ...

Key Behaviors

核心特性

  • Runs headless by default; use
    --show-browser
    for debugging only.
  • Persistent Chrome profiles stored at
    ~/.config/claude/notebooklm-skill/
    (override with
    NOTEBOOKLM_DATA_DIR
    ).
  • Hash-based dedupe: file uploads skip unchanged sources automatically.
  • --dry-run
    available on all destructive/bulk operations (create, add-source, delete-source, sync-sources).
  • --retries N
    retries transient browser failures with screenshot/HTML artifact capture.
  • Batch mode (
    --questions "q1||q2||q3"
    ) and multi-notebook comparison (
    --compare-notebook-ids
    ) supported.
  • Exports to JSON or Markdown via
    --export-format markdown --save-notes
    .
  • Answers include a follow-up reminder prompting Claude to ask clarifying questions before replying.
  • 默认以无头模式运行;仅在调试时使用
    --show-browser
    参数。
  • 持久化Chrome配置文件存储在
    ~/.config/claude/notebooklm-skill/
    (可通过
    NOTEBOOKLM_DATA_DIR
    环境变量覆盖)。
  • 基于哈希的去重:文件上传时会自动跳过未修改的数据源。
  • 所有破坏性/批量操作(创建、添加数据源、删除数据源、同步数据源)均支持
    --dry-run
    参数。
  • --retries N
    参数可在浏览器出现临时故障时重试,并捕获截图/HTML文件。
  • 支持批量模式(
    --questions "q1||q2||q3"
    )和多笔记本对比(
    --compare-notebook-ids
    )功能。
  • 可通过
    --export-format markdown --save-notes
    参数导出为JSON或Markdown格式。
  • 回复内容包含后续提示,引导Claude在作答前先提出澄清问题。

Quick Reference

快速参考

bash
undefined
bash
undefined

Auth

认证

python scripts/auth_manager.py setup --profile work python scripts/auth_manager.py status --profile work
python scripts/auth_manager.py setup --profile work python scripts/auth_manager.py status --profile work

Library

库管理

python scripts/notebook_manager.py add --url "..." --name "..." --description "..." --topics "..." python scripts/notebook_manager.py list
python scripts/notebook_manager.py add --url "..." --name "..." --description "..." --topics "..." python scripts/notebook_manager.py list

Ask

提问

python scripts/ask_question.py --question "..." --notebook-id <id> python scripts/ask_question.py --questions "q1||q2" --notebook-id <id>
python scripts/ask_question.py --question "..." --notebook-id <id> python scripts/ask_question.py --questions "q1||q2" --notebook-id <id>

Sources

数据源管理

python scripts/remote_manager.py add-source --notebook-id <id> --dir ./docs --recursive python scripts/remote_manager.py sync-sources --notebook-id <id> --dir ./docs --recursive --delete-missing --dry-run

For full command reference with all flags and examples, see [references/commands.md](references/commands.md).
python scripts/remote_manager.py add-source --notebook-id <id> --dir ./docs --recursive python scripts/remote_manager.py sync-sources --notebook-id <id> --dir ./docs --recursive --delete-missing --dry-run

如需查看包含所有参数和示例的完整命令参考,请参阅[references/commands.md](references/commands.md)。