# notebooklm-py — NotebookLM CLI + Python API Skill > notebooklm-py provides a CLI + Python API for NotebookLM with agent hooks; verified 13,142★ and uses Playwright Chromium for browser login. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use ```bash pipx install "notebooklm-py[browser]" # or pip install in a venv playwright install chromium # ~170MB download (README note) notebooklm login # opens browser for Google OAuth notebooklm create "My Research" notebooklm source add "https://en.wikipedia.org/wiki/Artificial_intelligence" notebooklm ask "What are the key themes?" ``` ## Intro notebooklm-py provides a CLI + Python API for NotebookLM with agent hooks; verified 13,142★ and uses Playwright Chromium for browser login. **Best for:** Researchers and builders automating NotebookLM ingestion, chat, and artifact downloads from scripts **Works with:** Python 3.10+ (per README), Playwright Chromium for login, and NotebookLM web accounts **Setup time:** 12-25 minutes ### Key facts (verified) - GitHub: 13142 stars · 1826 forks · pushed 2026-05-13. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-backed entrypoint: `notebooklm login`. ## Main - Treat auth as a first-class step: run `notebooklm auth check --test` after login, and keep a known-good storage state for CI/headless usage. - Start with a small notebook + 1–2 sources, then add `generate` / `download` flows only after you can reliably `ask` with citations. - Because this is an unofficial wrapper over undocumented APIs, pin versions in automation and expect breakage; keep troubleshooting links near your runbooks. ### Source-backed notes - README explicitly warns it is unofficial and uses undocumented Google APIs that may break without notice. - README shows CLI flows: create/use notebooks, add sources, ask questions, generate artifacts, and download outputs (MP3/MP4/PDF/PNG/CSV/JSON/Markdown). - README notes a browser-based login via Playwright Chromium and includes a size/time hint for the Chromium install (~170MB; ~30–90s). ### FAQ - **Is this affiliated with Google?**: No — README says it’s unofficial and not affiliated with Google. - **Can I use it headless?**: Yes — README documents cookie/storage-state based auth paths, but you should validate with `auth check`. - **What breaks most often?**: Auth and internal endpoints; pin versions and keep troubleshooting docs handy. ## Source & Thanks > Source: https://github.com/teng-lin/notebooklm-py > License: MIT > GitHub stars: 13142 · forks: 1826 --- ## Quick Use ```bash pipx install "notebooklm-py[browser]" # or pip install in a venv playwright install chromium # ~170MB download (README note) notebooklm login # opens browser for Google OAuth notebooklm create "My Research" notebooklm source add "https://en.wikipedia.org/wiki/Artificial_intelligence" notebooklm ask "What are the key themes?" ``` ## Intro notebooklm-py 为 Google NotebookLM 提供 CLI 与 Python API,并支持 Claude Code/Codex 等 agent 集成;已验证 13,142★,登录流程基于 Playwright。 **Best for:** 希望用脚本自动化 NotebookLM 导入、问答与产物下载的研究/开发者 **Works with:** Python 3.10+(README 标注)、Playwright Chromium 登录,以及 NotebookLM 账号 **Setup time:** 12-25 minutes ### Key facts (verified) - GitHub:13142 stars · 1826 forks;最近更新 2026-05-13。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中可对照的入口命令:`notebooklm login`。 ## Main - 把认证当作第一步:登录后跑 `notebooklm auth check --test`,并保存稳定的 storage state 以支持 CI/无头环境。 - 先用小 notebook + 1–2 个 source 验证稳定性;能稳定 `ask` 后再接入 `generate` / `download` 流程。 - 由于它是对未公开接口的非官方封装,自动化里要固定版本并预期变更;把 troubleshooting 链接写进 runbook。 ### Source-backed notes - README 明确提示该项目为非官方,并依赖未公开的 Google 内部接口,可能随时变更导致失效。 - README 展示 CLI 流程:创建/切换 notebook、添加 source、提问、生成产物与下载输出(MP3/MP4/PDF/PNG/CSV/JSON/Markdown)。 - README 的登录流程基于 Playwright Chromium,并给出体积/耗时提示(约 170MB;约 30–90 秒)。 ### FAQ - **这是 Google 官方项目吗?**:不是。README 标注为非官方且不隶属 Google。 - **能在无头环境用吗?**:可以。README 提到基于 cookie/storage-state 的方式,但建议用 `auth check` 做验证。 - **最常见的故障点是什么?**:认证与内部接口变更;建议固定版本并保留 troubleshooting 路径。 ## Source & Thanks > Source: https://github.com/teng-lin/notebooklm-py > License: MIT > GitHub stars: 13142 · forks: 1826 --- Source: https://tokrepo.com/en/workflows/notebooklm-py-notebooklm-cli-python-api-skill Author: Skill Factory