# notebooklm-py: drive Google NotebookLM from your assistant (teng-lin/notebooklm-py) — skill card for AI agents

> AgentGid skill card. Checked on 2026-11-02 against commit 4f91416 (version 0.8.5).
> Every fact comes from the pack's own files at that commit. Numbers marked "as reported" are the author's.
> Human page: https://agentgid.com/skills/teng-lin/notebooklm-py/

> Note: the pack has changed since this check; re-read its files before relying on details.

## Explain it to a non-programmer
Your assistant can work Google NotebookLM (now called Gemini Notebook) for you from the command line. It makes notebooks, adds your links and files, asks questions with cited answers, and makes podcasts, slides, quizzes or reports, then saves them to your computer. It is an unofficial tool that signs in as your Google account.

## Who it is for
- You use NotebookLM and want your assistant to do the clicking for you
- You want many sources added, or many podcasts, quizzes or slide decks made and saved in one go
- You want cited answers from your own documents inside Claude Code or Codex
- Not for: You want the general Gemini model, not NotebookLM notebooks
- Not for: You do not want a tool that keeps your Google sign-in in a file on your computer

## What it is
- Kind: scripts, knowledge
- License: MIT
- Repository: https://github.com/teng-lin/notebooklm-py

## What it does
- Checks that the Google sign-in really works before any task (notebooklm auth check --test --json)
- Uses the notebooklm command with JSON output and keeps the exact notebook, source and artifact IDs
- Waits until every added source is ready before chatting or generating
- Generates audio, video, slide decks, infographics, reports, mind maps, data tables, quizzes and flashcards, waits for them, then downloads that exact item
- Runs only read-only commands when something fails, before trying a fix
- Writes Python code with the library only when you ask for application code
- Never cuts: Asks first before deleting, generating, long waits, downloads, changing the account language or importing research; never prints or commits the sign-in files

## Skills
| Skill | Call | Changes code? | In plain words |
|---|---|---|---|
| notebooklm | plain language, when you mention NotebookLM, Gemini Notebook or notebooklm-py ("Make a podcast from these links in NotebookLM") | unclear | Runs NotebookLM for you and saves what it makes to your computer |

### notebooklm
- Asks for: Your sources: web links, YouTube, PDFs and other files, Google Drive, or pasted text
- Asks for: What to make: podcast, video, slide deck, infographic, report, mind map, data table, quiz or flashcards
- Asks for: Your question, for a cited answer
- Asks for: A Google sign-in in a browser the first time
- Gives: A new notebook and its ID
- Gives: Cited answers from your sources
- Gives: The finished podcast, video, slides, quiz or table, downloaded to a file
- Gives: Web or Drive research that can import what it finds, after you agree
- Say: "Make a NotebookLM notebook from these three links and download an audio overview as podcast.m4a"

## Know before installing
- Unofficial: it talks to undocumented Google services that can change or break without notice; not affiliated with Google.
- Your Google sign-in is saved as files (storage_state.json with live cookies, optionally master_token.json) in ~/.notebooklm/profiles/<name>/, created with owner-only permissions.
- The optional master token is a long-lived full-account credential that survives password changes; the author advises a dedicated Google account.
- Login choices: a browser window (Chromium, about 170 MB, downloads on first login), copying cookies from a browser you are already signed in to, or a master token.
- notebooklm skill install writes the skill into your home folder (~/.claude/skills/notebooklm and ~/.agents/skills/notebooklm), not into one project.
- An opt-in setting (NOTEBOOKLM_TRANSPORT=curl_cffi) makes its requests look like a web browser's, for networks where Google blocks the default connection.
- Google rate-limits generation; the skill says to retry only when you allow it.

