Loading...
Loading...
Expert guide for the NotebookLM CLI (`nlm`) - a command-line interface for Google NotebookLM. Use this skill when users want to interact with NotebookLM programmatically, including: creating/managing notebooks, adding sources (URLs, YouTube, text, Google Drive), generating content (podcasts, reports, quizzes, flashcards, mind maps, slides, infographics, videos, data tables), conducting research, chatting with sources, or automating NotebookLM workflows. Triggers on mentions of "nlm", "notebooklm", "notebook lm", "podcast generation", "audio overview", or any NotebookLM-related automation task.
npx skill4agent add jacob-bd/notebooklm-cli nlm-cli-skillnlmnlm --help # List all commands
nlm <command> --help # Help for specific command
nlm --ai # Full AI-optimized documentation
nlm --version # Check installed versionnlm loginnlm login--confirm--confirm-y--notebook-idnlm alias set <name> <uuid>nlm alias listnlm chat startnlm notebook query--quiet--jsonUser wants to...
│
├─► Work with NotebookLM for the first time
│ └─► nlm login → nlm notebook create "Title"
│
├─► Add content to a notebook
│ ├─► From a URL/webpage → nlm source add <nb-id> --url "https://..."
│ ├─► From YouTube → nlm source add <nb-id> --url "https://youtube.com/..."
│ ├─► From pasted text → nlm source add <nb-id> --text "content" --title "Title"
│ ├─► From Google Drive → nlm source add <nb-id> --drive <doc-id> --type doc
│ └─► Discover new sources → nlm research start "query" --notebook-id <nb-id>
│
├─► Generate content from sources
│ ├─► Podcast/Audio → nlm audio create <nb-id> --confirm
│ ├─► Written summary → nlm report create <nb-id> --confirm
│ ├─► Study materials → nlm quiz/flashcards create <nb-id> --confirm
│ ├─► Visual content → nlm mindmap/slides/infographic create <nb-id> --confirm
│ ├─► Video → nlm video create <nb-id> --confirm
│ └─► Extract data → nlm data-table create <nb-id> "description" --confirm
│
├─► Ask questions about sources
│ └─► nlm notebook query <nb-id> "question"
│ (Use --conversation-id for follow-ups)
│ ⚠️ Do NOT use `nlm chat start` - it's a REPL for humans only
│
├─► Check generation status
│ └─► nlm studio status <nb-id>
│
└─► Manage/cleanup
├─► List notebooks → nlm notebook list
├─► List sources → nlm source list <nb-id>
├─► Delete source → nlm source delete <source-id> --confirm
└─► Delete notebook → nlm notebook delete <nb-id> --confirmnlm login # Launch Chrome, extract cookies (primary method)
nlm login --check # Validate current session
nlm login --profile work # Use named profile for multiple accounts
nlm auth status # Check if authenticated
nlm auth list # List all profilesnlm notebook list # List all notebooks
nlm notebook list --json # JSON output for parsing
nlm notebook list --quiet # IDs only (for scripting)
nlm notebook create "Title" # Create notebook, returns ID
nlm notebook get <id> # Get notebook details
nlm notebook describe <id> # AI-generated summary + suggested topics
nlm notebook query <id> "question" # One-shot Q&A with sources
nlm notebook rename <id> "New Title" # Rename notebook
nlm notebook delete <id> --confirm # PERMANENT deletion# Adding sources
nlm source add <nb-id> --url "https://..." # Web page
nlm source add <nb-id> --url "https://youtube.com/..." # YouTube video
nlm source add <nb-id> --text "content" --title "X" # Pasted text
nlm source add <nb-id> --drive <doc-id> # Drive doc (auto-detect type)
nlm source add <nb-id> --drive <doc-id> --type slides # Explicit type
# Listing and viewing
nlm source list <nb-id> # Table of sources
nlm source list <nb-id> --drive # Show Drive sources with freshness
nlm source list <nb-id> --drive -S # Skip freshness checks (faster)
nlm source get <source-id> # Source metadata
nlm source describe <source-id> # AI summary + keywords
nlm source content <source-id> # Raw text content
nlm source content <source-id> -o file.txt # Export to file
# Drive sync (for stale sources)
nlm source stale <nb-id> # List outdated Drive sources
nlm source sync <nb-id> --confirm # Sync all stale sources
nlm source sync <nb-id> --source-ids <ids> --confirm # Sync specific
# Deletion
nlm source delete <source-id> --confirmdocslidessheetspdf# Start research (--notebook-id is REQUIRED)
nlm research start "query" --notebook-id <id> # Fast web (~30s)
nlm research start "query" --notebook-id <id> --mode deep # Deep web (~5min)
nlm research start "query" --notebook-id <id> --source drive # Drive search
# Check progress
nlm research status <nb-id> # Poll until done (5min max)
nlm research status <nb-id> --max-wait 0 # Single check, no waiting
nlm research status <nb-id> --task-id <tid> # Check specific task
nlm research status <nb-id> --full # Full details
# Import discovered sources
nlm research import <nb-id> <task-id> # Import all
nlm research import <nb-id> <task-id> --indices 0,2,5 # Import specificfastdeep--confirm-y--source-ids <id1,id2>--language <code># Audio (Podcast)
nlm audio create <id> --confirm
nlm audio create <id> --format deep_dive --length default --confirm
nlm audio create <id> --format brief --focus "key topic" --confirm
# Formats: deep_dive, brief, critique, debate
# Lengths: short, default, long
# Report
nlm report create <id> --confirm
nlm report create <id> --format "Study Guide" --confirm
nlm report create <id> --format "Create Your Own" --prompt "Custom..." --confirm
# Formats: "Briefing Doc", "Study Guide", "Blog Post", "Create Your Own"
# Quiz
nlm quiz create <id> --confirm
nlm quiz create <id> --count 5 --difficulty 3 --confirm
# Count: number of questions (default: 2)
# Difficulty: 1-5 (1=easy, 5=hard)
# Flashcards
nlm flashcards create <id> --confirm
nlm flashcards create <id> --difficulty hard --confirm
# Difficulty: easy, medium, hard
# Mind Map
nlm mindmap create <id> --confirm
nlm mindmap create <id> --title "Topic Overview" --confirm
nlm mindmap list <id> # List existing mind maps
# Slides
nlm slides create <id> --confirm
nlm slides create <id> --format presenter --length short --confirm
# Formats: detailed, presenter | Lengths: short, default
# Infographic
nlm infographic create <id> --confirm
nlm infographic create <id> --orientation portrait --detail detailed --confirm
# Orientations: landscape, portrait, square
# Detail: concise, standard, detailed
# Video
nlm video create <id> --confirm
nlm video create <id> --format brief --style whiteboard --confirm
# Formats: explainer, brief
# Styles: auto_select, classic, whiteboard, kawaii, anime, watercolor, retro_print, heritage, paper_craft
# Data Table
nlm data-table create <id> "Extract all dates and events" --confirm
# DESCRIPTION is required as second argumentnlm studio status <nb-id> # List all artifacts
nlm studio status <nb-id> --json # JSON output
nlm studio delete <nb-id> <artifact-id> --confirm # Delete artifactcompletedin_progressfailed⚠️ AI TOOLS: DO NOT USE- It launches an interactive REPL that cannot be controlled programmatically. Usenlm chat startfor one-shot Q&A instead.nlm notebook query
nlm chat start <nb-id> # Launch interactive REPL/sources/clear/help/exitnlm chat configure <id> --goal default
nlm chat configure <id> --goal learning_guide
nlm chat configure <id> --goal custom --prompt "Act as a tutor..."
nlm chat configure <id> --response-length longer # longer, default, shorternlm alias set myproject abc123-def456... # Create alias (auto-detects type)
nlm alias get myproject # Resolve to UUID
nlm alias list # List all aliases
nlm alias delete myproject # Remove alias
# Use aliases anywhere
nlm notebook get myproject
nlm source list myproject
nlm audio create myproject --confirmnlm config show # Show current config
nlm config get <key> # Get specific setting
nlm config set <key> <value> # Update setting| Flag | Description |
|---|---|
| (none) | Rich table (human-readable) |
| JSON output (for parsing) |
| IDs only (for piping) |
| "ID: Title" format |
| "ID: URL" format (sources only) |
| All columns/details |
nlm notebook create "AI Research 2026" # Capture ID
nlm alias set ai <notebook-id>
nlm research start "agentic AI trends" --notebook-id ai --mode deep
nlm research status ai --max-wait 300 # Wait up to 5 min
nlm research import ai <task-id> # Import all sources
nlm audio create ai --format deep_dive --confirm
nlm studio status ai # Check generation progressnlm source add <id> --url "https://example1.com"
nlm source add <id> --url "https://example2.com"
nlm source add <id> --text "My notes..." --title "Notes"
nlm source list <id>nlm report create <id> --format "Study Guide" --confirm
nlm quiz create <id> --count 10 --difficulty 3 --confirm
nlm flashcards create <id> --difficulty medium --confirmnlm source add <id> --drive 1KQH3eW0hMBp7WK... --type slides
# ... time passes, document is edited ...
nlm source stale <id> # Check freshness
nlm source sync <id> --confirm # Sync if stale| Error | Cause | Solution |
|---|---|---|
| "Cookies have expired" | Session timeout | |
| "authentication may have expired" | Session timeout | |
| "Notebook not found" | Invalid ID | |
| "Source not found" | Invalid ID | |
| "Rate limit exceeded" | Too many calls | Wait 30s, retry |
| "Research already in progress" | Pending research | Use |
| Chrome doesn't launch | Port conflict | Close Chrome, retry |