Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/teng-lin/notebooklm-py/llms.txt

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

The notebooklm CLI gives you full programmatic access to NotebookLM from your terminal, including capabilities not available in the web UI such as batch downloads, quiz export, PPTX generation, and source fulltext retrieval. Commands are organized into groups by function, and most accept --json for machine-readable output suitable for scripting and LLM agents.

Command structure

notebooklm [-p PROFILE] [--storage PATH] [--version] [-v] <command> [OPTIONS] [ARGS]
All commands must come after the global flags. You can set an active notebook with notebooklm use <id> so you don’t have to pass -n <id> to every command.

Global options

OptionDescription
-p, --profile NAMEUse a named profile, overrides NOTEBOOKLM_PROFILE
--storage PATHOverride the default storage location
-v, --verboseEnable verbose output
--versionShow version and exit
--helpShow help message

Environment variables

VariableDescription
NOTEBOOKLM_HOMEBase directory for all config files (default: ~/.notebooklm)
NOTEBOOKLM_PROFILEActive profile name (default: default)
NOTEBOOKLM_AUTH_JSONInline authentication JSON — no file needed (for CI/CD)
NOTEBOOKLM_DEBUG_RPCEnable RPC debug logging (1 to enable)

Command groups

The CLI organizes commands into functional groups. Use notebooklm <group> --help to see all subcommands and options.

Session

login, use, status, clear

Auth

auth check, auth check --test

Doctor

doctor, doctor --fix

Profile

profile list/create/switch/delete/rename

Notebooks

list, create, delete, rename, summary

Chat

ask, configure, history

Sources

source add/add-drive/add-research/get/fulltext/guide/rename/refresh/delete/wait

Research

research status/wait

Generate

generate audio/video/cinematic-video/slide-deck/revise-slide/quiz/flashcards/infographic/data-table/mind-map/report

Download

download audio/video/cinematic-video/slide-deck/infographic/report/mind-map/data-table/quiz/flashcards

Artifacts

artifact list/get/rename/delete/export/poll/wait/suggestions

Notes

note list/create/get/save/rename/delete

Sharing

share status/public/view-level/add/update/remove

Language

language list/get/set

Skills

skill install/status/uninstall/show

Agents

agent show

Metadata

metadata

Common flags

Most commands accept these flags in addition to their specific options:
FlagDescription
--jsonOutput as JSON for scripting and agent workflows
-n, --notebook IDSpecify notebook ID (uses active context if omitted)
-s, --source IDSpecify source ID (repeatable on some commands)

Health checks

Before troubleshooting authentication issues, run these two commands:
# Check environment: storage paths, dependencies, auth file
notebooklm doctor

# Auto-fix detected issues (e.g. missing directories)
notebooklm doctor --fix

# Validate auth locally
notebooklm auth check

# Validate auth with a live network request
notebooklm auth check --test
doctor checks your environment health—storage paths, browser dependencies, and configuration. auth check inspects your session cookies and optionally tests a token fetch from NotebookLM.

Tips for LLM agents

When using the CLI programmatically or from an LLM agent:
  1. Use --json on every command for machine-readable output. Most commands output structured JSON when this flag is set.
  2. Partial IDs work: notebooklm use abc matches any notebook ID starting with "abc". The same applies to source and artifact IDs.
  3. Generation is async by default — all generate subcommands except mind-map return immediately with a task_id. Use artifact wait <id> in a background task instead of --wait to avoid blocking for minutes.
  4. Mind map is synchronousgenerate mind-map completes immediately with no --wait option needed.
  5. Isolate agent runs with NOTEBOOKLM_HOME=/tmp/<agent-id> when multiple agents share one machine.
  6. Two ways to specify notebooks: set context with notebooklm use <id>, or pass -n <id> explicitly to each command.
For the full generate command reference, see Generate. For downloading artifacts, see Download.

Build docs developers (and LLMs) love