## Install (official commands)
- Any assistant that can run commands (first, the tool itself): `uv tool install "notebooklm-py[browser]"` && `notebooklm login` && `notebooklm auth check --test --json` — Or pipx install "notebooklm-py[browser]". First login downloads Chromium (about 170 MB) and opens a Google sign-in. Remove: `uv tool uninstall notebooklm-py, then delete ~/.notebooklm to remove the saved sign-in`.
- Claude Code and .agents skill folders: `notebooklm skill install` — Writes ~/.claude/skills/notebooklm and ~/.agents/skills/notebooklm. notebooklm skill status --json shows what is installed. Remove: `delete those two folders`.
- Any agent (skills CLI): `npx skills add teng-lin/notebooklm-py` — Adds only the skill text; the notebooklm tool must still be installed.
- Sandboxed agents (e.g. Claude Settings → Capabilities): `notebooklm skill package` — Builds notebooklm-skill.zip to upload.

## What runs on the user's machine
- Code on the machine: yes (the notebooklm Python tool the skill tells your assistant to install and run (the SKILL.md itself has no hooks))
- Network: yes
- Install: pip / uv installs the notebooklm-py package from PyPI. No hooks or install scripts in the skill.
- notebooklm login: Opens a Chromium window (downloaded on first run) for Google sign-in, or reads cookies from an installed browser (--browser-cookies, may ask for Keychain access on macOS), or uses a master token. Saves storage_state.json (and master_token.json if used) under ~/.notebooklm/profiles/<name>/.
- Every command: Sends requests with your Google cookies to notebook.google.com (or notebooklm.google.com / the enterprise hosts) over Google's internal batchexecute calls; the opt-in Android backend uses NotebookLM's mobile gRPC service.
- Auth check / refresh: May refresh and rewrite the saved cookies; --passive keeps the check read-only.
- Downloads: Writes the files you name (audio, video, PDF, PNG, CSV, JSON, Markdown) to the paths given.
- notebooklm skill install: Writes SKILL.md into ~/.claude/skills/notebooklm/ and ~/.agents/skills/notebooklm/.
- Optional: source add --fallback-fetch fetches failed web pages itself; NOTEBOOKLM_REFRESH_CMD runs a command you set to refresh sign-in.

## Settings
- `NOTEBOOKLM_HOME`: Base folder for all files (default ~/.notebooklm)
- `NOTEBOOKLM_PROFILE`: Active profile name (default default)
- `NOTEBOOKLM_BACKEND`: web (default) or android
- `NOTEBOOKLM_AUTH_JSON`: Inline sign-in JSON for CI, short-lived fallback
- `NOTEBOOKLM_NOTEBOOK`: Default notebook ID
- `NOTEBOOKLM_HL`: Output language code (default en)
- `NOTEBOOKLM_TRANSPORT`: httpx (default) or curl_cffi browser-TLS impersonation
- `NOTEBOOKLM_REFRESH_CMD`: Command run to refresh sign-in
- `NOTEBOOKLM_LOG_LEVEL`: DEBUG / INFO / WARNING / ERROR

## Examples (from the pack's own files)
- The skill's source-to-podcast workflow: output format defined in SKILL.md
- Python version of the same flow: output format defined in SKILL.md

## Steps only the person can do
- Sign in to Google in the browser window that notebooklm login opens (or be signed in to a browser for --browser-cookies) (README.md (Quick Start) and docs/installation.md) Then: The agent runs notebooklm auth check --test --json and starts the workflow
- On macOS, allow Keychain access if you choose to import cookies from Chrome, Edge, Brave or Opera (docs/installation.md (platform notes)) Then: The tool reads the browser's Google cookies and saves the profile
- For unattended use, create a master token on a trusted machine with a dedicated Google account, and revoke it if exposed (docs/installation.md (master-token auth)) Then: The agent can refresh the sign-in without a browser
- Get Google AI Ultra if you want cinematic video (SKILL.md (Generation Notes)) Then: The agent can run generate video --format cinematic

