Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jacob-bd/notebooklm-mcp-cli/llms.txt

Use this file to discover all available pages before exploring further.

Sources are the documents, URLs, videos, and text snippets that NotebookLM reads when answering questions or generating studio content. The nlm source commands let you manage every aspect of a notebook’s source library — from adding a PDF file to syncing stale Google Drive documents — directly from the terminal. The CLI supports two command styles:
# Noun-first
nlm source add <notebook> --url "https://example.com"

# Verb-first
nlm add url <notebook> "https://example.com"

Commands

source add

Add one or more sources to a notebook. Exactly one source type flag must be provided per invocation.
nlm source add <notebook-id> --url "https://example.com/article"
Source type flags
FlagDescription
--url <url>Web URL (repeatable for bulk add)
--text <content>Inline text content
--file <path>Local file (PDF, DOCX, TXT, etc.)
--youtube <url>YouTube video URL (repeatable)
--drive <doc-id>Google Drive document ID
Additional flags
FlagShortDescription
--wait-wPoll until the source finishes processing
--wait-timeoutMax seconds to wait when --wait is set (default 600)
--titleCustom title for the source (required for text sources)
--typeDrive doc type: doc, slides, sheets, pdf (default doc)
--profile-pProfile to use
Always pass --wait when you plan to query or generate studio content immediately after adding a source. Without it, the source may still be processing when your next command runs, leading to incomplete results.
Examples by source type
# Single URL
nlm source add <notebook-id> --url "https://example.com/article" --wait

# Multiple URLs in one shot (repeatable flag)
nlm source add <notebook-id> \
  --url "https://example.com/report" \
  --url "https://example.com/appendix"

source list

List all sources in a notebook.
nlm source list <notebook-id>
nlm source list myproject          # alias works here
Flags
FlagShortDescription
--full-aShow all columns
--drive-dShow Drive sources with freshness status
--skip-freshness-SSkip freshness checks (faster, useful with --drive)
--json-jOutput as JSON
--quiet-qOutput IDs only
--url-uOutput as ID: URL format
--profile-pProfile to use

source get

Retrieve the full text content of a source as processed by NotebookLM.
nlm source get <source-id>
nlm source get returns the raw text content of the source as indexed by NotebookLM. To get an AI-generated summary with keywords instead, use nlm source describe.
Flags
FlagShortDescription
--json-jOutput as JSON
--profile-pProfile to use

source describe

Ask the AI to generate a summary and extract keywords for a source. This is useful for quickly understanding what is in a large document without reading it yourself.
nlm source describe <source-id>
nlm source describe produces an AI-generated summary with keywords — it calls the NotebookLM AI layer. nlm source get returns the raw indexed text content without AI processing.
Flags
FlagShortDescription
--json-jOutput as JSON
--profile-pProfile to use

source content

Get the raw content of a source without any AI processing. Optionally write it directly to a file.
nlm source content <source-id>
nlm source content <source-id> --output raw-text.txt
Flags
FlagShortDescription
--json-jOutput as JSON
--output-oWrite content to a file instead of stdout
--profile-pProfile to use

source rename

Rename a source within a notebook.
nlm source rename <source-id> "New Title" --notebook <notebook-id>
Flags
FlagShortDescription
--notebook-nNotebook ID containing the source (required)
--profile-pProfile to use

source stale

Check which Google Drive sources in a notebook have been updated since they were last imported — i.e., the Drive document is newer than the cached version in NotebookLM.
nlm source stale <notebook-id>
Flags
FlagShortDescription
--json-jOutput as JSON
--profile-pProfile to use

source sync

Re-import all stale Drive sources so NotebookLM has the latest content.
nlm source sync <notebook-id> --confirm

# Sync only specific sources
nlm source sync <notebook-id> --source-ids "id1,id2" --confirm
Without --confirm, the CLI will prompt you interactively before syncing.
Flags
FlagShortDescription
--source-ids-sComma-separated IDs to sync (default: all stale)
--confirm-ySkip the confirmation prompt
--profile-pProfile to use

source delete

Permanently delete one or more sources from a notebook.
Deletion is irreversible. The source content is removed from NotebookLM immediately. Pass --confirm in scripts to skip the interactive prompt.
# Delete a single source
nlm source delete <source-id> --confirm

# Bulk delete — pass multiple IDs
nlm source delete <id1> <id2> <id3> --confirm
Flags
FlagShortDescription
--confirm-ySkip the confirmation prompt
--profile-pProfile to use

End-to-end example

1

Create a notebook and set an alias

nlm notebook create "Product Launch Research"
nlm alias set launch <notebook-id>
2

Add sources and wait for processing

nlm source add launch --url "https://techcrunch.com/2025/01/launch-coverage" --wait
nlm source add launch --file competitive-brief.pdf --wait
nlm source add launch --youtube "https://youtu.be/keynote-recap" --wait
3

Verify all sources are loaded

nlm source list launch
4

Describe a source to check what was extracted

# Grab the first source ID
source_id=$(nlm source list launch --quiet | head -1)
nlm source describe "$source_id"
5

Query the notebook

nlm notebook query launch "What are the main competitive risks identified?"

Build docs developers (and LLMs) love