Metadata-Version: 2.4
Name: notebooklm-skill
Version: 1.2.0
Summary: NotebookLM research automation — CLI, MCP server, and Claude Code Skill
Author-email: Claude World <hello@claude-world.com>
License: MIT License
        
        Copyright (c) 2026 Claude World
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/claude-world/notebooklm-skill
Project-URL: Repository, https://github.com/claude-world/notebooklm-skill
Project-URL: Issues, https://github.com/claude-world/notebooklm-skill/issues
Keywords: notebooklm,mcp,claude,research,ai
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: notebooklm-py>=0.3.4
Requires-Dist: playwright>=1.40.0
Requires-Dist: fastmcp>=0.1.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: feedparser>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=1.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Dynamic: license-file

# notebooklm-skill

> NotebookLM does the research, Claude writes the content.

The only tool that connects trending topic discovery → NotebookLM deep research → AI content creation → multi-platform publishing. Works as a Claude Code Skill or standalone MCP Server.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

**[繁體中文版 README](README.zh-TW.md)**

---

## Demo

| Language | YouTube | Slides |
|----------|---------|--------|
| English | [Watch](https://youtu.be/q1kj_OccaVE) | 6 pages, auto-generated |
| 繁體中文 | [Watch](https://youtu.be/6M3K4sxahdE) | 5 pages, auto-generated |

All slides, podcasts, and videos were generated by NotebookLM using this tool.

---

## What is this?

**notebooklm-skill** bridges NotebookLM's research capabilities with Claude's content generation. Feed it URLs, PDFs, or trending topics — it creates a NotebookLM notebook, runs deep research queries, and hands structured findings to Claude for polished output: articles, social posts, newsletters, podcasts, or any format you need.

Built on [notebooklm-py](https://pypi.org/project/notebooklm-py/) v0.3.4 — pure async Python, no OAuth setup needed.

```
Sources (URLs, PDFs)          NotebookLM                Claude               Artifacts & Platforms
+-----------------+    +------------------+    +-----------------+    +----------------------+
| Web articles    |--->| Create notebook  |--->| Draft article   |--->| Blog / CMS           |
| Research papers |    | Add sources      |    | Social posts    |    | Threads / X          |
| YouTube videos  |    | Ask questions    |    | Newsletter      |    | Newsletter           |
| Trending topics |    | Extract insights |    | Any format      |    | Any platform         |
+-----------------+    +------------------+    +-----------------+    +----------------------+
     Phase 1                Phase 2                Phase 3                  Phase 4
                                |
                                v
                       +------------------+
                       | Generate artifacts|
                       | Audio (podcast)   |
                       | Video             |
                       | Slides            |
                       | Report            |
                       | Quiz              |
                       | Flashcards        |
                       | Mind map          |
                       | Infographic       |
                       | Data table        |
                       | Study guide       |
                       +------------------+
                            Phase 2b
```

## Quick Start

```bash
# Option A: uvx (recommended — zero install)
uvx notebooklm-skill --help
uvx --from notebooklm-skill notebooklm-mcp   # Start MCP server

# Option B: pip install from PyPI
pip install notebooklm-skill

# Option C: Install from source
git clone https://github.com/claude-world/notebooklm-skill.git
cd notebooklm-skill && pip install .

# Option D: One-line install (pip + Playwright + Claude Code Skill)
git clone https://github.com/claude-world/notebooklm-skill.git
cd notebooklm-skill && ./install.sh

# Authenticate with Google (one-time, opens browser)
python3 -m notebooklm login

# Use global commands
notebooklm-skill create --title "My Research" --sources https://example.com/article
notebooklm-skill ask --notebook "My Research" --query "What are the key findings?"
notebooklm-skill podcast --notebook "My Research" --lang en --output podcast.m4a
notebooklm-pipeline research-to-article --sources https://example.com --title "Topic"
notebooklm-mcp                   # Start MCP server (stdio mode)
```

Or use scripts directly: `python scripts/notebooklm_client.py create ...`

See [docs/SETUP.md](docs/SETUP.md) for the full setup guide.

## Authentication

notebooklm-py uses browser-based Google login (no OAuth Client ID needed):

| Step | Command | What happens |
|------|---------|-------------|
| **Login** | `python3 -m notebooklm login` | Opens Chromium, user logs into Google |
| **Session storage** | Automatic | Saved to `~/.notebooklm/storage_state.json` |
| **Subsequent use** | `NotebookLMClient.from_storage()` | Reads saved session, pure HTTP calls |
| **Verify** | `python scripts/auth_helper.py verify` | Loads client + calls `notebooks.list()` |
| **Clear** | `python scripts/auth_helper.py clear` | Removes `~/.notebooklm/` directory |

Session typically lasts weeks. Re-run `login` if you get authentication errors.

## Two Ways to Use

| | **Claude Code Skill** | **MCP Server** |
|---|---|---|
| **Best for** | Claude Code users who want NotebookLM in their workflow | Any MCP-compatible client (Cursor, Gemini CLI, etc.) |
| **Setup** | Copy skill to `.claude/skills/` | Add server to MCP config |
| **Invocation** | Claude auto-detects when relevant | Tools appear in client tool list |
| **Config** | `SKILL.md` + `.env` | `.mcp.json` + `.env` |
| **Requirements** | Python 3.10+, notebooklm-py | Python 3.10+, notebooklm-py |

## Features

| Feature | Description | Status |
|---|---|---|
| **Notebook CRUD** | Create, list, delete notebooks | Available |
| **Source ingestion** | Add URLs, PDFs, YouTube links, plain text | Available |
| **Research queries** | Ask questions against notebook sources with citations | Available |
| **Structured extraction** | Get key facts, arguments, timelines | Available |
| **Content generation** | Use research output as context for Claude | Available |
| **Batch operations** | Process multiple sources or queries at once | Available |
| **trend-pulse integration** | Auto-discover trending topics to research | Available |
| **threads-viral-agent integration** | Publish research-backed social posts | Available |

### Artifact Generation (10 types)

| Artifact | Format | Description |
|---|---|---|
| **Audio** | M4A | AI-generated podcast discussion |
| **Video** | MP4 | Video summary with visuals |
| **Slides** | PDF / PPTX | Presentation deck |
| **Report** | Markdown | Comprehensive written report |
| **Quiz** | JSON / Markdown / HTML | Multiple-choice assessment questions |
| **Flashcards** | JSON / Markdown / HTML | Study flashcard deck |
| **Mind map** | JSON | Visual concept map |
| **Infographic** | PNG | Visual data summary |
| **Data table** | CSV | Structured data extraction |
| **Study guide** | Markdown | Structured learning material |

Most artifacts support language selection (e.g., `--lang zh-TW`). Exceptions: quiz, flashcards, mind-map.

> **Note**: NotebookLM returns audio in MPEG-4 (M4A) format, not MP3.

## Architecture

```
+---------------------------------------------------------------+
|                      notebooklm-skill                          |
|                                                                |
|  +---------+  +--------------+  +----------+  +------------+  |
|  | Phase 1 |  |   Phase 2    |  |  Phase 3 |  |  Phase 4   |  |
|  | Collect  |->|  Research    |->| Generate  |->|  Publish   |  |
|  +---------+  +--------------+  +----------+  +------------+  |
|      |              |                |               |         |
|  +--------+  +-------------+  +-----------+  +-----------+    |
|  | URLs   |  | NotebookLM  |  |  Claude    |  | Threads   |    |
|  | PDFs   |  | (via        |  |  Content   |  | Blog      |    |
|  | RSS    |  |  notebooklm |  |  Engine    |  | Email     |    |
|  | Trends |  |  -py 0.3.4) |  |            |  | CMS       |    |
|  +--------+  | - notebooks |  +-----------+  +-----------+    |
|              | - sources   |        |                          |
|              | - chat/ask  |  +-----------+                    |
|              | - artifacts |  | Artifacts |                    |
|              +-------------+  | audio     |                    |
|                               | video     |                    |
|                               | slides    |                    |
|                               | report    |                    |
|                               | quiz      |                    |
|                               | flashcards|                    |
|                               | mind-map  |                    |
|                               | infographic|                   |
|                               | data-table|                    |
|                               | study-guide|                   |
|                               +-----------+                    |
|                                                                |
|  +-----------------------------------------------------------+ |
|  |  Interfaces                                                | |
|  |  +-- scripts/          CLI tools (notebooklm-py direct)   | |
|  |  +-- mcp_server/       MCP protocol server                 | |
|  |  +-- SKILL.md          Claude Code skill definition        | |
|  +-----------------------------------------------------------+ |
+---------------------------------------------------------------+
         ^                                          ^
         |                                          |
   +-----------+                             +-----------+
   |trend-pulse|                             |threads-   |
   |(optional) |                             |viral-agent|
   +-----------+                             |(optional) |
                                             +-----------+
```

## Usage Examples

### 1. Research to Article

```bash
python scripts/pipeline.py research-to-article \
  --sources "https://arxiv.org/abs/2401.00001" \
            "https://blog.example.com/ai-agents" \
  --title "AI Agent Survey"
```

### 2. Research to Social Posts

```bash
python scripts/pipeline.py research-to-social \
  --sources "https://example.com/ai-news" \
  --platform threads \
  --title "AI News This Week"
```

### 3. Trending Topics to Content

```bash
python scripts/pipeline.py trend-to-content \
  --geo TW \
  --count 5 \
  --platform threads
```

### 4. RSS Batch Digest

```bash
python scripts/pipeline.py batch-digest \
  --rss "https://example.com/feed.xml" \
  --title "Weekly AI Digest"
```

### 5. Generate All Artifacts

```bash
python scripts/pipeline.py generate-all \
  --sources "https://example.com/article" \
  --title "Research" \
  --output-dir ./output \
  --language zh-TW
```

### 6. Slides + Podcast → YouTube Video

Combine NotebookLM-generated slides and podcast into a YouTube-ready video:

```bash
# Generate slides and podcast
python scripts/notebooklm_client.py generate --notebook "Research" --type slides
python scripts/notebooklm_client.py podcast --notebook "Research" --lang en --output podcast.m4a
python scripts/notebooklm_client.py download --notebook "Research" --type slides --output slides.pdf

# Convert PDF to PNG + compose video
./scripts/make_video.sh slides.pdf podcast.m4a output.mp4
```

## Pipeline Workflows

| Workflow | Input | Output | Steps |
|---|---|---|---|
| `research-to-article` | URLs, text | Article draft JSON | Create notebook → 5 research questions → article draft |
| `research-to-social` | URLs, text | Social post draft | Create notebook → summarize → platform-specific post |
| `trend-to-content` | Geo, count | Content per trend | Fetch trends → create notebooks → research → draft |
| `batch-digest` | RSS URL | Newsletter digest | Fetch RSS → create notebook → digest + Q&A |
| `generate-all` | URLs, text | Audio, video, PDF, etc. | Create notebook → generate all artifacts → download |

## MCP Server Setup

Add to your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "notebooklm": {
      "command": "uvx",
      "args": ["--from", "notebooklm-skill", "notebooklm-mcp"]
    }
  }
}
```

Or if you installed via `pip install notebooklm-skill`:

```json
{
  "mcpServers": {
    "notebooklm": {
      "command": "notebooklm-mcp"
    }
  }
}
```

Works with Claude Code, Cursor, Gemini CLI, and any MCP-compatible client.

## Claude Code Skill Setup

```bash
# Option A: Symlink (auto-updates with git pull)
./install.sh

# Option B: Manual copy
mkdir -p .claude/skills/notebooklm
cp /path/to/notebooklm-skill/SKILL.md .claude/skills/notebooklm/
cp /path/to/notebooklm-skill/scripts/*.py .claude/skills/notebooklm/scripts/
cp /path/to/notebooklm-skill/requirements.txt .claude/skills/notebooklm/

# Authenticate (one-time)
python3 -m notebooklm login
```

Claude will automatically detect the skill when you ask about research, NotebookLM, or content creation.

## API Reference

### CLI Commands (11)

| Command | Description |
|---|---|
| `create` | Create a notebook with URL/text sources |
| `list` | List all notebooks |
| `delete` | Delete a notebook |
| `add-source` | Add a source (URL, text, or file) to existing notebook |
| `ask` | Ask a research question (returns answer + citations) |
| `summarize` | Get notebook summary |
| `generate` | Generate an artifact (audio, video, slides, etc.) |
| `download` | Download a generated artifact |
| `research` | Run deep web research |
| `podcast` | Shortcut for `generate --type audio` (auto-downloads) |
| `qa` | Shortcut for `generate --type quiz` |

### MCP Tools (13)

| Tool | Description |
|---|---|
| `nlm_create_notebook` | Create notebook with sources |
| `nlm_list` | List all notebooks |
| `nlm_delete` | Delete a notebook |
| `nlm_add_source` | Add source to existing notebook |
| `nlm_ask` | Ask question (returns answer + citations) |
| `nlm_summarize` | Get notebook summary |
| `nlm_generate` | Generate artifact (10 types) |
| `nlm_download` | Download generated artifact |
| `nlm_list_sources` | List sources in notebook |
| `nlm_list_artifacts` | List generated artifacts |
| `nlm_research` | Deep web research |
| `nlm_research_pipeline` | Full research pipeline |
| `nlm_trend_research` | Trend → research pipeline |

## Integrations

- **[trend-pulse](https://github.com/claude-world/trend-pulse)** — Real-time trending topic discovery from 7 sources
- **[threads-viral-agent](https://github.com/claude-world/claude-world.com)** — Auto-publish research-backed social posts

## Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes
4. Push and open a Pull Request

```bash
# Development setup
git clone https://github.com/claude-world/notebooklm-skill.git
cd notebooklm-skill
pip install -e .
python3 -m notebooklm login
python -m pytest tests/
```

## License

MIT License. See [LICENSE](LICENSE).
