Complete terminal toolkit for Google NotebookLM — CDP auth, chat, source management, content generation, and Studio notes from the command line.
Project description
notebooklm-cdp
Complete terminal toolkit for Google NotebookLM — Chrome-based auth via CDP, chat, source management, content generation, and Studio note access from the command line.
What it does
notebooklm-cdp is a complete terminal interface for Google NotebookLM. Install it and you get two CLI tools:
nlm — authenticates into NotebookLM using your already-open Chrome Beta browser. One command (nlm login) extracts your active Google session via the Chrome DevTools Protocol — no OAuth popup, no login flow, no stored passwords. nlm also provides convenient index-based access to Studio notes: list, read, and export them to Markdown without knowing their UUIDs.
notebooklm — the full NotebookLM API from the terminal: create and manage notebooks, add sources (URLs, PDFs, YouTube, Google Docs, audio, video), chat with your content, generate podcasts, videos, quizzes, flashcards, slide decks, infographics, reports, and mind maps, then download the results. Complete Studio note CRUD. Multi-account profiles. Clean --json output for every command.
Who it is for
- AI agent developers who need authenticated, programmatic NotebookLM access without interactive browser sessions
- Developers using Claude Code, Codex, Cursor, or Windsurf who want to give their agent full NotebookLM access
- Automation engineers who build NotebookLM workflows — research pipelines, podcast generation, document analysis — from the terminal
- NotebookLM power users who want to manage notebooks, sources, and notes without touching the web UI
Features
- CDP auth — reads Google session cookies from your running Chrome Beta; auto-detects the active account from the open NotebookLM tab
- Notebooks — create, list, rename, delete; switch context with
notebooklm use - Sources — add URLs, PDFs, YouTube videos, Google Docs, audio, video, images; wait for processing; deep web research mode
- Chat — ask questions, get answers with source citations, continue conversations, save history as notes
- Content generation — podcasts, videos, quizzes, flashcards, slide decks (PDF/PPTX), infographics, reports, mind maps, data tables
- Studio notes — full CRUD via
notebooklm note; convenient index-based access vianlm note list/read/export - Profiles — multiple Google accounts, isolated environments for parallel agents
--jsonoutput on every command for scripting and AI agent pipelines- CI/CD support — inline auth via
NOTEBOOKLM_AUTH_JSONenvironment variable, no filesystem writes needed
Requirements
- Chrome Beta with remote debugging enabled (
--remote-debugging-port=9222) - NotebookLM open in a Chrome Beta tab
- Python 3.11+
Install
uv tool install notebooklm-cdp
No
uv? Runcurl -LsSf https://astral.sh/uv/install.sh | sh, or usepip install notebooklm-cdp.
Quick start
# 1. Start Chrome Beta with remote debugging (once per session)
/Applications/Google\ Chrome\ Beta.app/Contents/MacOS/Google\ Chrome\ Beta \
--remote-debugging-port=9222 --profile-directory=Default
# 2. Open https://notebooklm.google.com in Chrome Beta, then authenticate
nlm login
# 3. Use the full NotebookLM CLI
notebooklm list
notebooklm create "My Research"
notebooklm source add "https://example.com/paper.pdf"
notebooklm ask "What are the key findings?"
notebooklm generate audio "Focus on practical implications"
# 4. Manage Studio notes
nlm note list -n <notebook_id>
nlm note read 1 -n <notebook_id>
nlm note export -n <notebook_id> --output notes.md
Commands
Authentication
| Command | Description |
|---|---|
nlm login |
Extract Google session from Chrome Beta via CDP |
notebooklm login |
Interactive browser login (fallback) |
notebooklm auth check |
Diagnose auth status |
notebooklm status |
Show active account and notebook context |
Notebooks & Sources
| Command | Description |
|---|---|
notebooklm list |
List all notebooks |
notebooklm create "Title" |
Create a notebook |
notebooklm use <id> |
Set active notebook context |
notebooklm source add <url|file> |
Add a source (URL, PDF, YouTube, etc.) |
notebooklm source list |
List sources in active notebook |
notebooklm source add-research "query" |
Add web research results as sources |
Chat
| Command | Description |
|---|---|
notebooklm ask "question" |
Chat with notebook content |
notebooklm ask "question" --json |
Chat with source citations |
notebooklm ask "question" --save-as-note |
Save answer as a Studio note |
notebooklm history |
Show conversation history |
Content Generation
| Command | Description |
|---|---|
notebooklm generate audio "instructions" |
Generate a podcast (Deep Dive) |
notebooklm generate video "instructions" |
Generate a video explainer |
notebooklm generate quiz |
Generate a quiz |
notebooklm generate flashcards |
Generate flashcards |
notebooklm generate slide-deck |
Generate a slide deck (PDF/PPTX) |
notebooklm generate report --format briefing-doc |
Generate a report |
notebooklm generate mind-map |
Generate a mind map |
notebooklm download audio ./output.mp3 |
Download generated audio |
notebooklm artifact list |
Check generation status |
Studio Notes
| Command | Description |
|---|---|
nlm note list -n <id> |
List notes with sequential index and title |
nlm note read <n> -n <id> |
Read note by 1-based index or UUID |
nlm note export -n <id> --output file.md |
Export all notes to Markdown |
notebooklm note list -n <id> |
Full note list with IDs |
notebooklm note create -n <id> --title "T" "content" |
Create a note |
notebooklm note save <note_id> -n <id> |
Update note content |
notebooklm note delete <note_id> -n <id> |
Delete a note |
How auth works
nlm login connects to Chrome Beta's CDP endpoint at http://127.0.0.1:9222, finds the open NotebookLM tab, reads the active Google session cookies, and saves them to ~/.notebooklm/profiles/default/storage_state.json. The Google account index (authuser) is detected automatically from the tab URL and embedded in the session file.
No passwords or credentials are stored — only the session cookies already present in your browser. Re-run nlm login whenever cookies expire.
License
MIT — Nolan Vale
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file notebooklm_cdp-0.1.1.tar.gz.
File metadata
- Download URL: notebooklm_cdp-0.1.1.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db13f5aaafe4295a23ab92fccec604ed88353277fbd2085d0878d28de9aec13b
|
|
| MD5 |
d3552e2c7e6449a2527ccc21badccf36
|
|
| BLAKE2b-256 |
f1de0ccf66031eef5e65717fe91b59d9995296d756a77097ad60b37a1a5ad2d3
|
File details
Details for the file notebooklm_cdp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: notebooklm_cdp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2420223c24ac1d97d311ff0a50dc92f6b5a71f0a6a75c4de1b81c6e4f0a5ca36
|
|
| MD5 |
9ed6a37b234b8fae0e3eeda6cf8ae382
|
|
| BLAKE2b-256 |
811dab1b7ba52f6056286252254ecfb1f8f4bed2d710dc28b3c7c4d63f5381f0
|