Skip to main content
NotebookLM CLI Logo

NLM - NotebookLM CLI

A powerful command-line interface for Google NotebookLM

PyPI version Python License: MIT

⚠️ Important Disclaimer: This CLI uses internal APIs that are undocumented and may change without notice. Not affiliated with or endorsed by Google. Use at your own risk for personal/experimental purposes. See also: notebooklm-mcp for MCP server integration.


🎬 Demo

Watch a ~12 minute overview of the CLI in action:

NotebookLM CLI Demo

✨ Features

  • Full NotebookLM API Coverage — Notebooks, sources, audio podcasts, reports, quizzes, flashcards, mind maps, slides, infographics, videos, and data tables
  • Seamless Authentication — Uses Chrome DevTools Protocol for reliable, automatic cookie extraction
  • AI-Teachable — Run nlm --ai to output comprehensive documentation that AI assistants can consume
  • Alias System — Create memorable shortcuts for long UUIDs (e.g., myproject instead of abc123-def456-...)
  • Multiple Output Formats — Rich tables, JSON, quiet (IDs only), or full details
  • Profile Support — Manage multiple Google accounts with named profiles
  • Research Integration — Deep web search or Google Drive search to discover and import sources

📦 Installation

Install from PyPI using your preferred package manager:

# Using pip
pip install notebooklm-cli

# Using pipx (recommended for CLI tools)
pipx install notebooklm-cli

# Using uv
uv tool install notebooklm-cli

Requirements:

  • Python 3.10+
  • Google Chrome (for authentication)

🚀 Quick Start

1. Authenticate

nlm login

This launches Chrome, navigates to NotebookLM, and automatically extracts your session cookies. You'll need to log in to your Google account if not already signed in.

2. List Your Notebooks

nlm notebook list

3. Create a Notebook and Add Sources

# Create a new notebook
nlm notebook create "My Research"
# Output: Created notebook: abc123-def456-...

# Add a URL source
nlm source add abc123-def456 --url "https://example.com/article"

# Add a YouTube video
nlm source add abc123-def456 --url "https://youtube.com/watch?v=..."

# Add pasted text
nlm source add abc123-def456 --text "Your content here" --title "My Notes"

4. Generate a Podcast

nlm audio create abc123-def456 --confirm

5. Check Generation Status

nlm studio status abc123-def456

🏷️ Aliases (UUID Shortcuts)

Tired of typing long UUIDs? Create aliases:

# Set an alias
nlm alias set myproject abc123-def456-... # Types are auto-detected!

# Now use the alias anywhere
nlm notebook get myproject
nlm source list myproject
nlm audio create myproject --confirm

# Manage aliases
nlm alias list              # List all aliases
nlm alias get myproject     # Resolve to UUID
nlm alias delete myproject  # Remove alias

🤖 AI Integration

Option 1: Quick Context (nlm --ai)

The --ai flag outputs comprehensive, structured documentation designed for AI assistants:

nlm --ai

This prints a 400+ line guide covering all commands with exact syntax, authentication flow, error handling, complete task sequences, and 12 tips for AI automation.

Use case: Paste the output of nlm --ai into your AI assistant's context to teach it how to use the CLI.

Option 2: AI Skill (nlm-cli-skill/)

For AI coding assistants that support skills (Claude Code, Gemini CLI/Antigravity, OpenAI Codex, etc.), this repo includes a comprehensive skill:

nlm-cli-skill/
├── SKILL.md              # Main skill file with 10 critical rules
└── references/
    ├── command_reference.md   # Complete command signatures
    ├── troubleshooting.md     # Error diagnosis & solutions
    └── workflows.md           # End-to-end task sequences

To use: Copy the nlm-cli-skill/ folder to your AI tool's skills directory, or point your tool to this folder directly.


📚 Command Reference

Core Commands

Command Description
nlm login Authenticate with NotebookLM (opens Chrome)
nlm auth status Check if current session is valid
nlm notebook list List all notebooks
nlm notebook create "Title" Create a new notebook
nlm notebook get <id> Get notebook details
nlm notebook describe <id> Get AI-generated summary
nlm notebook query <id> "question" Chat with your sources
nlm notebook delete <id> --confirm Delete a notebook

Source Management

Command Description
nlm source list <notebook-id> List sources in a notebook
nlm source list <notebook-id> --drive Show Drive sources with freshness
nlm source list <notebook-id> --drive -S Faster listing, skip freshness checks
nlm source add <id> --url "..." Add URL or YouTube source
nlm source add <id> --text "..." --title "..." Add pasted text
nlm source add <id> --drive <doc-id> Add Google Drive document
nlm source describe <source-id> Get AI summary of source
nlm source content <source-id> Get raw text content
nlm source stale <notebook-id> List outdated Drive sources
nlm source sync <notebook-id> --confirm Sync Drive sources

Research (Discover New Sources)