## Mistakes to avoid
- Not: Force a pip install into the system Python with --break-system-packages. Instead: Install the CLI with uv tool install or pipx, or into the project's own environment for application code. Why: The skill forbids breaking an externally managed system Python
- Not: Run notebooklm status to see whether the sign-in works. Instead: Run notebooklm auth check --test --json and require status ok and token_fetch true. Why: status only shows the selected notebook, not whether the sign-in is valid
- Not: Download whatever artifact is newest in the notebook. Instead: Keep the artifact ID from the generate command and pass it with -a and -n to wait and download. Why: Another run may have made a newer artifact, so the wrong file gets saved
- Not: Let several agents share one profile and its storage_state.json. Instead: Give each concurrent run its own NOTEBOOKLM_PROFILE with its own credentials. Why: Profile and context writes collide between agents
- Not: Chat or generate right after adding a source. Instead: Run source wait for every source ID and continue only when each is ready. Why: The add command returns before the source is processed and carries no status

## What leaves the machine
- Your Google session cookies with every request, plus the sources you add (links, files, pasted text), your questions and generation prompts → Google NotebookLM servers (notebook.google.com, notebooklm.google.com or the enterprise hosts), Every notebooklm command that talks to a notebook. Opt out: Do not use the tool; there is no offline mode
- A direct fetch of a web page you added as a source → The website of that page, Only with source add --fallback-fetch. Opt out: Leave out --fallback-fetch (off by default)

## Lines in the pack aimed at agents (ask the person first)
- "Install the package in the user's existing environment; do not create a separate environment unless requested:" (SKILL.md): Ask the person before installing a package into their current Python environment; offer uv tool install or pipx
- "Safe inspection and explicitly requested creation, source addition, chat, and prompt suggestion can" (SKILL.md): Adding a source uploads that file or link to Google; confirm which files the person wants sent
- "`notebooklm login --master-token --account <email>`, then deploy `master_token.json`, not" (SKILL.md): A master token is a full-account Google credential; never create or copy one without the person's explicit request

## May I use it like this?
- commercial-app: yes (MIT: keep the license notice; using NotebookLM itself is subject to Google's own terms)
- redistribute-files: yes (MIT: keep the copyright and permission notice in copies)
- client-work: yes (MIT allows use in work for others)

## Which one to pick
- If You want Google NotebookLM to read your sources and make podcasts, slides, quizzes or cited answers: skill:teng-lin/notebooklm-py
- If You want the agent itself to run structured deep research with human-in-the-loop control, without a Google account: skill:Weizhena/Deep-Research-skills
- If You want agent memory kept as plain markdown in your own Obsidian vault instead of on Google's servers: skill:eugeniughelbur/obsidian-second-brain

## Works well with
- agent:claude-code: notebooklm skill install writes the skill into Claude Code's skills folder
- agent:openai-codex: The repo ships Codex guidance in AGENTS.md and installs to the .agents skills folder
- tool:uv: The skill suggests uv tool install for the notebooklm CLI
- tool:playwright: The default Google login opens a Chromium window through Playwright

## Works in and needs
- Works in Claude Code: skills folder
- Works in Codex: AGENTS.md and .agents skills folder
- Works in Any agent with a skills folder: skills CLI
- Works in Claude Desktop, Claude Code, Cursor, Windsurf: MCP server
- Works in Sandboxed agents (uploaded skill): skill archive
- Needs Python 3.10+: The notebooklm CLI and library are Python
- Needs Google account with NotebookLM: Every command signs in as your Google account
- Needs Chromium via Playwright: The default login opens a browser window (downloaded on first login)
- Needs Google AI Ultra: Only for cinematic video

## How to tell it works
After installing and logging in, ask your assistant: "List my NotebookLM notebooks." It should run notebooklm auth check --test --json first, then notebooklm list --json, and show your notebooks with their IDs.

## Safety
The saved sign-in files give full access to your Google account's NotebookLM session (the master token to the whole account). Keep them out of projects, logs and shared folders, and use a dedicated Google account for unattended use. Install from PyPI or a release tag, not an unreleased checkout. Also ships an MCP server, a local REST server and a Claude Desktop extension, which this card does not cover.
