Skip to content

NetDevAutomate/notebooklm-repo-artefacts

Repository files navigation

notebooklm-repo-artefacts

Generate NotebookLM artefacts — audio walkthroughs, video explainers, slide decks, and infographics — from any git repository.

How It Works

repo → collect files → render to PDF (with Mermaid) → upload to NotebookLM → generate artefacts → publish
  1. Collect — Scans a git repo and assembles key files (README, docs, config, source code) into a single markdown document
  2. Render — Converts the markdown to a fully rendered PDF using Chromium via Playwright, including Mermaid diagrams and tables
  3. Upload — Sends the PDF to Google NotebookLM as a notebook source
  4. Generate — Creates audio, video, slide deck, and/or infographic artefacts via NotebookLM
  5. Download — Fetches the generated artefacts locally
  6. Publish — Pushes artefacts to a centralised store (or commits to the source repo) and updates README with links

Installation

Requires Python 3.11+.

# From PyPI (when published)
uv tool install notebooklm-repo-artefacts

# From GitHub
uv tool install git+https://github.com/NetDevAutomate/notebooklm-repo-artefacts.git

# From local checkout
uv tool install .

Prerequisites

Install Chromium for PDF rendering (used by Playwright):

playwright install chromium

For NotebookLM features (process, list, generate, download, delete), authenticate first:

uv pip install notebooklm-py[browser]
notebooklm login

This opens a browser for Google cookie-based auth. Credentials are stored locally.

Usage

pipeline — Full end-to-end (recommended)

One command to go from repo to hosted artefacts:

# Full pipeline: collect → upload → generate → download → publish → verify → cleanup
repo-artefacts pipeline /path/to/repo

# Publish to a centralised artefact store (no binary files in source repo)
repo-artefacts pipeline /path/to/repo --store NetDevAutomate/artefact-store

# Use an existing notebook (skips upload)
repo-artefacts pipeline /path/to/repo -n NOTEBOOK_ID

# Only generate audio and video (skip slides/infographic)
repo-artefacts pipeline /path/to/repo --audio --video

# Generate everything except infographic (preserve quota)
repo-artefacts pipeline /path/to/repo --exclude infographic

# Resume: only generate artefacts not yet completed in the notebook
repo-artefacts pipeline /path/to/repo -n NOTEBOOK_ID --resume

# Keep the notebook after publishing
repo-artefacts pipeline /path/to/repo --keep-notebook

See Architecture for the full system design, or Code Map for module-level detail.

process — Collect repo content and upload to NotebookLM

repo-artefacts process /path/to/repo
repo-artefacts process /path/to/repo -o ./output
repo-artefacts process -n NOTEBOOK_ID  # upload to existing notebook

generate — Create artefacts from a notebook

repo-artefacts generate -n NOTEBOOK_ID
repo-artefacts generate -n NOTEBOOK_ID --audio --slides
repo-artefacts generate -n NOTEBOOK_ID --timeout 1200

Available flags: --audio, --video, --slides, --infographic, --all

download — Fetch generated artefacts

repo-artefacts download -n NOTEBOOK_ID -o ./docs/artefacts

list — View notebooks and sources

repo-artefacts list                    # all notebooks
repo-artefacts list -n NOTEBOOK_ID     # sources in a notebook

delete — Remove a notebook

repo-artefacts delete -n NOTEBOOK_ID

publish — Generate, publish, and verify

repo-artefacts publish /path/to/repo -n NOTEBOOK_ID
repo-artefacts publish /path/to/repo --skip-generate  # use existing artefacts

pages — Set up GitHub Pages player

repo-artefacts pages /path/to/repo
repo-artefacts pages /path/to/repo --org MyOrg --repo my-repo

Using NOTEBOOK_ID environment variable

All commands that accept -n NOTEBOOK_ID also read from the NOTEBOOK_ID environment variable:

export NOTEBOOK_ID=ba6fa92e-f174-4a77-8fc6-fc4fc12a625d
repo-artefacts generate
repo-artefacts download -o ./docs/artefacts

Options Reference

Option Commands Description Default
repo_path process, pipeline, publish, pages Path to git repository (positional) .
-o, --output-dir process, download Output directory ./docs/artefacts
-n, --notebook-id process, generate, download, list, delete, publish, pipeline NotebookLM notebook ID (or NOTEBOOK_ID env var)
--audio generate, pipeline Generate audio overview
--video generate, pipeline Generate video explainer
--slides generate, pipeline Generate slide deck
--infographic generate, pipeline Generate infographic
--all generate Generate all artefact types (default if none specified)
-t, --timeout generate, publish, pipeline Timeout in seconds per artefact 900
--exclude pipeline Artefact types to skip (repeatable)
--resume pipeline Only generate artefacts not yet completed (note: default mode already skips completed artefacts) false
--keep-notebook pipeline Don't delete the notebook after publishing false
-s, --store pipeline, publish Publish to external artefact store (org/repo) config default
-r, --remote publish, pipeline Git remote to push to origin
--skip-generate publish Skip artefact generation (use existing files) false
--skip-verify publish Skip page verification false
--verify-timeout publish Max seconds to wait for Pages deployment 120

Artefact Store

By default, artefacts are committed to the source repo in docs/artefacts/. For large repos or organisations with many projects, use --store to publish artefacts to a centralised store instead — keeping source repos lean.

# Set a default store (one-time setup)
mkdir -p ~/.config/repo-artefacts
echo 'default_store = "YourOrg/artefact-store"' > ~/.config/repo-artefacts/config.toml

# Pipeline now publishes to the store automatically
repo-artefacts pipeline /path/to/repo

With --store, the source repo gets README links only — zero binary files committed. Artefacts are served via GitHub Pages from the store repo.

What Gets Collected

The collector scans the repo and includes files in this priority order:

  1. READMEREADME.md, README.rst, or README.txt
  2. Docs — All .md, .rst, .txt files under docs/
  3. Project configpyproject.toml, package.json, Cargo.toml, go.mod, Makefile, etc.
  4. Source code — Files under src/ (or repo root) with common extensions, limited to files under 500 lines

Total output is capped at 500KB. README and docs are always included in full; source files are truncated first if the limit is hit.

Supported source extensions: .py, .ts, .js, .rs, .java, .go, .rb, .kt, .swift, .c, .cpp, .h, .hpp, .cs, .scala, .ex, .exs, .clj, .zig, .lua, .sh, .bash

Skipped directories: .git, node_modules, __pycache__, .venv, venv, dist, build, .tox, .eggs, target, .next, .nuxt, vendor

Generated Artefacts

🔍 Explore this project — AI-generated overviews via Google NotebookLM

🎧 Listen to the Audio Overview Two AI hosts discuss the project — great for commutes
🎬 Watch the Video Overview Visual walkthrough of architecture and concepts
🖼️ View the Infographic Architecture and flow at a glance
📊 Browse the Slide Deck Presentation-ready project overview

Generated by notebooklm-repo-artefacts

Acknowledgements

Special thanks to Teng Lin for creating the excellent notebooklm-py library, which powers all NotebookLM integration in this tool. His work in reverse-engineering and wrapping the NotebookLM API made this project possible.

License

MIT — see LICENSE for details.

About

Generate NotebookLM artefacts and GitHub Pages player for any repo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors