Add a whole folder of PDFs to a Google NotebookLM notebook in one command — instead of uploading them one at a time.
Point it at a folder, give the notebook a name, and it adds every PDF for you. It's resumable (re-run to continue after an interruption — no duplicates) and works for anything from a handful of files up to your plan's source limit.
./trips2nlm.sh --folder "/path/to/pdfs" --create "My Notebook"📖 Non-technical? Read USER_GUIDE.md — a step-by-step walkthrough that assumes no command-line experience.
- Folder mode — upload every
.pdfin a folder (the easy path). - Drive mode — link files straight from Google Drive by ID, no upload (advanced).
- Resumable & idempotent — remembers what it added; re-running skips done files and retries only failures. Safe to run twice; safe to top-up later.
- Create or append — make a new notebook (
--create) or add to an existing one (--notebook). - One-command setup —
setup.shinstalls every prerequisite and signs you in. - Dry-run — preview exactly what will happen with
--dry-run.
- macOS (uses the
nlmNotebookLM CLI; the setup script targets Homebrew). - A Google account with NotebookLM. Note the per-notebook source cap: 50 on the free plan, 300 on Plus/Pro.
Everything else — Homebrew, jq, the nlm CLI, and Google Chrome — is installed
for you by setup.sh.
git clone https://github.com/holzerjm/Bulk2NotebookLM.git
cd Bulk2NotebookLM
./setup.sh # installs prerequisites, then signs you in to NotebookLMVerify your environment without installing anything:
./setup.sh --checkUpload a folder of PDFs into a new notebook:
./trips2nlm.sh --folder "/path/to/pdfs" --create "My Notebook"Add a folder to an existing notebook:
./trips2nlm.sh --folder "/path/to/pdfs" --notebook <NOTEBOOK_ID>Preview without changing anything:
./trips2nlm.sh --folder "/path/to/pdfs" --create "My Notebook" --dry-runAdvanced — link from Google Drive instead of uploading (via a tab-separated
DriveFileId⇥Title manifest):
./trips2nlm.sh --manifest list.tsv --create "My Notebook" --type pdfRun ./trips2nlm.sh --help for the full option list.
| Option | Description |
|---|---|
--folder PATH |
Folder of .pdf files to upload (pick this or --manifest). |
--manifest FILE |
Tab-separated DriveId⇥Title list to link from Drive. |
--create "Title" |
Create a new notebook (pick this or --notebook). |
--notebook ID |
Add to an existing notebook. |
--type TYPE |
Drive doc type for --manifest: pdf/doc/slides/sheets (default pdf). |
--sleep SECONDS |
Pause between files (default 0.8). |
--wait |
Wait for each file to finish processing. |
--profile NAME |
nlm sign-in profile. |
--state-dir DIR |
Where resume state is stored (default .trips2nlm-state/). |
--dry-run |
Show what would happen; change nothing. |
The tool drives the nlm CLI,
calling nlm source add once per file (--file for uploads, --drive for Drive
links). Progress is recorded in .trips2nlm-state/<notebook>.done, so a re-run
skips anything already added and writes failures to <notebook>.failed for retry.
- "You're not signed in to NotebookLM." —
nlmsign-in tokens are short-lived. Runnlm loginand try again. Your existing notebooks are unaffected. - "command not found" right after setup — open a new Terminal window and
cdback to the folder (newly installed tools need a fresh shell). - Stops at 50 sources — that's the free-plan cap; upgrade or split across notebooks.
See USER_GUIDE.md for the friendly, detailed version.
MIT © 2026 Jan Mark Holzer
