[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A4TRVF9P2RMNKHE2F8H3CY":3,"skill-same:01M7A4TRVF9P2RMNKHE2F8H3CY":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7A4TRVF9P2RMNKHE2F8H3CY","notebooklm",null,"Complete API for Google NotebookLM - full programmatic access including features not in the web UI: create notebooks, add sources, generate all artifact types, download in multiple formats. Also the research-handoff corpus for Claude Code and Codex - activates on explicit \u002Fnotebooklm, intent like 'create a podcast about X', 'ask my notebook', 'check the notebook', before starting web research on a topic that may already be covered by a '\u003CProject> - Research' notebook, and when publishing\u002Fhanding off research results (.research\u002F\u003Cslug>\u002F dirs) between agents or sessions.","jadenmaciel\u002Fjstack","jadenmaciel","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F195352788?v=4","01M7A4SG75RGMAMBX11WXWB6CP","Jaden L'vivski Maciel-Shapiro","01M7A4SG7T1STWS6BTBTN9EFTG",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fmisc\u002Fnotebooklm\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: notebooklm\ndescription: \"Complete API for Google NotebookLM - full programmatic access including features not in the web UI: create notebooks, add sources, generate all artifact types, download in multiple formats. Also the research-handoff corpus for Claude Code and Codex - activates on explicit \u002Fnotebooklm, intent like 'create a podcast about X', 'ask my notebook', 'check the notebook', before starting web research on a topic that may already be covered by a '\u003CProject> - Research' notebook, and when publishing\u002Fhanding off research results (.research\u002F\u003Cslug>\u002F dirs) between agents or sessions.\"\n---\n\n# NotebookLM Automation\n\nComplete programmatic access to Google NotebookLM—including capabilities not \nexposed in the web UI. Create notebooks, add sources (URLs, YouTube, PDFs, \naudio, video, images), chat with content, generate all artifact types, and \ndownload results in multiple formats.\n\n## Installation\n\n**From PyPI (Recommended for AI agents — Python-version-aware):**\n```bash\npip install \"notebooklm-py\"   # mandatory; errors must propagate\n\n#  (rookiepy) is optional and known to FAIL TO BUILD on Python 3.13+.\n# Skip it deliberately on 3.13+ rather than swallowing the error — that lets\n# *real* install failures (typos, network, PyPI outages) surface for the agent.\nif python -c \"import sys; sys.exit(0 if sys.version_info \u003C (3, 13) else 1)\"; \nthen\n    pip install \"notebooklm-py\"   # errors propagate\nelse\n    echo \"Skipping  on Python 3.13+ (rookiepy unavailable). Use 'notebooklm \nlogin' interactively.\"\nfi\n```\n\n> Full install matrix (extras, headless servers, contributor flow): \n[Installation guide on \nGitHub](https:\u002F\u002Fgithub.com\u002Fteng-lin\u002Fnotebooklm-py\u002Fblob\u002Fmain\u002Fdocs\u002Finstallation.md\n).\n\n**From GitHub (use latest release tag, NOT main branch):**\n```bash\n# Get the latest release tag (using curl)\nLATEST_TAG=$(curl -s \nhttps:\u002F\u002Fapi.github.com\u002Frepos\u002Fteng-lin\u002Fnotebooklm-py\u002Freleases\u002Flatest | grep \n'\"tag_name\"' | cut -d'\"' -f4)\n# Includes  so the interactive `notebooklm login` flow works.\npip install \"notebooklm-py @ \ngit+https:\u002F\u002Fgithub.com\u002Fteng-lin\u002Fnotebooklm-py@${LATEST_TAG}\"\n```\n\n⚠️ **DO NOT install from main branch** (`pip install \ngit+https:\u002F\u002Fgithub.com\u002Fteng-lin\u002Fnotebooklm-py`). The main branch may contain \nunreleased\u002Funstable changes. Always use PyPI or a specific release tag, unless \nyou are testing unreleased features.\n\n**Skill install methods:**\n\n- `notebooklm skill install` installs this skill into the supported local agent \ndirectories managed by the CLI.\n- `pnpm dlx skills add teng-lin\u002Fnotebooklm-py` installs this skill from the GitHub \nrepository into compatible agent skill directories.\n- If you are already reading this file inside an agent skill directory, the \nskill is already installed. You only need the Python package and authentication \nbelow.\n\n**CLI-managed install:**\n```bash\nnotebooklm skill install\n```\n\n## Prerequisites\n\n**IMPORTANT:** Before using any command, you MUST authenticate:\n\n```bash\nnotebooklm login          # Opens browser for Google OAuth\nnotebooklm list           # Verify authentication works\n```\n\nIf commands fail with authentication errors, re-run `notebooklm login`.\n\n### CI\u002FCD, Multiple Accounts, and Parallel Agents\n\nFor automated environments, multiple accounts, or parallel agent workflows:\n\n| Variable | Purpose |\n|----------|---------|\n| `NOTEBOOKLM_HOME` | Custom config directory (default: `~\u002F.notebooklm`) |\n| `NOTEBOOKLM_PROFILE` | Active profile name (default: `default`) |\n| `NOTEBOOKLM_AUTH_JSON` | Inline auth JSON - no file writes needed |\n\n**CI\u002FCD setup:** Set `NOTEBOOKLM_AUTH_JSON` from a secret containing your \n`storage_state.json` contents.\n\n**Multiple accounts:** Use named profiles (`notebooklm profile create work`, \nthen `notebooklm -p work login`). Alternatively, use different `NOTEBOOKLM_HOME`\ndirectories per account.\n\n**Parallel agents:** The CLI stores notebook context per profile \n(`~\u002F.notebooklm\u002Fprofiles\u002F\u003Cprofile>\u002Fcontext.json`, with a legacy fallback to \n`~\u002F.notebooklm\u002Fcontext.json` for the implicit default profile). Multiple \nconcurrent agents that share a profile and use `notebooklm use` can overwrite \neach other's context — use one of the isolation strategies below.\n\n**Solutions for parallel workflows:**\n1. **Always use explicit notebook ID** (recommended): Pass `-n \u003Cnotebook_id>` \n(for `wait`\u002F`download` commands) or `--notebook \u003Cnotebook_id>` (for others) \ninstead of relying on `use`\n2. **Per-agent isolation via profiles:** `export NOTEBOOKLM_PROFILE=agent-$ID` \n(each profile gets its own context file)\n3. **Per-agent isolation via home:** Set unique `NOTEBOOKLM_HOME` per agent: \n`export NOTEBOOKLM_HOME=\u002Ftmp\u002Fagent-$ID`\n4. **Use full UUIDs:** Avoid partial IDs in automation (they can become \nambiguous)\n\n## Agent Setup Verification\n\nBefore starting workflows, verify auth is in place. **Use `--test --json` (not \nbare `--json`)** — bare `--json` only proves the cookie file parses; `--test` \nmakes a network call and proves the cookies still authenticate against Google.\n\n1. `notebooklm auth check --test --json` → require BOTH `\"status\": \"ok\"` AND \n`\"checks.token_fetch\": true`. Bare `\"status\": \"ok\"` (without `--test`) is a \nfalse-positive trap — a stale cookie file passes the parse check.\n2. `notebooklm list --json` → expect valid JSON (may be empty for new accounts).\n3. **If auth fails or is missing → run `notebooklm login` first.** This is the \nprimary auth path: opens a browser, the user signs in to Google once, and the \nresulting `storage_state.json` is reused on every subsequent run. Works on any \nenvironment with a display.\n   - For headless contexts where opening a browser is not feasible, use \n`notebooklm login --browser-cookies \u003Cbrowser>` instead — extracts the user's \nalready-logged-in cookies from Chrome\u002FFirefox\u002Fetc. (requires the `` extra; \nrookiepy may not install on Python 3.13+). Use \n`chrome::\u003Cprofile-name-or-directory>` to target one Chromium user-profile, or \n`firefox::\u003Ccontainer-name>` \u002F `firefox::none` to target one Firefox container.\n   - To survey signed-in Google accounts before picking one: `notebooklm auth \ninspect --browser \u003Cbrowser>` (read-only; pass `-v` to see which Chromium \nuser-profile each account came from, or `--json` for tooling). Scoped forms such\nas `notebooklm auth inspect --browser 'chrome::Profile 1'` inspect only that \nbrowser profile.\n   - Re-run step 1 after login to confirm.\n4. **If auth was working but cookies went stale** (Google rotated SIDTS, or you \nsigned in fresh in the browser) **→ refresh the active profile in place instead \nof full re-login:**\n   - `notebooklm auth refresh` — server-side SIDTS refresh against the existing \n`storage_state.json`. Cheap and silent; safe to run on a schedule (cron \u002F \nlaunchd \u002F systemd) at 15–20 min cadence to keep an unattended profile warm.\n   - `notebooklm auth refresh --browser-cookies \u003Cbrowser>` — re-extract cookies \nfrom a running browser and match them back to the profile's recorded email in \n`context.json`. Use when the on-disk `storage_state.json` is too stale for the \nserver-side refresh path but you've just signed back into Google in the browser.\nFor Chromium-family browsers with multiple user-profiles (Chrome's `Default`, \n`Profile 1`, …), refresh fans out across all profiles to find the email — same \npath as `auth inspect` (issue #571). Use `chrome::\u003Cprofile-name-or-directory>` \nwhen you already know the exact browser profile.\n   - Both forms preserve the same `--profile` (no new profile is created).\n\n> **Note:** `notebooklm status` reports *context state* (selected notebook); do \nnot use it to verify auth.\n\n## When This Skill Activates\n\n**Explicit:** User says \"\u002Fnotebooklm\", \"use notebooklm\", or mentions the tool by\nname\n\n**Intent detection:** Recognize requests like:\n- \"Create a podcast about \"\n- \"Summarize these URLs\u002Fdocuments\"\n- \"Generate a quiz from my research\"\n- \"Turn this into an audio overview\"\n- \"Create flashcards for studying\"\n- \"Generate a video explainer\"\n- \"Make an infographic\"\n- \"Create a mind map of the concepts\"\n- \"Download the quiz as markdown\"\n- \"Add these sources to NotebookLM\"\n\n## Autonomy Rules\n\n**Run automatically (no confirmation):**\n- `notebooklm status` - check context\n- `notebooklm auth check` - diagnose auth issues\n- `notebooklm auth inspect` - list Google accounts visible to a browser \n(read-only)\n- `notebooklm auth refresh` - server-side SIDTS refresh of the active profile \n(no new profile, no destructive writes)\n- `notebooklm auth refresh --browser-cookies \u003Cbrowser>` - re-extract cookies \nfrom a browser into the active profile (rebuilds `storage_state.json` for the \nsame `--profile`, not a new one)\n- `notebooklm list` - list notebooks\n- `notebooklm source list` - list sources\n- `notebooklm artifact list` - list artifacts\n- `notebooklm language list` - list supported languages\n- `notebooklm language get` - get current language\n- `notebooklm language set` - set language (global setting)\n- `notebooklm artifact wait` - wait for artifact completion (in subagent \ncontext)\n- `notebooklm source wait` - wait for source processing (in subagent context)\n- `notebooklm research status` - check research status\n- `notebooklm research wait` - wait for research (in subagent context)\n- `notebooklm use \u003Cid>` - set context (⚠️ SINGLE-AGENT ONLY - use `-n` flag in \nparallel workflows)\n- `notebooklm create` - create notebook\n- `notebooklm ask \"...\"` - chat queries (without `--save-as-note`)\n- `notebooklm history` - display conversation history (read-only)\n- `notebooklm source add` - add sources\n- `notebooklm profile list` - list profiles\n- `notebooklm profile create` - create profile\n- `notebooklm profile switch` - switch active profile\n- `notebooklm doctor` - check environment health\n\n**Ask before running:**\n- `notebooklm delete` \u002F `source delete` \u002F `note delete` \u002F `share remove` \u002F \n`profile delete` - destructive. Once approved, pass `--yes`\u002F`-y` to skip the \nconfirmation prompt (uniform across every destructive command). On the commands \nthat also expose `--json` (e.g. `delete`, `source delete`, `note delete`, `share\nremove`), `--json` implies `--yes` so non-interactive callers never hang on the \nprompt; `profile delete` has no `--json`, so pass `--yes` explicitly there.\n- `notebooklm generate *` - long-running, may fail\n- `notebooklm download *` - writes to filesystem\n- `notebooklm artifact wait` - long-running (when in main conversation)\n- `notebooklm source wait` - long-running (when in main conversation)\n- `notebooklm research wait` - long-running (when in main conversation)\n- `notebooklm ask \"...\" --save-as-note` - writes a note\n- `notebooklm history --save` - writes a note\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Authenticate | `notebooklm login` |\n| Authenticate from browser cookies | `notebooklm login --browser-cookies \n\u003Cbrowser>` |\n| Authenticate from one Chromium profile | `notebooklm login --browser-cookies \n'chrome::Profile 1'` |\n| Authenticate from one Firefox container | `notebooklm login --browser-cookies \n'firefox::Work'` |\n| Import every signed-in account into its own profile | `notebooklm login \n--browser-cookies \u003Cbrowser> --all-accounts` |\n| Inspect signed-in accounts (read-only, by email) | `notebooklm auth inspect \n--browser \u003Cbrowser>` |\n| Inspect one browser profile\u002Fcontainer | `notebooklm auth inspect --browser \n'chrome::Profile 1'` |\n| Diagnose auth issues | `notebooklm auth check` |\n| Diagnose auth (full) | `notebooklm auth check --test` |\n| Refresh active profile in place (server-side) | `notebooklm auth refresh` |\n| Refresh active profile from a re-signed-in browser | `notebooklm auth refresh \n--browser-cookies \u003Cbrowser>` |\n| Refresh from one Chromium profile | `notebooklm auth refresh --browser-cookies\n'chrome::Profile 1'` |\n| One-shot cookie keepalive (for cron) | `notebooklm auth refresh --quiet` |\n| List notebooks | `notebooklm list` |\n| Create notebook | `notebooklm create \"Title\"` |\n| Set context | `notebooklm use \u003Cnotebook_id>` |\n| Show context | `notebooklm status` |\n| Add URL source | `notebooklm source add \"https:\u002F\u002F...\"` |\n| Add file | `notebooklm source add .\u002Ffile.pdf` |\n| Add YouTube | `notebooklm source add \"https:\u002F\u002Fyoutube.com\u002F...\"` |\n| List sources | `notebooklm source list` |\n| Delete source by ID | `notebooklm source delete \u003Csource_id>` |\n| Delete source by exact title | `notebooklm source delete-by-title \"Exact \nTitle\"` |\n| Wait for source processing | `notebooklm source wait \u003Csource_id>` |\n| Web research (fast) | `notebooklm source add-research \"query\"` |\n| Web research (deep) | `notebooklm source add-research \"query\" --mode deep \n--no-wait` |\n| Web research (query from file) | `notebooklm source add-research --prompt-file\nresearch_query.txt --mode deep` |\n| Check research status | `notebooklm research status` |\n| Wait for research | `notebooklm research wait --import-all` |\n| Chat | `notebooklm ask \"question\"` |\n| Chat (long prompt from file) | `notebooklm ask --prompt-file question.txt` |\n| Chat (specific sources) | `notebooklm ask \"question\" -s src_id1 -s src_id2` |\n| Chat (with references) | `notebooklm ask \"question\" --json` |\n| Chat (save answer as note) | `notebooklm ask \"question\" --save-as-note` |\n| Chat (save with title) | `notebooklm ask \"question\" --save-as-note \n--note-title \"Title\"` |\n| Show conversation history | `notebooklm history` |\n| Save all history as note | `notebooklm history --save` |\n| Continue specific conversation | `notebooklm ask \"question\" -c \n\u003Cconversation_id>` |\n| Save history with title | `notebooklm history --save --note-title \"My \nResearch\"` |\n| Get source fulltext | `notebooklm source fulltext \u003Csource_id>` |\n| Get source guide | `notebooklm source guide \u003Csource_id>` |\n| Generate podcast | `notebooklm generate audio \"instructions\"` |\n| Generate (long prompt from file) | `notebooklm generate audio --prompt-file \ninstructions.txt` |\n| Generate podcast (JSON) | `notebooklm generate audio --json` |\n| Generate podcast (specific sources) | `notebooklm generate audio -s src_id1 -s\nsrc_id2` |\n| Generate video | `notebooklm generate video \"instructions\"` |\n| Generate report | `notebooklm generate report --format briefing-doc` |\n| Generate report (append instructions) | `notebooklm generate report --format \nstudy-guide --append \"Target audience: beginners\"` |\n| Generate quiz | `notebooklm generate quiz` |\n| Revise a slide | `notebooklm generate revise-slide \"prompt\" --artifact \u003Cid> \n--slide 0` |\n| Check artifact status | `notebooklm artifact list` |\n| Wait for completion | `notebooklm artifact wait \u003Cartifact_id>` |\n| Download audio | `notebooklm download audio .\u002Foutput.mp3` |\n| Download video | `notebooklm download video .\u002Foutput.mp4` |\n| Download cinematic video | `notebooklm download cinematic-video \n.\u002Fcinematic.mp4` (alias for `download video`) |\n| Download infographic | `notebooklm download infographic .\u002Finfographic.png` |\n| Download slide deck (PDF) | `notebooklm download slide-deck .\u002Fslides.pdf` |\n| Download slide deck (PPTX) | `notebooklm download slide-deck .\u002Fslides.pptx \n--format pptx` |\n| Download report | `notebooklm download report .\u002Freport.md` |\n| Download mind map | `notebooklm download mind-map .\u002Fmap.json` |\n| Download data table | `notebooklm download data-table .\u002Fdata.csv` |\n| Download quiz | `notebooklm download quiz quiz.json` |\n| Download quiz (markdown) | `notebooklm download quiz --format markdown \nquiz.md` |\n| Download flashcards | `notebooklm download flashcards cards.json` |\n| Download flashcards (markdown) | `notebooklm download flashcards --format \nmarkdown cards.md` |\n| Delete notebook | `notebooklm delete -n \u003Cid>` (add `--yes` to skip the prompt \nnon-interactively) |\n| List languages | `notebooklm language list` |\n| Get language | `notebooklm language get` |\n| Set language | `notebooklm language set zh_Hans` |\n| List profiles | `notebooklm profile list` |\n| Create profile | `notebooklm profile create work` |\n| Switch profile | `notebooklm profile switch work` |\n| Delete profile | `notebooklm profile delete old --yes` (`-y`; `--confirm` is a\ndeprecated alias) |\n| Rename profile | `notebooklm profile rename old new` |\n| Use profile (one-off) | `notebooklm -p work list` |\n| Health check | `notebooklm doctor` |\n| Health check (auto-fix) | `notebooklm doctor --fix` |\n\n**Parallel safety:** Use explicit notebook IDs in parallel workflows. Commands \nsupporting `-n` shorthand: `artifact wait`, `source wait`, `research \nwait\u002Fstatus`, `download *`. Download commands also support `-a\u002F--artifact`. \nOther commands use `--notebook`. For chat, use `-c \u003Cconversation_id>` to target \na specific conversation.\n\n**Partial IDs:** Use first 6+ characters of UUIDs. Must be unique prefix (fails \nif ambiguous). Works for ID-based commands such as `use`, `source delete`, and \n`wait`. For exact source-title deletion, use `source delete-by-title \"Title\"`. \nFor automation, prefer full UUIDs to avoid ambiguity.\n\n## Command Output Formats\n\nCommands with `--json` return structured data for parsing:\n\n**Create notebook:**\n```bash\n$ notebooklm create \"Research\" --json\n{\"notebook\": {\"id\": \"abc123de-...\", \"title\": \"Research\", \"created_at\": null}}\n# parse with: jq -r .notebook.id\n```\n\n**Add source:**\n```bash\n$ notebooklm source add \"https:\u002F\u002Fexample.com\" --json\n{\"source\": {\"id\": \"def456...\", \"title\": \"Example\", \"type\": \n\"SourceType.WEB_PAGE\", \"url\": \"https:\u002F\u002Fexample.com\"}}\n# parse with: jq -r .source.id\n# Note: no `status` field on add — use `source list --json` or `source wait` to \ncheck processing state.\n```\n\n**Generate artifact:**\n```bash\n$ notebooklm generate audio \"Focus on key points\" --json\n{\"task_id\": \"xyz789...\", \"status\": \"pending\"}\n# When run with --wait, completed status also includes a `url` field.\n```\n\n**Chat with references:**\n```bash\n$ notebooklm ask \"What is X?\" --json\n{\"answer\": \"X is... [1] [2]\", \"conversation_id\": \"...\", \"turn_number\": 1, \n\"is_follow_up\": false, \"references\": [{\"source_id\": \"abc123...\", \n\"citation_number\": 1, \"cited_text\": \"Relevant passage from source...\"}, \n{\"source_id\": \"def456...\", \"citation_number\": 2, \"cited_text\": \"Another \npassage...\"}]}\n```\n\n**Source fulltext (get indexed content):**\n```bash\n$ notebooklm source fulltext \u003Csource_id> --json\n{\"source_id\": \"...\", \"title\": \"...\", \"content\": \"Full indexed text...\", \n\"_type_code\": null, \"url\": null, \"char_count\": 12345}\n```\n\n**Understanding citations:** The `cited_text` in references is often a snippet \nor section header, not the full quoted passage. The `start_char`\u002F`end_char` \npositions reference NotebookLM's internal chunked index, not the raw fulltext. \nUse `SourceFulltext.find_citation_context()` to locate citations:\n```python\nfulltext = await client.sources.get_fulltext(notebook_id, ref.source_id)\nmatches = fulltext.find_citation_context(ref.cited_text)  # Returns \nlist[(context, position)]\nif matches:\n    context, pos = matches[0]  # First match; check len(matches) > 1 for \nduplicates\n```\n\n**Extract IDs:** Singular endpoints wrap their result in an envelope —\nparse `.notebook.id` (from `create`), `.source.id` (from `source add`),\nor `.task_id` (from `generate *`). The chat `--json` references list uses\n`.references[].source_id`.\n\n## Generation Types\n\nAll generate commands support:\n- `-s, --source` to use specific source(s) instead of all sources\n- `--language` to set output language (defaults to configured language or 'en')\n- `--json` for machine-readable output (returns `task_id` and `status`)\n- `--retry N` to automatically retry on rate limits with exponential backoff \n(supported on all subcommands **except** `mind-map`)\n- `--prompt-file PATH` to read description\u002Fquery from a file (supported on \n`ask`, `generate` subcommands except `mind-map`, and `source add-research`; \nmutually exclusive with positional argument; use for long prompts)\n\n| Type | Command | Options | Download |\n|------|---------|---------|----------|\n| Podcast | `generate audio` | `--format `, `--length ` | .mp3 |\n| Video | `generate video` | `--format ` (⁴), `--style ` | .mp4 |\n| Slide Deck | `generate slide-deck` | `--format `, `--length ` (²) | .pdf \u002F \n.pptx |\n| Slide Revision | `generate revise-slide \"prompt\" --artifact \u003Cid> --slide N` | \n`--wait`, `--notebook` | *(re-downloads parent deck)* |\n| Infographic | `generate infographic` | `--orientation `, `--detail `, `--style\n` | .png |\n| Report | `generate report` | `--format `, `--append \"extra instructions\"` (¹) \n| .md |\n| Mind Map | `generate mind-map` | `--kind ` (³) *(default: note-backed; flips \nto interactive in v0.8.0)* | .json |\n| Data Table | `generate data-table` | description required | .csv |\n| Quiz | `generate quiz` | `--difficulty `, `--quantity ` | .json\u002F.md\u002F.html |\n| Flashcards | `generate flashcards` | `--difficulty `, `--quantity ` | \n.json\u002F.md\u002F.html |\n\n¹ `--append` only customizes the built-in templates. With `--format custom`, \npass the prompt as the positional `DESCRIPTION` argument (`notebooklm generate \nreport \"PROMPT\" --format custom`); `--append` is silently ignored in that mode \n(the CLI prints a warning).\n\n³ **Two kinds of mind map (issue #1256).** `generate mind-map --kind \nnote-backed` (today's default) creates the **note-backed** kind — a JSON node \ntree, generated synchronously. `generate mind-map --kind interactive` creates \nthe newer **interactive** studio artifact (what the web app now makes); it is \npolled to completion. Both emit the same `{mind_map, note_id, kind}` JSON, list \nunder `artifact list --type mind-map`, and export via `download mind-map`. \n`--instructions` applies only to the note-backed kind. **The default `--kind` \nswitches to `interactive` in v0.8.0**; omitting `--kind` prints a one-time \nstderr notice (silence with `NOTEBOOKLM_QUIET_DEPRECATIONS=1`).\n\n⁴ **Cinematic video (Veo 3).** `generate video --format cinematic` generates AI \ndocumentary footage via Veo 3; it **ignores `--style`**, takes ~30-40 min, and \nrequires a Google AI Ultra subscription. Also exposed as the `generate \ncinematic-video` alias (which forces `--format cinematic` and a longer default \ntimeout). Download with `download video` or the `download cinematic-video` \nalias.\n\n² **Portrait \u002F vertical slide decks via prompt.** Slide-deck has no \n`--orientation` flag (unlike infographic). Treat portrait decks as skill-level \nprompt guidance, not a typed CLI\u002FAPI contract: NotebookLM currently honors \norientation cues written into the `DESCRIPTION` positional argument. Including \nphrases like `\"9:16 portrait\"`, `\"vertical layout\"`, `\"portrait mobile format\"`,\nor `\"vertical 9:16 layout\"` can make NotebookLM render each slide as a 9:16 \nportrait image. Empirically:\n\n- The `.pptx` canvas itself may stay 16:9, but each slide's embedded image can \nbe rendered as 9:16 portrait — useful for vertical\u002Fmobile video material \nextracted via `python-pptx`.\n- Orientation is steered once at generation time. `generate revise-slide` edits \ncontent within an existing slide but does not change its orientation; if a slide\nfalls back to landscape (occasional inconsistency), regenerate the whole deck \nrather than revising the single page.\n- Combine with an explicit page count in the prompt (e.g. `\"Create exactly 8 \npages, using a vertical 9:16 portrait layout\"`) for the most predictable output.\n\n```bash\n# Skill prompt hint: ask NotebookLM to render each slide as a 9:16 portrait \nimage\nnotebooklm generate slide-deck \"Create an 8-page deck in 9:16 portrait \norientation for mobile viewing\" --length default\n```\n\n## Features Beyond the Web UI\n\nThese capabilities are available via CLI but not in NotebookLM's web interface:\n\n| Feature | Command | Description |\n|---------|---------|-------------|\n| **Batch downloads** | `download \u003Ctype> --all` | Download all artifacts of a \ntype at once |\n| **Quiz\u002FFlashcard export** | `download quiz --format json` | Export as JSON, \nMarkdown, or HTML (web UI only shows interactive view) |\n| **Mind map extraction** | `download mind-map` | Export hierarchical JSON for \nvisualization tools |\n| **Data table export** | `download data-table` | Download structured tables as \nCSV |\n| **Slide deck as PPTX** | `download slide-deck --format pptx` | Download slide \ndeck as editable .pptx (web UI only offers PDF) |\n| **Slide revision** | `generate revise-slide \"prompt\" --artifact \u003Cid> --slide \nN` | Modify individual slides with a natural-language prompt |\n| **Report template append** | `generate report --format study-guide --append \n\"...\"` | Append custom instructions to built-in format templates without losing \nthe format type |\n| **Source fulltext** | `source fulltext \u003Cid>` | Retrieve the indexed text \ncontent of any source |\n| **Save chat to note** | `ask \"...\" --save-as-note` \u002F `history --save` | Save \nQ&A answers or conversation history as notebook notes |\n| **Programmatic sharing** | `share` commands | Manage sharing permissions \nwithout the UI |\n\n## Common Workflows\n\n### Research to Podcast (Interactive)\n**Time:** 5-10 minutes total\n\n1. `notebooklm create \"Research: \"` — *if fails: check auth with `notebooklm \nlogin`*\n2. `notebooklm source add` for each URL\u002Fdocument — *if one fails: log warning, \ncontinue with others*\n3. Wait for sources: `notebooklm source list --json` until all status=READY — \n*required before generation*\n4. `notebooklm generate audio \"Focus on \"` (confirm when asked) — *if rate \nlimited: wait 5 min, retry once*\n5. Note the artifact ID returned\n6. Check `notebooklm artifact list` later for status\n7. `notebooklm download audio .\u002Fpodcast.mp3` when complete (confirm when asked)\n\n### Research to Podcast (Automated with Subagent)\n**Time:** 5-10 minutes, but continues in background\n\nWhen user wants full automation (generate and download when ready):\n\n1. Create notebook and add sources as usual\n2. Wait for sources to be ready (use `source wait` or check `source list \n--json`)\n3. Run `notebooklm generate audio \"...\" --json` → parse `task_id` from output\n4. **Spawn a background agent** using Task tool:\n   ```python\n   Task(\n     prompt=\"Wait for artifact {task_id} in notebook {notebook_id} to complete, \nthen download.\n             Use: notebooklm artifact wait {task_id} -n {notebook_id} --timeout \n1200\n             Then: notebooklm download audio .\u002Fpodcast.mp3 -a {task_id} -n \n{notebook_id}\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n5. Main conversation continues while agent waits\n\n**Error handling in subagent:**\n- If `artifact wait` returns exit code 2 (timeout): Report timeout, suggest \nchecking `artifact list`\n- If download fails: Check if artifact status is COMPLETED first\n\n**Benefits:** Non-blocking, user can do other work, automatic download on \ncompletion\n\n### Document Analysis\n**Time:** 1-2 minutes\n\n1. `notebooklm create \"Analysis: \"`\n2. `notebooklm source add .\u002Fdoc.pdf` (or URLs)\n3. `notebooklm ask \"Summarize the key points\"`\n4. `notebooklm ask \"What are the main arguments?\"`\n5. Continue chatting as needed\n\n### Bulk Import\n**Time:** Varies by source count\n\n1. `notebooklm create \"Collection: \"`\n2. Add multiple sources:\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\"\n   notebooklm source add \"https:\u002F\u002Furl2.com\"\n   notebooklm source add .\u002Flocal-file.pdf\n   ```\n3. `notebooklm source list` to verify\n\n**Source limits:** Varies by plan—Standard: 50, Plus: 100, Pro: 300, Ultra: 600 \nsources per notebook. See [NotebookLM \nplans](https:\u002F\u002Fsupport.google.com\u002Fnotebooklm\u002Fanswer\u002F16213268) for details. The \nCLI does not enforce these limits; they are applied by your NotebookLM account.\n**Supported types:** PDFs, YouTube URLs, web URLs, Google Docs, text files, \nMarkdown, Word docs, EPUB, audio files, video files, images\n\n### Bulk Import with Source Waiting (Subagent Pattern)\n**Time:** Varies by source count\n\nWhen adding multiple sources and needing to wait for processing before \nchat\u002Fgeneration:\n\n1. Add sources with `--json` to capture IDs (parse with `jq -r .source.id`):\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\" --json  # → {\"source\": {\"id\": \n\"abc...\", ...}}\n   notebooklm source add \"https:\u002F\u002Furl2.com\" --json  # → {\"source\": {\"id\": \n\"def...\", ...}}\n   ```\n2. **Spawn a background agent** to wait for all sources:\n   ```\n   Task(\n     prompt=\"Wait for sources {source_ids} in notebook {notebook_id} to be \nready.\n             For each: notebooklm source wait {id} -n {notebook_id} --timeout \n600\n             Report when all ready or if any fail.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n3. Main conversation continues while agent waits\n4. Once sources are ready, proceed with chat or generation\n\n**Why wait for sources?** Sources must be indexed before chat or generation. \nTakes ~30 seconds to several minutes per source (see the processing-times table \nbelow).\n\n### Deep Web Research (Subagent Pattern)\n**Time:** 15-30+ minutes, runs in background\n\nDeep research finds and analyzes web sources on a topic:\n\n1. Create notebook: `notebooklm create \"Research: \"`\n2. Start deep research (non-blocking):\n   ```bash\n   notebooklm source add-research \"topic query\" --mode deep --no-wait\n   ```\n3. **Spawn a background agent** to wait and import:\n   ```\n   Task(\n     prompt=\"Wait for research in notebook {notebook_id} to complete and import \nsources.\n             Use: notebooklm research wait -n {notebook_id} --import-all \n--timeout 1800\n             Report how many sources were imported.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n4. Main conversation continues while agent waits\n5. When agent completes, sources are imported automatically\n\n**Alternative (blocking):** For simple cases, omit `--no-wait`:\n```bash\nnotebooklm source add-research \"topic\" --mode deep --import-all\n# Blocks until research completes (deep mode: 15-30+ min)\n```\n\n**When to use each mode:**\n- `--mode fast`: Specific topic, quick overview needed (5-10 sources, seconds)\n- `--mode deep`: Broad topic, comprehensive analysis needed (20+ sources, 15-30+\nmin)\n\n**Research sources:**\n- `--from web`: Search the web (default)\n- `--from drive`: Search Google Drive\n\n## Output Style\n\n**Progress updates:** Brief status for each step\n- \"Creating notebook 'Research: AI'...\"\n- \"Adding source: https:\u002F\u002Fexample.com...\"\n- \"Starting audio generation... (task ID: abc123)\"\n\n**Fire-and-forget for long operations:**\n- Start generation, return artifact ID immediately\n- Do NOT poll or wait in main conversation - generation takes 5-45 minutes (see \ntiming table)\n- User checks status manually, OR use subagent with `artifact wait`\n\n**JSON output:** Use `--json` flag for machine-readable output:\n```bash\nnotebooklm list --json\nnotebooklm auth check --test --json   # use --test for network-validated auth \n(see § Agent Setup Verification)\nnotebooklm source list --json\nnotebooklm artifact list --json\n```\n\n**JSON schemas (key fields):**\n\n`notebooklm list --json`:\n```json\n{\"notebooks\": [{\"index\": 1, \"id\": \"...\", \"title\": \"...\", \"is_owner\": true, \n\"created_at\": \"...\"}], \"count\": 1}\n```\n\n`notebooklm auth check --test --json` (use `--test` to drive the network \ntoken-fetch — bare `--json` would leave `\"token_fetch\": null`):\n```json\n{\"status\": \"ok\", \"checks\": {\"storage_exists\": true, \"json_valid\": true, \n\"cookies_present\": true, \"sid_cookie\": true, \"token_fetch\": true}, \"details\": \n{\"storage_path\": \"...\", \"auth_source\": \"file\", \"cookies_found\": [\"SID\", \"HSID\", \n\"...\"], \"cookie_domains\": [\".google.com\"]}}\n```\n\n`notebooklm source list --json`:\n```json\n{\"notebook_id\": \"...\", \"notebook_title\": \"...\", \"sources\": [{\"index\": 1, \"id\": \n\"...\", \"title\": \"...\", \"type\": \"SourceType.WEB_PAGE\", \"url\": \"...\", \"status\": \n\"ready|processing|error\", \"status_id\": 1, \"created_at\": \"...\"}], \"count\": 1}\n```\n\n`notebooklm artifact list --json`:\n```json\n{\"notebook_id\": \"...\", \"notebook_title\": \"...\", \"artifacts\": [{\"index\": 1, \"id\":\n\"...\", \"title\": \"...\", \"type\": \"Audio\", \"type_id\": 1, \"status\": \n\"in_progress|pending|completed|unknown\", \"status_id\": 1, \"created_at\": \"...\"}], \n\"count\": 1}\n```\n\n**Status values:**\n- Sources: `processing` → `ready` (or `error`)\n- Artifacts: `pending` or `in_progress` → `completed` (or `unknown`)\n\n## Error Handling\n\n**On failure, offer the user a choice:**\n1. Retry the operation\n2. Skip and continue with something else\n3. Investigate the error\n\n**Error decision tree:**\n\n| Error | Cause | Action |\n|-------|-------|--------|\n| Auth\u002Fcookie error | Session expired | Run `notebooklm auth check` then \n`notebooklm login` |\n| \"No notebook context\" | Context not set | Use `-n \u003Cid>` or `--notebook \u003Cid>` \nflag (parallel), or `notebooklm use \u003Cid>` (single-agent) |\n| \"No result found for RPC ID\" | Rate limiting | Wait 5-10 min, retry |\n| `GENERATION_FAILED` | Google rate limit | Wait and retry later |\n| Download fails | Generation incomplete | Check `artifact list` for status |\n| Invalid notebook\u002Fsource ID | Wrong ID | Run `notebooklm list` to verify |\n| RPC protocol error | Google changed APIs | May need CLI update |\n\n## Exit Codes\n\nAll commands use consistent exit codes:\n\n| Code | Meaning | Action |\n|------|---------|--------|\n| 0 | Success | Continue |\n| 1 | Error (not found, processing failed) | Check stderr, see Error Handling |\n| 2 | Timeout (wait commands only) | Extend timeout or check status manually |\n\n**Examples:**\n- `source wait` returns 1 if source not found or processing failed\n- `artifact wait` returns 2 if timeout reached before completion\n- `generate` returns 1 if rate limited (check stderr for details)\n\n## Long Prompts\n\nWhen a prompt or query exceeds shell command-line length limits, use \n`--prompt-file` to read it from a file:\n\n```bash\nnotebooklm ask --prompt-file .\u002Flong_question.txt\nnotebooklm generate report --prompt-file .\u002Fcustom_report_prompt.txt\nnotebooklm source add-research --prompt-file .\u002Fresearch_query.txt --mode deep\n```\n\n`--prompt-file` is mutually exclusive with the positional text argument. The \nfile is read as UTF-8 with trailing whitespace stripped. Supported on: `ask`, \nall `generate` subcommands (except `mind-map`), and `source add-research`.\n\n> **Note:** `--prompt-file` reads a *prompt\u002Fquery text file*, not a source \ndocument. To upload a file as a notebook source, use `source add .\u002Ffile.pdf`.\n\n## Known Limitations\n\n**Rate limiting:** Audio, video, quiz, flashcards, infographic, and slide deck \ngeneration may fail due to Google's rate limits. This is an API limitation, not \na bug.\n\n**Reliable operations:** These always work:\n- Notebooks (list, create, delete, rename)\n- Sources (add, list, delete)\n- Chat\u002Fqueries\n- Mind-map, study-guide, report, data-table generation\n\n**Unreliable operations:** These may fail with rate limiting:\n- Audio (podcast) generation\n- Video generation\n- Quiz and flashcard generation\n- Infographic and slide deck generation\n\n**Workaround:** If generation fails:\n1. Check status: `notebooklm artifact list`\n2. Retry after 5-10 minutes\n3. Use the NotebookLM web UI as fallback\n\n**Processing times vary significantly.** Use the subagent pattern for long \noperations:\n\n| Operation | Typical time | Suggested timeout |\n|-----------|--------------|-------------------|\n| Source processing | 30s - 10 min | 600s |\n| Research (fast) | 30s - 2 min | 180s |\n| Research (deep) | 15 - 30+ min | 1800s |\n| Notes | instant | n\u002Fa |\n| Mind-map | instant (sync) | n\u002Fa |\n| Quiz, flashcards | 5 - 15 min | 900s |\n| Report, data-table | 5 - 15 min | 900s |\n| Audio generation | 10 - 20 min | 1200s |\n| Video generation | 15 - 45 min | 2700s |\n\n**Polling intervals:** When checking status manually, poll every 15-30 seconds \nto avoid excessive API calls.\n\n## Language Configuration\n\nLanguage setting controls the output language for generated artifacts (audio, \nvideo, etc.).\n\n**Important:** Language is a **GLOBAL** setting that affects all notebooks in \nyour account.\n\n```bash\n# List all 80+ supported languages with native names\nnotebooklm language list\n\n# Show current language setting\nnotebooklm language get\n\n# Set language for artifact generation\nnotebooklm language set zh_Hans  # Simplified Chinese\nnotebooklm language set ja       # Japanese\nnotebooklm language set en       # English (default)\n```\n\n**Common language codes:**\n| Code | Language |\n|------|----------|\n| `en` | English |\n| `zh_Hans` | 中文（简体） - Simplified Chinese |\n| `zh_Hant` | 中文（繁體） - Traditional Chinese |\n| `ja` | 日本語 - Japanese |\n| `ko` | 한국어 - Korean |\n| `es` | Español - Spanish |\n| `fr` | Français - French |\n| `de` | Deutsch - German |\n| `pt_BR` | Português (Brasil) |\n\n**Override per command:** Use `--language` flag on generate commands:\n```bash\nnotebooklm generate audio --language ja   # Japanese podcast\nnotebooklm generate video --language zh_Hans  # Chinese video\n```\n\n**Offline mode:** Use `--local` flag to skip server sync:\n```bash\nnotebooklm language set zh_Hans --local  # Save locally only\nnotebooklm language get --local  # Read local config only\n```\n\n## Troubleshooting\n\n```bash\nnotebooklm --help              # Main commands\nnotebooklm auth check          # Diagnose auth issues\nnotebooklm auth check --test   # Full auth validation with network test\nnotebooklm source --help       # Source management\nnotebooklm research --help     # Research status\u002Fwait\nnotebooklm generate --help     # Content generation\nnotebooklm artifact --help     # Artifact management\nnotebooklm download --help     # Download content\nnotebooklm language --help     # Language settings\n```\n\n**Diagnose auth:** `notebooklm auth check` - shows cookie domains, storage path,\nvalidation status\n**Re-authenticate:** `notebooklm login`\n**Check version:** `notebooklm --version`\n**Refresh a CLI-managed install:** `notebooklm skill install`\n\n## Research Handoff (local addition — keep when vendor skill updates)\n\nResearch runs (deep-research or ad-hoc) publish into per-project notebooks so Claude Code and Codex share one corpus instead of re-researching.\n\n- Publish: `\"$HOME\u002F.codex\u002Fskills\u002Fnotebooklm\u002Fscripts\u002Fpublish.sh\" .research\u002F\u003Cslug> [--notebook \u003Cid>] [--dry-run] [--max N] [--no-report]` — resolves\u002Fcreates `\u003CProject> — Research` notebook (cache `.research\u002F\u003Cslug>\u002Fnotebook_id` -> title match -> create), adds evidence URLs deduped + throttled, uploads report.md as text source. Best-effort, always exits 0.\n- Consume: user says \"ask my notebook X\" \u002F \"check the notebook\" -> `notebooklm list --json`, fuzzy-match title, `notebooklm ask -n \u003Cfull-id> \"\u003Cquestion>\"` (skip `--new`: in 0.7+ it destructively deletes the notebook's previous conversation). Always `-n \u003Cid>`, never `use` (shared context clobbers parallel sessions).\n- Project Gemini: treat `ask` on the project notebook as a corpus-grounded research sidecar for source gaps, query shaping, synthesis, outlines, and \"what should I research next?\"; use `--json` when citations matter, treat answers as advisory (not human approval), and verify claims outside the corpus.\n- Never send Obsidian wiki content, secrets, or client\u002Fprivate material (script refuses `~\u002FDevelopment\u002FObsidian`; ask first for work dirs, default `--no-report`). Never run `login` unattended.\n","# NotebookLM Automation\n\nComplete programmatic access to Google NotebookLM—including capabilities not \nexposed in the web UI. Create notebooks, add sources (URLs, YouTube, PDFs, \naudio, video, images), chat with content, generate all artifact types, and \ndownload results in multiple formats.\n\n## Installation\n\n**From PyPI (Recommended for AI agents — Python-version-aware):**\n```bash\npip install \"notebooklm-py\"   # mandatory; errors must propagate\n\n#  (rookiepy) is optional and known to FAIL TO BUILD on Python 3.13+.\n# Skip it deliberately on 3.13+ rather than swallowing the error — that lets\n# *real* install failures (typos, network, PyPI outages) surface for the agent.\nif python -c \"import sys; sys.exit(0 if sys.version_info \u003C (3, 13) else 1)\"; \nthen\n    pip install \"notebooklm-py\"   # errors propagate\nelse\n    echo \"Skipping  on Python 3.13+ (rookiepy unavailable). Use 'notebooklm \nlogin' interactively.\"\nfi\n```\n\n> Full install matrix (extras, headless servers, contributor flow): \n[Installation guide on \nGitHub](https:\u002F\u002Fgithub.com\u002Fteng-lin\u002Fnotebooklm-py\u002Fblob\u002Fmain\u002Fdocs\u002Finstallation.md\n).\n\n**From GitHub (use latest release tag, NOT main branch):**\n```bash\n# Get the latest release tag (using curl)\nLATEST_TAG=$(curl -s \nhttps:\u002F\u002Fapi.github.com\u002Frepos\u002Fteng-lin\u002Fnotebooklm-py\u002Freleases\u002Flatest | grep \n'\"tag_name\"' | cut -d'\"' -f4)\n# Includes  so the interactive `notebooklm login` flow works.\npip install \"notebooklm-py @ \ngit+https:\u002F\u002Fgithub.com\u002Fteng-lin\u002Fnotebooklm-py@${LATEST_TAG}\"\n```\n\n⚠️ **DO NOT install from main branch** (`pip install \ngit+https:\u002F\u002Fgithub.com\u002Fteng-lin\u002Fnotebooklm-py`). The main branch may contain \nunreleased\u002Funstable changes. Always use PyPI or a specific release tag, unless \nyou are testing unreleased features.\n\n**Skill install methods:**\n\n- `notebooklm skill install` installs this skill into the supported local agent \ndirectories managed by the CLI.\n- `pnpm dlx skills add teng-lin\u002Fnotebooklm-py` installs this skill from the GitHub \nrepository into compatible agent skill directories.\n- If you are already reading this file inside an agent skill directory, the \nskill is already installed. You only need the Python package and authentication \nbelow.\n\n**CLI-managed install:**\n```bash\nnotebooklm skill install\n```\n\n## Prerequisites\n\n**IMPORTANT:** Before using any command, you MUST authenticate:\n\n```bash\nnotebooklm login          # Opens browser for Google OAuth\nnotebooklm list           # Verify authentication works\n```\n\nIf commands fail with authentication errors, re-run `notebooklm login`.\n\n### CI\u002FCD, Multiple Accounts, and Parallel Agents\n\nFor automated environments, multiple accounts, or parallel agent workflows:\n\n| Variable | Purpose |\n|----------|---------|\n| `NOTEBOOKLM_HOME` | Custom config directory (default: `~\u002F.notebooklm`) |\n| `NOTEBOOKLM_PROFILE` | Active profile name (default: `default`) |\n| `NOTEBOOKLM_AUTH_JSON` | Inline auth JSON - no file writes needed |\n\n**CI\u002FCD setup:** Set `NOTEBOOKLM_AUTH_JSON` from a secret containing your \n`storage_state.json` contents.\n\n**Multiple accounts:** Use named profiles (`notebooklm profile create work`, \nthen `notebooklm -p work login`). Alternatively, use different `NOTEBOOKLM_HOME`\ndirectories per account.\n\n**Parallel agents:** The CLI stores notebook context per profile \n(`~\u002F.notebooklm\u002Fprofiles\u002F\u003Cprofile>\u002Fcontext.json`, with a legacy fallback to \n`~\u002F.notebooklm\u002Fcontext.json` for the implicit default profile). Multiple \nconcurrent agents that share a profile and use `notebooklm use` can overwrite \neach other's context — use one of the isolation strategies below.\n\n**Solutions for parallel workflows:**\n1. **Always use explicit notebook ID** (recommended): Pass `-n \u003Cnotebook_id>` \n(for `wait`\u002F`download` commands) or `--notebook \u003Cnotebook_id>` (for others) \ninstead of relying on `use`\n2. **Per-agent isolation via profiles:** `export NOTEBOOKLM_PROFILE=agent-$ID` \n(each profile gets its own context file)\n3. **Per-agent isolation via home:** Set unique `NOTEBOOKLM_HOME` per agent: \n`export NOTEBOOKLM_HOME=\u002Ftmp\u002Fagent-$ID`\n4. **Use full UUIDs:** Avoid partial IDs in automation (they can become \nambiguous)\n\n## Agent Setup Verification\n\nBefore starting workflows, verify auth is in place. **Use `--test --json` (not \nbare `--json`)** — bare `--json` only proves the cookie file parses; `--test` \nmakes a network call and proves the cookies still authenticate against Google.\n\n1. `notebooklm auth check --test --json` → require BOTH `\"status\": \"ok\"` AND \n`\"checks.token_fetch\": true`. Bare `\"status\": \"ok\"` (without `--test`) is a \nfalse-positive trap — a stale cookie file passes the parse check.\n2. `notebooklm list --json` → expect valid JSON (may be empty for new accounts).\n3. **If auth fails or is missing → run `notebooklm login` first.** This is the \nprimary auth path: opens a browser, the user signs in to Google once, and the \nresulting `storage_state.json` is reused on every subsequent run. Works on any \nenvironment with a display.\n   - For headless contexts where opening a browser is not feasible, use \n`notebooklm login --browser-cookies \u003Cbrowser>` instead — extracts the user's \nalready-logged-in cookies from Chrome\u002FFirefox\u002Fetc. (requires the `` extra; \nrookiepy may not install on Python 3.13+). Use \n`chrome::\u003Cprofile-name-or-directory>` to target one Chromium user-profile, or \n`firefox::\u003Ccontainer-name>` \u002F `firefox::none` to target one Firefox container.\n   - To survey signed-in Google accounts before picking one: `notebooklm auth \ninspect --browser \u003Cbrowser>` (read-only; pass `-v` to see which Chromium \nuser-profile each account came from, or `--json` for tooling). Scoped forms such\nas `notebooklm auth inspect --browser 'chrome::Profile 1'` inspect only that \nbrowser profile.\n   - Re-run step 1 after login to confirm.\n4. **If auth was working but cookies went stale** (Google rotated SIDTS, or you \nsigned in fresh in the browser) **→ refresh the active profile in place instead \nof full re-login:**\n   - `notebooklm auth refresh` — server-side SIDTS refresh against the existing \n`storage_state.json`. Cheap and silent; safe to run on a schedule (cron \u002F \nlaunchd \u002F systemd) at 15–20 min cadence to keep an unattended profile warm.\n   - `notebooklm auth refresh --browser-cookies \u003Cbrowser>` — re-extract cookies \nfrom a running browser and match them back to the profile's recorded email in \n`context.json`. Use when the on-disk `storage_state.json` is too stale for the \nserver-side refresh path but you've just signed back into Google in the browser.\nFor Chromium-family browsers with multiple user-profiles (Chrome's `Default`, \n`Profile 1`, …), refresh fans out across all profiles to find the email — same \npath as `auth inspect` (issue #571). Use `chrome::\u003Cprofile-name-or-directory>` \nwhen you already know the exact browser profile.\n   - Both forms preserve the same `--profile` (no new profile is created).\n\n> **Note:** `notebooklm status` reports *context state* (selected notebook); do \nnot use it to verify auth.\n\n## When This Skill Activates\n\n**Explicit:** User says \"\u002Fnotebooklm\", \"use notebooklm\", or mentions the tool by\nname\n\n**Intent detection:** Recognize requests like:\n- \"Create a podcast about \"\n- \"Summarize these URLs\u002Fdocuments\"\n- \"Generate a quiz from my research\"\n- \"Turn this into an audio overview\"\n- \"Create flashcards for studying\"\n- \"Generate a video explainer\"\n- \"Make an infographic\"\n- \"Create a mind map of the concepts\"\n- \"Download the quiz as markdown\"\n- \"Add these sources to NotebookLM\"\n\n## Autonomy Rules\n\n**Run automatically (no confirmation):**\n- `notebooklm status` - check context\n- `notebooklm auth check` - diagnose auth issues\n- `notebooklm auth inspect` - list Google accounts visible to a browser \n(read-only)\n- `notebooklm auth refresh` - server-side SIDTS refresh of the active profile \n(no new profile, no destructive writes)\n- `notebooklm auth refresh --browser-cookies \u003Cbrowser>` - re-extract cookies \nfrom a browser into the active profile (rebuilds `storage_state.json` for the \nsame `--profile`, not a new one)\n- `notebooklm list` - list notebooks\n- `notebooklm source list` - list sources\n- `notebooklm artifact list` - list artifacts\n- `notebooklm language list` - list supported languages\n- `notebooklm language get` - get current language\n- `notebooklm language set` - set language (global setting)\n- `notebooklm artifact wait` - wait for artifact completion (in subagent \ncontext)\n- `notebooklm source wait` - wait for source processing (in subagent context)\n- `notebooklm research status` - check research status\n- `notebooklm research wait` - wait for research (in subagent context)\n- `notebooklm use \u003Cid>` - set context (⚠️ SINGLE-AGENT ONLY - use `-n` flag in \nparallel workflows)\n- `notebooklm create` - create notebook\n- `notebooklm ask \"...\"` - chat queries (without `--save-as-note`)\n- `notebooklm history` - display conversation history (read-only)\n- `notebooklm source add` - add sources\n- `notebooklm profile list` - list profiles\n- `notebooklm profile create` - create profile\n- `notebooklm profile switch` - switch active profile\n- `notebooklm doctor` - check environment health\n\n**Ask before running:**\n- `notebooklm delete` \u002F `source delete` \u002F `note delete` \u002F `share remove` \u002F \n`profile delete` - destructive. Once approved, pass `--yes`\u002F`-y` to skip the \nconfirmation prompt (uniform across every destructive command). On the commands \nthat also expose `--json` (e.g. `delete`, `source delete`, `note delete`, `share\nremove`), `--json` implies `--yes` so non-interactive callers never hang on the \nprompt; `profile delete` has no `--json`, so pass `--yes` explicitly there.\n- `notebooklm generate *` - long-running, may fail\n- `notebooklm download *` - writes to filesystem\n- `notebooklm artifact wait` - long-running (when in main conversation)\n- `notebooklm source wait` - long-running (when in main conversation)\n- `notebooklm research wait` - long-running (when in main conversation)\n- `notebooklm ask \"...\" --save-as-note` - writes a note\n- `notebooklm history --save` - writes a note\n\n## Quick Reference\n\n| Task | Command |\n|------|---------|\n| Authenticate | `notebooklm login` |\n| Authenticate from browser cookies | `notebooklm login --browser-cookies \n\u003Cbrowser>` |\n| Authenticate from one Chromium profile | `notebooklm login --browser-cookies \n'chrome::Profile 1'` |\n| Authenticate from one Firefox container | `notebooklm login --browser-cookies \n'firefox::Work'` |\n| Import every signed-in account into its own profile | `notebooklm login \n--browser-cookies \u003Cbrowser> --all-accounts` |\n| Inspect signed-in accounts (read-only, by email) | `notebooklm auth inspect \n--browser \u003Cbrowser>` |\n| Inspect one browser profile\u002Fcontainer | `notebooklm auth inspect --browser \n'chrome::Profile 1'` |\n| Diagnose auth issues | `notebooklm auth check` |\n| Diagnose auth (full) | `notebooklm auth check --test` |\n| Refresh active profile in place (server-side) | `notebooklm auth refresh` |\n| Refresh active profile from a re-signed-in browser | `notebooklm auth refresh \n--browser-cookies \u003Cbrowser>` |\n| Refresh from one Chromium profile | `notebooklm auth refresh --browser-cookies\n'chrome::Profile 1'` |\n| One-shot cookie keepalive (for cron) | `notebooklm auth refresh --quiet` |\n| List notebooks | `notebooklm list` |\n| Create notebook | `notebooklm create \"Title\"` |\n| Set context | `notebooklm use \u003Cnotebook_id>` |\n| Show context | `notebooklm status` |\n| Add URL source | `notebooklm source add \"https:\u002F\u002F...\"` |\n| Add file | `notebooklm source add .\u002Ffile.pdf` |\n| Add YouTube | `notebooklm source add \"https:\u002F\u002Fyoutube.com\u002F...\"` |\n| List sources | `notebooklm source list` |\n| Delete source by ID | `notebooklm source delete \u003Csource_id>` |\n| Delete source by exact title | `notebooklm source delete-by-title \"Exact \nTitle\"` |\n| Wait for source processing | `notebooklm source wait \u003Csource_id>` |\n| Web research (fast) | `notebooklm source add-research \"query\"` |\n| Web research (deep) | `notebooklm source add-research \"query\" --mode deep \n--no-wait` |\n| Web research (query from file) | `notebooklm source add-research --prompt-file\nresearch_query.txt --mode deep` |\n| Check research status | `notebooklm research status` |\n| Wait for research | `notebooklm research wait --import-all` |\n| Chat | `notebooklm ask \"question\"` |\n| Chat (long prompt from file) | `notebooklm ask --prompt-file question.txt` |\n| Chat (specific sources) | `notebooklm ask \"question\" -s src_id1 -s src_id2` |\n| Chat (with references) | `notebooklm ask \"question\" --json` |\n| Chat (save answer as note) | `notebooklm ask \"question\" --save-as-note` |\n| Chat (save with title) | `notebooklm ask \"question\" --save-as-note \n--note-title \"Title\"` |\n| Show conversation history | `notebooklm history` |\n| Save all history as note | `notebooklm history --save` |\n| Continue specific conversation | `notebooklm ask \"question\" -c \n\u003Cconversation_id>` |\n| Save history with title | `notebooklm history --save --note-title \"My \nResearch\"` |\n| Get source fulltext | `notebooklm source fulltext \u003Csource_id>` |\n| Get source guide | `notebooklm source guide \u003Csource_id>` |\n| Generate podcast | `notebooklm generate audio \"instructions\"` |\n| Generate (long prompt from file) | `notebooklm generate audio --prompt-file \ninstructions.txt` |\n| Generate podcast (JSON) | `notebooklm generate audio --json` |\n| Generate podcast (specific sources) | `notebooklm generate audio -s src_id1 -s\nsrc_id2` |\n| Generate video | `notebooklm generate video \"instructions\"` |\n| Generate report | `notebooklm generate report --format briefing-doc` |\n| Generate report (append instructions) | `notebooklm generate report --format \nstudy-guide --append \"Target audience: beginners\"` |\n| Generate quiz | `notebooklm generate quiz` |\n| Revise a slide | `notebooklm generate revise-slide \"prompt\" --artifact \u003Cid> \n--slide 0` |\n| Check artifact status | `notebooklm artifact list` |\n| Wait for completion | `notebooklm artifact wait \u003Cartifact_id>` |\n| Download audio | `notebooklm download audio .\u002Foutput.mp3` |\n| Download video | `notebooklm download video .\u002Foutput.mp4` |\n| Download cinematic video | `notebooklm download cinematic-video \n.\u002Fcinematic.mp4` (alias for `download video`) |\n| Download infographic | `notebooklm download infographic .\u002Finfographic.png` |\n| Download slide deck (PDF) | `notebooklm download slide-deck .\u002Fslides.pdf` |\n| Download slide deck (PPTX) | `notebooklm download slide-deck .\u002Fslides.pptx \n--format pptx` |\n| Download report | `notebooklm download report .\u002Freport.md` |\n| Download mind map | `notebooklm download mind-map .\u002Fmap.json` |\n| Download data table | `notebooklm download data-table .\u002Fdata.csv` |\n| Download quiz | `notebooklm download quiz quiz.json` |\n| Download quiz (markdown) | `notebooklm download quiz --format markdown \nquiz.md` |\n| Download flashcards | `notebooklm download flashcards cards.json` |\n| Download flashcards (markdown) | `notebooklm download flashcards --format \nmarkdown cards.md` |\n| Delete notebook | `notebooklm delete -n \u003Cid>` (add `--yes` to skip the prompt \nnon-interactively) |\n| List languages | `notebooklm language list` |\n| Get language | `notebooklm language get` |\n| Set language | `notebooklm language set zh_Hans` |\n| List profiles | `notebooklm profile list` |\n| Create profile | `notebooklm profile create work` |\n| Switch profile | `notebooklm profile switch work` |\n| Delete profile | `notebooklm profile delete old --yes` (`-y`; `--confirm` is a\ndeprecated alias) |\n| Rename profile | `notebooklm profile rename old new` |\n| Use profile (one-off) | `notebooklm -p work list` |\n| Health check | `notebooklm doctor` |\n| Health check (auto-fix) | `notebooklm doctor --fix` |\n\n**Parallel safety:** Use explicit notebook IDs in parallel workflows. Commands \nsupporting `-n` shorthand: `artifact wait`, `source wait`, `research \nwait\u002Fstatus`, `download *`. Download commands also support `-a\u002F--artifact`. \nOther commands use `--notebook`. For chat, use `-c \u003Cconversation_id>` to target \na specific conversation.\n\n**Partial IDs:** Use first 6+ characters of UUIDs. Must be unique prefix (fails \nif ambiguous). Works for ID-based commands such as `use`, `source delete`, and \n`wait`. For exact source-title deletion, use `source delete-by-title \"Title\"`. \nFor automation, prefer full UUIDs to avoid ambiguity.\n\n## Command Output Formats\n\nCommands with `--json` return structured data for parsing:\n\n**Create notebook:**\n```bash\n$ notebooklm create \"Research\" --json\n{\"notebook\": {\"id\": \"abc123de-...\", \"title\": \"Research\", \"created_at\": null}}\n# parse with: jq -r .notebook.id\n```\n\n**Add source:**\n```bash\n$ notebooklm source add \"https:\u002F\u002Fexample.com\" --json\n{\"source\": {\"id\": \"def456...\", \"title\": \"Example\", \"type\": \n\"SourceType.WEB_PAGE\", \"url\": \"https:\u002F\u002Fexample.com\"}}\n# parse with: jq -r .source.id\n# Note: no `status` field on add — use `source list --json` or `source wait` to \ncheck processing state.\n```\n\n**Generate artifact:**\n```bash\n$ notebooklm generate audio \"Focus on key points\" --json\n{\"task_id\": \"xyz789...\", \"status\": \"pending\"}\n# When run with --wait, completed status also includes a `url` field.\n```\n\n**Chat with references:**\n```bash\n$ notebooklm ask \"What is X?\" --json\n{\"answer\": \"X is... [1] [2]\", \"conversation_id\": \"...\", \"turn_number\": 1, \n\"is_follow_up\": false, \"references\": [{\"source_id\": \"abc123...\", \n\"citation_number\": 1, \"cited_text\": \"Relevant passage from source...\"}, \n{\"source_id\": \"def456...\", \"citation_number\": 2, \"cited_text\": \"Another \npassage...\"}]}\n```\n\n**Source fulltext (get indexed content):**\n```bash\n$ notebooklm source fulltext \u003Csource_id> --json\n{\"source_id\": \"...\", \"title\": \"...\", \"content\": \"Full indexed text...\", \n\"_type_code\": null, \"url\": null, \"char_count\": 12345}\n```\n\n**Understanding citations:** The `cited_text` in references is often a snippet \nor section header, not the full quoted passage. The `start_char`\u002F`end_char` \npositions reference NotebookLM's internal chunked index, not the raw fulltext. \nUse `SourceFulltext.find_citation_context()` to locate citations:\n```python\nfulltext = await client.sources.get_fulltext(notebook_id, ref.source_id)\nmatches = fulltext.find_citation_context(ref.cited_text)  # Returns \nlist[(context, position)]\nif matches:\n    context, pos = matches[0]  # First match; check len(matches) > 1 for \nduplicates\n```\n\n**Extract IDs:** Singular endpoints wrap their result in an envelope —\nparse `.notebook.id` (from `create`), `.source.id` (from `source add`),\nor `.task_id` (from `generate *`). The chat `--json` references list uses\n`.references[].source_id`.\n\n## Generation Types\n\nAll generate commands support:\n- `-s, --source` to use specific source(s) instead of all sources\n- `--language` to set output language (defaults to configured language or 'en')\n- `--json` for machine-readable output (returns `task_id` and `status`)\n- `--retry N` to automatically retry on rate limits with exponential backoff \n(supported on all subcommands **except** `mind-map`)\n- `--prompt-file PATH` to read description\u002Fquery from a file (supported on \n`ask`, `generate` subcommands except `mind-map`, and `source add-research`; \nmutually exclusive with positional argument; use for long prompts)\n\n| Type | Command | Options | Download |\n|------|---------|---------|----------|\n| Podcast | `generate audio` | `--format `, `--length ` | .mp3 |\n| Video | `generate video` | `--format ` (⁴), `--style ` | .mp4 |\n| Slide Deck | `generate slide-deck` | `--format `, `--length ` (²) | .pdf \u002F \n.pptx |\n| Slide Revision | `generate revise-slide \"prompt\" --artifact \u003Cid> --slide N` | \n`--wait`, `--notebook` | *(re-downloads parent deck)* |\n| Infographic | `generate infographic` | `--orientation `, `--detail `, `--style\n` | .png |\n| Report | `generate report` | `--format `, `--append \"extra instructions\"` (¹) \n| .md |\n| Mind Map | `generate mind-map` | `--kind ` (³) *(default: note-backed; flips \nto interactive in v0.8.0)* | .json |\n| Data Table | `generate data-table` | description required | .csv |\n| Quiz | `generate quiz` | `--difficulty `, `--quantity ` | .json\u002F.md\u002F.html |\n| Flashcards | `generate flashcards` | `--difficulty `, `--quantity ` | \n.json\u002F.md\u002F.html |\n\n¹ `--append` only customizes the built-in templates. With `--format custom`, \npass the prompt as the positional `DESCRIPTION` argument (`notebooklm generate \nreport \"PROMPT\" --format custom`); `--append` is silently ignored in that mode \n(the CLI prints a warning).\n\n³ **Two kinds of mind map (issue #1256).** `generate mind-map --kind \nnote-backed` (today's default) creates the **note-backed** kind — a JSON node \ntree, generated synchronously. `generate mind-map --kind interactive` creates \nthe newer **interactive** studio artifact (what the web app now makes); it is \npolled to completion. Both emit the same `{mind_map, note_id, kind}` JSON, list \nunder `artifact list --type mind-map`, and export via `download mind-map`. \n`--instructions` applies only to the note-backed kind. **The default `--kind` \nswitches to `interactive` in v0.8.0**; omitting `--kind` prints a one-time \nstderr notice (silence with `NOTEBOOKLM_QUIET_DEPRECATIONS=1`).\n\n⁴ **Cinematic video (Veo 3).** `generate video --format cinematic` generates AI \ndocumentary footage via Veo 3; it **ignores `--style`**, takes ~30-40 min, and \nrequires a Google AI Ultra subscription. Also exposed as the `generate \ncinematic-video` alias (which forces `--format cinematic` and a longer default \ntimeout). Download with `download video` or the `download cinematic-video` \nalias.\n\n² **Portrait \u002F vertical slide decks via prompt.** Slide-deck has no \n`--orientation` flag (unlike infographic). Treat portrait decks as skill-level \nprompt guidance, not a typed CLI\u002FAPI contract: NotebookLM currently honors \norientation cues written into the `DESCRIPTION` positional argument. Including \nphrases like `\"9:16 portrait\"`, `\"vertical layout\"`, `\"portrait mobile format\"`,\nor `\"vertical 9:16 layout\"` can make NotebookLM render each slide as a 9:16 \nportrait image. Empirically:\n\n- The `.pptx` canvas itself may stay 16:9, but each slide's embedded image can \nbe rendered as 9:16 portrait — useful for vertical\u002Fmobile video material \nextracted via `python-pptx`.\n- Orientation is steered once at generation time. `generate revise-slide` edits \ncontent within an existing slide but does not change its orientation; if a slide\nfalls back to landscape (occasional inconsistency), regenerate the whole deck \nrather than revising the single page.\n- Combine with an explicit page count in the prompt (e.g. `\"Create exactly 8 \npages, using a vertical 9:16 portrait layout\"`) for the most predictable output.\n\n```bash\n# Skill prompt hint: ask NotebookLM to render each slide as a 9:16 portrait \nimage\nnotebooklm generate slide-deck \"Create an 8-page deck in 9:16 portrait \norientation for mobile viewing\" --length default\n```\n\n## Features Beyond the Web UI\n\nThese capabilities are available via CLI but not in NotebookLM's web interface:\n\n| Feature | Command | Description |\n|---------|---------|-------------|\n| **Batch downloads** | `download \u003Ctype> --all` | Download all artifacts of a \ntype at once |\n| **Quiz\u002FFlashcard export** | `download quiz --format json` | Export as JSON, \nMarkdown, or HTML (web UI only shows interactive view) |\n| **Mind map extraction** | `download mind-map` | Export hierarchical JSON for \nvisualization tools |\n| **Data table export** | `download data-table` | Download structured tables as \nCSV |\n| **Slide deck as PPTX** | `download slide-deck --format pptx` | Download slide \ndeck as editable .pptx (web UI only offers PDF) |\n| **Slide revision** | `generate revise-slide \"prompt\" --artifact \u003Cid> --slide \nN` | Modify individual slides with a natural-language prompt |\n| **Report template append** | `generate report --format study-guide --append \n\"...\"` | Append custom instructions to built-in format templates without losing \nthe format type |\n| **Source fulltext** | `source fulltext \u003Cid>` | Retrieve the indexed text \ncontent of any source |\n| **Save chat to note** | `ask \"...\" --save-as-note` \u002F `history --save` | Save \nQ&A answers or conversation history as notebook notes |\n| **Programmatic sharing** | `share` commands | Manage sharing permissions \nwithout the UI |\n\n## Common Workflows\n\n### Research to Podcast (Interactive)\n**Time:** 5-10 minutes total\n\n1. `notebooklm create \"Research: \"` — *if fails: check auth with `notebooklm \nlogin`*\n2. `notebooklm source add` for each URL\u002Fdocument — *if one fails: log warning, \ncontinue with others*\n3. Wait for sources: `notebooklm source list --json` until all status=READY — \n*required before generation*\n4. `notebooklm generate audio \"Focus on \"` (confirm when asked) — *if rate \nlimited: wait 5 min, retry once*\n5. Note the artifact ID returned\n6. Check `notebooklm artifact list` later for status\n7. `notebooklm download audio .\u002Fpodcast.mp3` when complete (confirm when asked)\n\n### Research to Podcast (Automated with Subagent)\n**Time:** 5-10 minutes, but continues in background\n\nWhen user wants full automation (generate and download when ready):\n\n1. Create notebook and add sources as usual\n2. Wait for sources to be ready (use `source wait` or check `source list \n--json`)\n3. Run `notebooklm generate audio \"...\" --json` → parse `task_id` from output\n4. **Spawn a background agent** using Task tool:\n   ```python\n   Task(\n     prompt=\"Wait for artifact {task_id} in notebook {notebook_id} to complete, \nthen download.\n             Use: notebooklm artifact wait {task_id} -n {notebook_id} --timeout \n1200\n             Then: notebooklm download audio .\u002Fpodcast.mp3 -a {task_id} -n \n{notebook_id}\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n5. Main conversation continues while agent waits\n\n**Error handling in subagent:**\n- If `artifact wait` returns exit code 2 (timeout): Report timeout, suggest \nchecking `artifact list`\n- If download fails: Check if artifact status is COMPLETED first\n\n**Benefits:** Non-blocking, user can do other work, automatic download on \ncompletion\n\n### Document Analysis\n**Time:** 1-2 minutes\n\n1. `notebooklm create \"Analysis: \"`\n2. `notebooklm source add .\u002Fdoc.pdf` (or URLs)\n3. `notebooklm ask \"Summarize the key points\"`\n4. `notebooklm ask \"What are the main arguments?\"`\n5. Continue chatting as needed\n\n### Bulk Import\n**Time:** Varies by source count\n\n1. `notebooklm create \"Collection: \"`\n2. Add multiple sources:\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\"\n   notebooklm source add \"https:\u002F\u002Furl2.com\"\n   notebooklm source add .\u002Flocal-file.pdf\n   ```\n3. `notebooklm source list` to verify\n\n**Source limits:** Varies by plan—Standard: 50, Plus: 100, Pro: 300, Ultra: 600 \nsources per notebook. See [NotebookLM \nplans](https:\u002F\u002Fsupport.google.com\u002Fnotebooklm\u002Fanswer\u002F16213268) for details. The \nCLI does not enforce these limits; they are applied by your NotebookLM account.\n**Supported types:** PDFs, YouTube URLs, web URLs, Google Docs, text files, \nMarkdown, Word docs, EPUB, audio files, video files, images\n\n### Bulk Import with Source Waiting (Subagent Pattern)\n**Time:** Varies by source count\n\nWhen adding multiple sources and needing to wait for processing before \nchat\u002Fgeneration:\n\n1. Add sources with `--json` to capture IDs (parse with `jq -r .source.id`):\n   ```bash\n   notebooklm source add \"https:\u002F\u002Furl1.com\" --json  # → {\"source\": {\"id\": \n\"abc...\", ...}}\n   notebooklm source add \"https:\u002F\u002Furl2.com\" --json  # → {\"source\": {\"id\": \n\"def...\", ...}}\n   ```\n2. **Spawn a background agent** to wait for all sources:\n   ```\n   Task(\n     prompt=\"Wait for sources {source_ids} in notebook {notebook_id} to be \nready.\n             For each: notebooklm source wait {id} -n {notebook_id} --timeout \n600\n             Report when all ready or if any fail.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n3. Main conversation continues while agent waits\n4. Once sources are ready, proceed with chat or generation\n\n**Why wait for sources?** Sources must be indexed before chat or generation. \nTakes ~30 seconds to several minutes per source (see the processing-times table \nbelow).\n\n### Deep Web Research (Subagent Pattern)\n**Time:** 15-30+ minutes, runs in background\n\nDeep research finds and analyzes web sources on a topic:\n\n1. Create notebook: `notebooklm create \"Research: \"`\n2. Start deep research (non-blocking):\n   ```bash\n   notebooklm source add-research \"topic query\" --mode deep --no-wait\n   ```\n3. **Spawn a background agent** to wait and import:\n   ```\n   Task(\n     prompt=\"Wait for research in notebook {notebook_id} to complete and import \nsources.\n             Use: notebooklm research wait -n {notebook_id} --import-all \n--timeout 1800\n             Report how many sources were imported.\",\n     subagent_type=\"general-purpose\"\n   )\n   ```\n4. Main conversation continues while agent waits\n5. When agent completes, sources are imported automatically\n\n**Alternative (blocking):** For simple cases, omit `--no-wait`:\n```bash\nnotebooklm source add-research \"topic\" --mode deep --import-all\n# Blocks until research completes (deep mode: 15-30+ min)\n```\n\n**When to use each mode:**\n- `--mode fast`: Specific topic, quick overview needed (5-10 sources, seconds)\n- `--mode deep`: Broad topic, comprehensive analysis needed (20+ sources, 15-30+\nmin)\n\n**Research sources:**\n- `--from web`: Search the web (default)\n- `--from drive`: Search Google Drive\n\n## Output Style\n\n**Progress updates:** Brief status for each step\n- \"Creating notebook 'Research: AI'...\"\n- \"Adding source: https:\u002F\u002Fexample.com...\"\n- \"Starting audio generation... (task ID: abc123)\"\n\n**Fire-and-forget for long operations:**\n- Start generation, return artifact ID immediately\n- Do NOT poll or wait in main conversation - generation takes 5-45 minutes (see \ntiming table)\n- User checks status manually, OR use subagent with `artifact wait`\n\n**JSON output:** Use `--json` flag for machine-readable output:\n```bash\nnotebooklm list --json\nnotebooklm auth check --test --json   # use --test for network-validated auth \n(see § Agent Setup Verification)\nnotebooklm source list --json\nnotebooklm artifact list --json\n```\n\n**JSON schemas (key fields):**\n\n`notebooklm list --json`:\n```json\n{\"notebooks\": [{\"index\": 1, \"id\": \"...\", \"title\": \"...\", \"is_owner\": true, \n\"created_at\": \"...\"}], \"count\": 1}\n```\n\n`notebooklm auth check --test --json` (use `--test` to drive the network \ntoken-fetch — bare `--json` would leave `\"token_fetch\": null`):\n```json\n{\"status\": \"ok\", \"checks\": {\"storage_exists\": true, \"json_valid\": true, \n\"cookies_present\": true, \"sid_cookie\": true, \"token_fetch\": true}, \"details\": \n{\"storage_path\": \"...\", \"auth_source\": \"file\", \"cookies_found\": [\"SID\", \"HSID\", \n\"...\"], \"cookie_domains\": [\".google.com\"]}}\n```\n\n`notebooklm source list --json`:\n```json\n{\"notebook_id\": \"...\", \"notebook_title\": \"...\", \"sources\": [{\"index\": 1, \"id\": \n\"...\", \"title\": \"...\", \"type\": \"SourceType.WEB_PAGE\", \"url\": \"...\", \"status\": \n\"ready|processing|error\", \"status_id\": 1, \"created_at\": \"...\"}], \"count\": 1}\n```\n\n`notebooklm artifact list --json`:\n```json\n{\"notebook_id\": \"...\", \"notebook_title\": \"...\", \"artifacts\": [{\"index\": 1, \"id\":\n\"...\", \"title\": \"...\", \"type\": \"Audio\", \"type_id\": 1, \"status\": \n\"in_progress|pending|completed|unknown\", \"status_id\": 1, \"created_at\": \"...\"}], \n\"count\": 1}\n```\n\n**Status values:**\n- Sources: `processing` → `ready` (or `error`)\n- Artifacts: `pending` or `in_progress` → `completed` (or `unknown`)\n\n## Error Handling\n\n**On failure, offer the user a choice:**\n1. Retry the operation\n2. Skip and continue with something else\n3. Investigate the error\n\n**Error decision tree:**\n\n| Error | Cause | Action |\n|-------|-------|--------|\n| Auth\u002Fcookie error | Session expired | Run `notebooklm auth check` then \n`notebooklm login` |\n| \"No notebook context\" | Context not set | Use `-n \u003Cid>` or `--notebook \u003Cid>` \nflag (parallel), or `notebooklm use \u003Cid>` (single-agent) |\n| \"No result found for RPC ID\" | Rate limiting | Wait 5-10 min, retry |\n| `GENERATION_FAILED` | Google rate limit | Wait and retry later |\n| Download fails | Generation incomplete | Check `artifact list` for status |\n| Invalid notebook\u002Fsource ID | Wrong ID | Run `notebooklm list` to verify |\n| RPC protocol error | Google changed APIs | May need CLI update |\n\n## Exit Codes\n\nAll commands use consistent exit codes:\n\n| Code | Meaning | Action |\n|------|---------|--------|\n| 0 | Success | Continue |\n| 1 | Error (not found, processing failed) | Check stderr, see Error Handling |\n| 2 | Timeout (wait commands only) | Extend timeout or check status manually |\n\n**Examples:**\n- `source wait` returns 1 if source not found or processing failed\n- `artifact wait` returns 2 if timeout reached before completion\n- `generate` returns 1 if rate limited (check stderr for details)\n\n## Long Prompts\n\nWhen a prompt or query exceeds shell command-line length limits, use \n`--prompt-file` to read it from a file:\n\n```bash\nnotebooklm ask --prompt-file .\u002Flong_question.txt\nnotebooklm generate report --prompt-file .\u002Fcustom_report_prompt.txt\nnotebooklm source add-research --prompt-file .\u002Fresearch_query.txt --mode deep\n```\n\n`--prompt-file` is mutually exclusive with the positional text argument. The \nfile is read as UTF-8 with trailing whitespace stripped. Supported on: `ask`, \nall `generate` subcommands (except `mind-map`), and `source add-research`.\n\n> **Note:** `--prompt-file` reads a *prompt\u002Fquery text file*, not a source \ndocument. To upload a file as a notebook source, use `source add .\u002Ffile.pdf`.\n\n## Known Limitations\n\n**Rate limiting:** Audio, video, quiz, flashcards, infographic, and slide deck \ngeneration may fail due to Google's rate limits. This is an API limitation, not \na bug.\n\n**Reliable operations:** These always work:\n- Notebooks (list, create, delete, rename)\n- Sources (add, list, delete)\n- Chat\u002Fqueries\n- Mind-map, study-guide, report, data-table generation\n\n**Unreliable operations:** These may fail with rate limiting:\n- Audio (podcast) generation\n- Video generation\n- Quiz and flashcard generation\n- Infographic and slide deck generation\n\n**Workaround:** If generation fails:\n1. Check status: `notebooklm artifact list`\n2. Retry after 5-10 minutes\n3. Use the NotebookLM web UI as fallback\n\n**Processing times vary significantly.** Use the subagent pattern for long \noperations:\n\n| Operation | Typical time | Suggested timeout |\n|-----------|--------------|-------------------|\n| Source processing | 30s - 10 min | 600s |\n| Research (fast) | 30s - 2 min | 180s |\n| Research (deep) | 15 - 30+ min | 1800s |\n| Notes | instant | n\u002Fa |\n| Mind-map | instant (sync) | n\u002Fa |\n| Quiz, flashcards | 5 - 15 min | 900s |\n| Report, data-table | 5 - 15 min | 900s |\n| Audio generation | 10 - 20 min | 1200s |\n| Video generation | 15 - 45 min | 2700s |\n\n**Polling intervals:** When checking status manually, poll every 15-30 seconds \nto avoid excessive API calls.\n\n## Language Configuration\n\nLanguage setting controls the output language for generated artifacts (audio, \nvideo, etc.).\n\n**Important:** Language is a **GLOBAL** setting that affects all notebooks in \nyour account.\n\n```bash\n# List all 80+ supported languages with native names\nnotebooklm language list\n\n# Show current language setting\nnotebooklm language get\n\n# Set language for artifact generation\nnotebooklm language set zh_Hans  # Simplified Chinese\nnotebooklm language set ja       # Japanese\nnotebooklm language set en       # English (default)\n```\n\n**Common language codes:**\n| Code | Language |\n|------|----------|\n| `en` | English |\n| `zh_Hans` | 中文（简体） - Simplified Chinese |\n| `zh_Hant` | 中文（繁體） - Traditional Chinese |\n| `ja` | 日本語 - Japanese |\n| `ko` | 한국어 - Korean |\n| `es` | Español - Spanish |\n| `fr` | Français - French |\n| `de` | Deutsch - German |\n| `pt_BR` | Português (Brasil) |\n\n**Override per command:** Use `--language` flag on generate commands:\n```bash\nnotebooklm generate audio --language ja   # Japanese podcast\nnotebooklm generate video --language zh_Hans  # Chinese video\n```\n\n**Offline mode:** Use `--local` flag to skip server sync:\n```bash\nnotebooklm language set zh_Hans --local  # Save locally only\nnotebooklm language get --local  # Read local config only\n```\n\n## Troubleshooting\n\n```bash\nnotebooklm --help              # Main commands\nnotebooklm auth check          # Diagnose auth issues\nnotebooklm auth check --test   # Full auth validation with network test\nnotebooklm source --help       # Source management\nnotebooklm research --help     # Research status\u002Fwait\nnotebooklm generate --help     # Content generation\nnotebooklm artifact --help     # Artifact management\nnotebooklm download --help     # Download content\nnotebooklm language --help     # Language settings\n```\n\n**Diagnose auth:** `notebooklm auth check` - shows cookie domains, storage path,\nvalidation status\n**Re-authenticate:** `notebooklm login`\n**Check version:** `notebooklm --version`\n**Refresh a CLI-managed install:** `notebooklm skill install`\n\n## Research Handoff (local addition — keep when vendor skill updates)\n\nResearch runs (deep-research or ad-hoc) publish into per-project notebooks so Claude Code and Codex share one corpus instead of re-researching.\n\n- Publish: `\"$HOME\u002F.codex\u002Fskills\u002Fnotebooklm\u002Fscripts\u002Fpublish.sh\" .research\u002F\u003Cslug> [--notebook \u003Cid>] [--dry-run] [--max N] [--no-report]` — resolves\u002Fcreates `\u003CProject> — Research` notebook (cache `.research\u002F\u003Cslug>\u002Fnotebook_id` -> title match -> create), adds evidence URLs deduped + throttled, uploads report.md as text source. Best-effort, always exits 0.\n- Consume: user says \"ask my notebook X\" \u002F \"check the notebook\" -> `notebooklm list --json`, fuzzy-match title, `notebooklm ask -n \u003Cfull-id> \"\u003Cquestion>\"` (skip `--new`: in 0.7+ it destructively deletes the notebook's previous conversation). Always `-n \u003Cid>`, never `use` (shared context clobbers parallel sessions).\n- Project Gemini: treat `ask` on the project notebook as a corpus-grounded research sidecar for source gaps, query shaping, synthesis, outlines, and \"what should I research next?\"; use `--json` when citations matter, treat answers as advisory (not human approval), and verify claims outside the corpus.\n- Never send Obsidian wiki content, secrets, or client\u002Fprivate material (script refuses `~\u002FDevelopment\u002FObsidian`; ask first for work dirs, default `--no-report`). Never run `login` unattended.\n",{"name":5,"description":7},"main","2409dbb520b0891ed4f668f01c3a140dcf9d77c5","skills\u002Fmisc\u002Fnotebooklm","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack","https:\u002F\u002Fgithub.com\u002Fjadenmaciel","https:\u002F\u002Fjadenmacielshapiro.dev","Applied AI engineer. Payment systems and AI agents in Rust, Go, and Python.","2026-11-07 06:44:09",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add jadenmaciel\u002Fjstack --skill notebooklm",{"tool":38,"command":39},"bunx","bunx skills add jadenmaciel\u002Fjstack --skill notebooklm",{"tool":41,"command":42},"pnpm","pnpm dlx skills add jadenmaciel\u002Fjstack --skill notebooklm","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fmisc\u002Fnotebooklm\u002FSKILL.md",true,[46,52,56],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"scripts\u002Fpublish.sh","SCRIPT","脚本",4213,"https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fmisc\u002Fnotebooklm\u002Fscripts\u002Fpublish.sh",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"scripts\u002FRESEARCH_HANDOFF.md",1087,"https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fmisc\u002Fnotebooklm\u002Fscripts\u002FRESEARCH_HANDOFF.md",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"SKILL.md.orig","OTHER","其他",14412,"https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fmisc\u002Fnotebooklm\u002FSKILL.md.orig",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7A4W9JDKD7AAY8G5PAP0XQ2","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fstyle\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7A4W84DPXKDH0STE7EESQ68","wait-what","Stop. That last message did not land — re-pitch it.","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fstyle\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7A4W65736YGRF5N529B4FEF","ponytail","Lazy senior dev mode for any coding task (write, refactor, fix, review): YAGNI, stdlib first, no unrequested abstractions. Not for non-coding requests.","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fstyle\u002Fponytail\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7A4W1R831XHNVD9B6XDRN7F","i-have-adhd","Shape output for a reader with ADHD. Use this skill whenever responding to ANY user message including coding tasks, debugging, explanations, planning, and casual conversation. Output should lead with concrete next actions, number multi-step work, externalize state across turns, suppress tangents, give specific time estimates, and make wins visible. Trigger even on casual messages and even when the user did not explicitly ask for brevity.","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fstyle\u002Fi-have-adhd\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7A4W00D3RMTMMWHG3QQ3FZF","x-research","Use when the task needs live posts from X\u002FTwitter, or when deep-research needs its X pass.","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fx-research\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7A4VWZ6Y9XWXDG3TQB15ABC","slop","Answer an empirical question, or explore\u002Ftest something about real code, by building and running throwaway code in ~\u002Fslop\u002F — harnesses, lint rules, load tests, ports, API probes. Never merged. Use whenever disposable code would answer, explore, or test something faster or more reliably than reasoning about it.","https:\u002F\u002Fgithub.com\u002Fjadenmaciel\u002Fjstack\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fslop\u002FSKILL.md",[],[]]