Overview of the notebooklm CLI command groups, global options, environment variables, and common usage patterns for interactive and automated workflows.
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.
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.
Before troubleshooting authentication issues, run these two commands:
# Check environment: storage paths, dependencies, auth filenotebooklm doctor# Auto-fix detected issues (e.g. missing directories)notebooklm doctor --fix# Validate auth locallynotebooklm auth check# Validate auth with a live network requestnotebooklm 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.
When using the CLI programmatically or from an LLM agent:
Use --json on every command for machine-readable output. Most commands output structured JSON when this flag is set.
Partial IDs work: notebooklm use abc matches any notebook ID starting with "abc". The same applies to source and artifact IDs.
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.
Mind map is synchronous — generate mind-map completes immediately with no --wait option needed.
Isolate agent runs with NOTEBOOKLM_HOME=/tmp/<agent-id> when multiple agents share one machine.
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.