Command Description
nlm research start "query" --notebook-id <id> Start web search (~30s)
nlm research start "query" --notebook-id <id> --mode deep Deep research (~5min)
nlm research start "query" --notebook-id <id> --source drive Search Google Drive
nlm research status <notebook-id> Check research progress
nlm research import <notebook-id> <task-id> Import discovered sources

Content Generation

All generation commands require --confirm (or -y) to execute:

Command Description
nlm audio create <id> --confirm Generate podcast/audio overview
nlm report create <id> --confirm Generate briefing doc or study guide
nlm quiz create <id> --confirm Generate quiz questions
nlm flashcards create <id> --confirm Generate flashcards
nlm mindmap create <id> --confirm Generate mind map
nlm slides create <id> --confirm Generate slide deck
nlm infographic create <id> --confirm Generate infographic
nlm video create <id> --confirm Generate video overview
nlm data-table create <id> "description" --confirm Extract data as table

Studio (Artifact Management)

Command Description
nlm studio status <notebook-id> List all generated artifacts
nlm studio delete <notebook-id> <artifact-id> --confirm Delete an artifact

Chat (Interactive Q&A)

Command Description
nlm chat start <notebook-id> Start interactive REPL session
nlm chat configure <notebook-id> Configure chat goal and response style
nlm notebook query <id> "question" One-shot question (no session)

Chat REPL commands: /sources, /clear, /help, /exit

Configuration

Command Description
nlm config show Show current configuration
nlm config get <key> Get a specific setting
nlm config set <key> <value> Update a setting

Authentication

Command Description
nlm login Authenticate with Chrome
nlm login --check Verify current credentials
nlm auth status Check session validity
nlm auth list List all profiles
nlm auth delete <profile> --confirm Delete a profile

🎛️ Output Formats

Most list commands support multiple output formats:

nlm notebook list              # Rich table (default)
nlm notebook list --json       # JSON output
nlm notebook list --quiet      # IDs only (for scripting)
nlm notebook list --title      # "ID: Title" format
nlm source list --url          # "ID: URL" format
nlm notebook list --full       # All columns

👤 Profiles (Multiple Accounts)

Manage multiple Google accounts with named profiles:

# Login to a specific profile
nlm login --profile work
nlm login --profile personal

# Use a profile for commands
nlm notebook list --profile work

# List all profiles
nlm auth list

# Delete a profile
nlm auth delete work --confirm

⌨️ Shell Completion

Enable tab completion for faster command entry:

# Auto-install for your current shell
nlm --install-completion

# Or show the completion script to install manually
nlm --show-completion

⚠️ Session Lifetime

NotebookLM sessions typically last ~20 minutes. If commands start failing with authentication errors, simply re-run:

nlm login

🔧 Troubleshooting

Having issues? See the Troubleshooting Guide for solutions to common problems including authentication, network issues, and OpenAI Codex sandbox configuration.


📖 Documentation

For detailed technical documentation on the internal API and advanced usage, see the docs/ folder:

For AI assistants, run nlm --ai to get the full command reference.


🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

# Quick start for contributors
git clone https://github.com/jacob-bd/notebooklm-cli.git
cd notebooklm-cli
uv pip install -e ".[dev]"
uv run pytest

⚠️ Limitations

  • Rate limits: Free tier has ~50 queries/day
  • No official support: API may change without notice
  • Cookie expiration: Need to re-authenticate every few weeks

🎨 Vibe Coding Alert

Full transparency: this project was built by a non-developer using AI coding assistants. If you're an experienced Python developer, you might look at this codebase and wince. That's okay.

The goal here was to scratch an itch—programmatic access to NotebookLM—and learn along the way. The code works, but it's likely missing patterns, optimizations, or elegance that only years of experience can provide.

This is where you come in. If you see something that makes you cringe, please consider contributing rather than just closing the tab. PRs and issues are welcome.


📄 License

MIT License. See LICENSE for details.

Metadata

Release files for notebooklm-cli 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for notebooklm-cli 0.1.12
File Size Uploaded
notebooklm_cli-0.1.12.tar.gz 306.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for notebooklm-cli 0.1.12
File Interpreter ABI Platform
notebooklm_cli-0.1.12-py3-none-any.whl Python 3 none any Details

Total release size: 379.8 kB

Release files / notebooklm_cli-0.1.12.tar.gz

Download URL notebooklm_cli-0.1.12.tar.gz
Size 306.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3c3457e815165cbcb595228bd019aa3ddcfccba6670f96153fa6b40a98dab208
BLAKE2b-256 checksum
How to use checksums
0d1abcc843758d363c6fa0e731a1f7a97413b8af4e43c34fe8b74ccef7964f5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 18, 2026.

Transparency log

Release files / notebooklm_cli-0.1.12-py3-none-any.whl

Download URL notebooklm_cli-0.1.12-py3-none-any.whl
Size 73.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3a9ae399b3f42f8f93247cbb952a52bf556933d1a8ad9a533797ab79738f07c
BLAKE2b-256 checksum
How to use checksums
3342e3be19bf8d31c4b5dcb335e2a0cd9ffb22ea71d176159967d2e7e4acd506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page