@biggora/claude-plugins 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +13 -0
- package/CLAUDE.md +55 -0
- package/LICENSE +1 -1
- package/README.md +208 -39
- package/bin/cli.js +39 -0
- package/package.json +30 -17
- package/registry/registry.json +166 -1
- package/registry/schema.json +10 -0
- package/src/commands/skills/add.js +194 -0
- package/src/commands/skills/list.js +52 -0
- package/src/commands/skills/remove.js +27 -0
- package/src/commands/skills/update.js +74 -0
- package/src/config.js +5 -0
- package/src/skills/codex-cli/SKILL.md +265 -0
- package/src/skills/commafeed-api/SKILL.md +1012 -0
- package/src/skills/gemini-cli/SKILL.md +379 -0
- package/src/skills/gemini-cli/references/commands.md +145 -0
- package/src/skills/gemini-cli/references/configuration.md +182 -0
- package/src/skills/gemini-cli/references/headless-and-scripting.md +181 -0
- package/src/skills/gemini-cli/references/mcp-and-extensions.md +254 -0
- package/src/skills/n8n-api/SKILL.md +623 -0
- package/src/skills/notebook-lm/SKILL.md +217 -0
- package/src/skills/notebook-lm/references/artifact-options.md +168 -0
- package/src/skills/notebook-lm/references/auth.md +58 -0
- package/src/skills/notebook-lm/references/workflows.md +144 -0
- package/src/skills/screen-recording/SKILL.md +309 -0
- package/src/skills/screen-recording/references/approach1-programmatic.md +311 -0
- package/src/skills/screen-recording/references/approach2-xvfb.md +232 -0
- package/src/skills/screen-recording/references/design-patterns.md +168 -0
- package/src/skills/test-mobile-app/SKILL.md +212 -0
- package/src/skills/test-mobile-app/references/report-template.md +95 -0
- package/src/skills/test-mobile-app/references/setup-appium.md +154 -0
- package/src/skills/test-mobile-app/scripts/analyze_apk.py +164 -0
- package/src/skills/test-mobile-app/scripts/check_environment.py +116 -0
- package/src/skills/test-mobile-app/scripts/generate_report.py +250 -0
- package/src/skills/test-mobile-app/scripts/run_tests.py +326 -0
- package/src/skills/test-web-ui/SKILL.md +232 -0
- package/src/skills/test-web-ui/references/test_case_schema.md +102 -0
- package/src/skills/test-web-ui/scripts/discover.py +176 -0
- package/src/skills/test-web-ui/scripts/generate_report.py +237 -0
- package/src/skills/test-web-ui/scripts/run_tests.py +296 -0
- package/src/skills/text-to-speech/SKILL.md +236 -0
- package/src/skills/text-to-speech/references/espeak-cli.md +277 -0
- package/src/skills/text-to-speech/references/kokoro-onnx.md +124 -0
- package/src/skills/text-to-speech/references/online-engines.md +128 -0
- package/src/skills/text-to-speech/references/pyttsx3-espeak.md +143 -0
- package/src/skills/tm-search/SKILL.md +240 -0
- package/src/skills/tm-search/references/field-guide.md +79 -0
- package/src/skills/tm-search/references/scraping-fallback.md +140 -0
- package/src/skills/tm-search/scripts/tm_search.py +375 -0
- package/src/skills/wp-rest-api/SKILL.md +114 -0
- package/src/skills/wp-rest-api/references/authentication.md +18 -0
- package/src/skills/wp-rest-api/references/custom-content-types.md +20 -0
- package/src/skills/wp-rest-api/references/discovery-and-params.md +20 -0
- package/src/skills/wp-rest-api/references/responses-and-fields.md +30 -0
- package/src/skills/wp-rest-api/references/routes-and-endpoints.md +36 -0
- package/src/skills/wp-rest-api/references/schema.md +22 -0
- package/src/skills/youtube-search/SKILL.md +412 -0
- package/src/skills/youtube-search/references/parsing-examples.md +159 -0
- package/src/skills/youtube-search/references/youtube-api-quota.md +85 -0
- package/src/skills/youtube-thumbnail/SKILL.md +1060 -0
- package/tests/commands/info.test.js +49 -0
- package/tests/commands/install.test.js +36 -0
- package/tests/commands/list.test.js +66 -0
- package/tests/commands/publish.test.js +182 -0
- package/tests/commands/search.test.js +45 -0
- package/tests/commands/uninstall.test.js +29 -0
- package/tests/commands/update.test.js +59 -0
- package/tests/functional/skills-lifecycle.test.js +293 -0
- package/tests/helpers/fixtures.js +63 -0
- package/tests/integration/cli.test.js +83 -0
- package/tests/skills/add.test.js +138 -0
- package/tests/skills/list.test.js +63 -0
- package/tests/skills/remove.test.js +38 -0
- package/tests/skills/update.test.js +60 -0
- package/tests/unit/config.test.js +31 -0
- package/tests/unit/registry.test.js +79 -0
- package/tests/unit/utils.test.js +150 -0
- package/tests/validation/registry-schema.test.js +112 -0
- package/tests/validation/skills-validation.test.js +96 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notebooklm
|
|
3
|
+
description: |
|
|
4
|
+
Automate Google NotebookLM via the notebooklm-py Python library. Use this skill whenever the user wants to:
|
|
5
|
+
- Create, manage, or delete NotebookLM notebooks
|
|
6
|
+
- Add sources (URLs, YouTube, PDFs, files, text, Google Drive) to a notebook
|
|
7
|
+
- Ask questions / chat with notebook content
|
|
8
|
+
- Generate content: Audio Overview (podcast), Video Overview, Quiz, Flashcards, Slide Deck, Infographic, Report, Data Table, Mind Map
|
|
9
|
+
- Download generated artifacts (MP3, MP4, PDF, PNG, CSV, JSON, Markdown)
|
|
10
|
+
- Run web/Drive research and auto-import results
|
|
11
|
+
- Manage sharing, notes, and source full-text extraction
|
|
12
|
+
- Automate any NotebookLM workflow programmatically
|
|
13
|
+
|
|
14
|
+
Trigger this skill for ANY request involving NotebookLM, notebooklm-py, Google NotebookLM automation, podcast/audio overview generation from notes, or bulk research pipelines.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# NotebookLM Skill
|
|
18
|
+
|
|
19
|
+
Provides full programmatic access to Google NotebookLM via the unofficial `notebooklm-py` library. Supports Python API and CLI — use the Python API for complex or multi-step workflows, CLI for quick one-off tasks.
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install "notebooklm-py[browser]"
|
|
25
|
+
playwright install chromium
|
|
26
|
+
|
|
27
|
+
# First-time auth (opens browser)
|
|
28
|
+
notebooklm login
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Auth via env variable (CI/CD, no browser):**
|
|
32
|
+
```bash
|
|
33
|
+
export NOTEBOOKLM_AUTH_JSON='{"cookies": [...]}'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Read `references/auth.md` for detailed authentication setup.
|
|
37
|
+
|
|
38
|
+
## Quick Start Pattern
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
import asyncio
|
|
42
|
+
from notebooklm import NotebookLMClient
|
|
43
|
+
|
|
44
|
+
async def main():
|
|
45
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
46
|
+
nb = await client.notebooks.create("My Research")
|
|
47
|
+
await client.sources.add_url(nb.id, "https://example.com/article", wait=True)
|
|
48
|
+
result = await client.chat.ask(nb.id, "Summarize the main points")
|
|
49
|
+
print(result.answer)
|
|
50
|
+
|
|
51
|
+
asyncio.run(main())
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## API Reference Summary
|
|
55
|
+
|
|
56
|
+
### Client Structure
|
|
57
|
+
```
|
|
58
|
+
NotebookLMClient
|
|
59
|
+
├── .notebooks → NotebooksAPI
|
|
60
|
+
├── .sources → SourcesAPI
|
|
61
|
+
├── .artifacts → ArtifactsAPI
|
|
62
|
+
├── .chat → ChatAPI
|
|
63
|
+
├── .research → ResearchAPI
|
|
64
|
+
├── .notes → NotesAPI
|
|
65
|
+
└── .sharing → SharingAPI
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Notebooks (`client.notebooks`)
|
|
69
|
+
| Method | Description |
|
|
70
|
+
|--------|-------------|
|
|
71
|
+
| `list()` | List all notebooks |
|
|
72
|
+
| `create(title)` | Create new notebook → `Notebook` |
|
|
73
|
+
| `get(notebook_id)` | Get notebook details |
|
|
74
|
+
| `delete(notebook_id)` | Delete notebook |
|
|
75
|
+
| `rename(notebook_id, new_title)` | Rename notebook |
|
|
76
|
+
| `get_description(notebook_id)` | Get AI summary + suggested topics |
|
|
77
|
+
|
|
78
|
+
### Sources (`client.sources`)
|
|
79
|
+
| Method | Description |
|
|
80
|
+
|--------|-------------|
|
|
81
|
+
| `add_url(nb_id, url, wait=True)` | Add URL/YouTube source |
|
|
82
|
+
| `add_file(nb_id, path, wait=True)` | Add local file (PDF, txt, md, docx, etc.) |
|
|
83
|
+
| `add_text(nb_id, text, title, wait=True)` | Add pasted text |
|
|
84
|
+
| `add_drive(nb_id, drive_id, title)` | Add Google Drive document |
|
|
85
|
+
| `list(nb_id)` | List all sources |
|
|
86
|
+
| `get(nb_id, source_id)` | Get source details |
|
|
87
|
+
| `fulltext(nb_id, source_id)` | Get indexed text content |
|
|
88
|
+
| `refresh(nb_id, source_id)` | Refresh URL source |
|
|
89
|
+
| `delete(nb_id, source_id)` | Delete source |
|
|
90
|
+
|
|
91
|
+
### Chat (`client.chat`)
|
|
92
|
+
| Method | Description |
|
|
93
|
+
|--------|-------------|
|
|
94
|
+
| `ask(nb_id, question, source_ids=None)` | Ask a question → `ChatResult` |
|
|
95
|
+
| `history(nb_id)` | Get conversation history |
|
|
96
|
+
| `configure(nb_id, mode=None, persona=None)` | Set chat mode/persona |
|
|
97
|
+
|
|
98
|
+
### Artifacts — Generate (`client.artifacts`)
|
|
99
|
+
|
|
100
|
+
All generate methods return a `GenerationStatus` with `task_id`. Use `wait_for_completion()` to poll until done.
|
|
101
|
+
|
|
102
|
+
| Method | Key Options | Download Method |
|
|
103
|
+
|--------|-------------|-----------------|
|
|
104
|
+
| `generate_audio(nb_id, instructions, format, length, language)` | format: `deep-dive/brief/critique/debate`, length: `short/default/long` | `download_audio(nb_id, path)` |
|
|
105
|
+
| `generate_video(nb_id, instructions, format, style)` | style: `classic/whiteboard/kawaii/anime/watercolor/...` | `download_video(nb_id, path)` |
|
|
106
|
+
| `generate_quiz(nb_id, difficulty, quantity)` | difficulty: `easy/medium/hard` | `download_quiz(nb_id, path, output_format)` |
|
|
107
|
+
| `generate_flashcards(nb_id, difficulty, quantity)` | — | `download_flashcards(nb_id, path, output_format)` |
|
|
108
|
+
| `generate_slide_deck(nb_id, instructions, format)` | format: `detailed/presenter` | `download_slide_deck(nb_id, path)` — PDF or PPTX |
|
|
109
|
+
| `generate_infographic(nb_id, orientation, detail)` | orientation: `landscape/portrait/square` | `download_infographic(nb_id, path)` |
|
|
110
|
+
| `generate_report(nb_id, format, instructions)` | format: `briefing-doc/study-guide/blog-post/custom` | `download_report(nb_id, path)` |
|
|
111
|
+
| `generate_data_table(nb_id, instructions)` | — | `download_data_table(nb_id, path)` |
|
|
112
|
+
| `generate_mind_map(nb_id)` | Sync, no wait needed | `download_mind_map(nb_id, path)` |
|
|
113
|
+
|
|
114
|
+
**Wait pattern:**
|
|
115
|
+
```python
|
|
116
|
+
status = await client.artifacts.generate_audio(nb_id, instructions="Focus on key facts")
|
|
117
|
+
final = await client.artifacts.wait_for_completion(nb_id, status.task_id, timeout=300)
|
|
118
|
+
if final.is_complete:
|
|
119
|
+
await client.artifacts.download_audio(nb_id, "./podcast.mp3")
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Research (`client.research`)
|
|
123
|
+
```python
|
|
124
|
+
# Start web research
|
|
125
|
+
research = await client.research.start(nb_id, "quantum computing trends", source="web", mode="deep")
|
|
126
|
+
# Poll until complete
|
|
127
|
+
status = await client.research.poll(nb_id)
|
|
128
|
+
# Import discovered sources
|
|
129
|
+
await client.research.import_sources(nb_id, task_id, sources[:10])
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## CLI Quick Reference
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Session
|
|
136
|
+
notebooklm login
|
|
137
|
+
notebooklm use <notebook_id>
|
|
138
|
+
notebooklm status
|
|
139
|
+
|
|
140
|
+
# Notebooks
|
|
141
|
+
notebooklm list
|
|
142
|
+
notebooklm create "My Notebook"
|
|
143
|
+
notebooklm delete <id>
|
|
144
|
+
notebooklm rename "New Title"
|
|
145
|
+
|
|
146
|
+
# Sources
|
|
147
|
+
notebooklm source add "https://example.com"
|
|
148
|
+
notebooklm source add ./paper.pdf
|
|
149
|
+
notebooklm source add-research "AI trends 2025" --mode deep --import-all
|
|
150
|
+
notebooklm source list
|
|
151
|
+
|
|
152
|
+
# Chat
|
|
153
|
+
notebooklm ask "What are the key themes?"
|
|
154
|
+
|
|
155
|
+
# Generate (--wait blocks until done)
|
|
156
|
+
notebooklm generate audio "make it engaging" --wait
|
|
157
|
+
notebooklm generate video --style whiteboard --wait
|
|
158
|
+
notebooklm generate quiz --difficulty hard --wait
|
|
159
|
+
notebooklm generate flashcards --quantity more --wait
|
|
160
|
+
notebooklm generate slide-deck --wait
|
|
161
|
+
notebooklm generate infographic --orientation portrait --wait
|
|
162
|
+
notebooklm generate report --format study-guide --wait
|
|
163
|
+
notebooklm generate mind-map
|
|
164
|
+
|
|
165
|
+
# Download
|
|
166
|
+
notebooklm download audio ./podcast.mp3
|
|
167
|
+
notebooklm download video ./overview.mp4
|
|
168
|
+
notebooklm download quiz --format json ./quiz.json
|
|
169
|
+
notebooklm download flashcards --format markdown ./cards.md
|
|
170
|
+
notebooklm download slide-deck ./slides.pdf
|
|
171
|
+
notebooklm download mind-map ./mindmap.json
|
|
172
|
+
notebooklm download data-table ./data.csv
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Common Workflows
|
|
176
|
+
|
|
177
|
+
### Research → Podcast
|
|
178
|
+
See `references/workflows.md` for the full pattern.
|
|
179
|
+
|
|
180
|
+
### Bulk Source Import
|
|
181
|
+
```python
|
|
182
|
+
urls = ["https://...", "https://...", ...]
|
|
183
|
+
for url in urls:
|
|
184
|
+
await client.sources.add_url(nb_id, url, wait=False)
|
|
185
|
+
await asyncio.sleep(1) # Rate limiting
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Quiz Generation + JSON Export
|
|
189
|
+
```python
|
|
190
|
+
status = await client.artifacts.generate_quiz(nb_id, difficulty="hard")
|
|
191
|
+
final = await client.artifacts.wait_for_completion(nb_id, status.task_id)
|
|
192
|
+
await client.artifacts.download_quiz(nb_id, "quiz.json", output_format="json")
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Error Handling
|
|
196
|
+
|
|
197
|
+
```python
|
|
198
|
+
from notebooklm import RPCError
|
|
199
|
+
|
|
200
|
+
try:
|
|
201
|
+
result = await client.notebooks.create("Test")
|
|
202
|
+
except RPCError as e:
|
|
203
|
+
# Session expired → re-run `notebooklm login`
|
|
204
|
+
# Rate limited → wait and retry
|
|
205
|
+
print(f"Error: {e}")
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Common issues:**
|
|
209
|
+
- `RPCError` auth failure → re-run `notebooklm login` or call `await client.refresh_auth()`
|
|
210
|
+
- Rate limits → add `await asyncio.sleep(2)` between bulk operations
|
|
211
|
+
- Source not ready → use `wait=True` in `add_url()` / `add_file()`
|
|
212
|
+
|
|
213
|
+
## Reference Files
|
|
214
|
+
|
|
215
|
+
- `references/auth.md` — Detailed auth setup, CI/CD, environment variables
|
|
216
|
+
- `references/workflows.md` — Complete workflow examples (research→podcast, bulk import, etc.)
|
|
217
|
+
- `references/artifact-options.md` — All generation options, formats, and styles
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Artifact Generation Options
|
|
2
|
+
|
|
3
|
+
## Audio Overview (Podcast)
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
await client.artifacts.generate_audio(
|
|
7
|
+
nb_id,
|
|
8
|
+
instructions="Focus on practical applications", # optional
|
|
9
|
+
format="deep-dive", # deep-dive | brief | critique | debate
|
|
10
|
+
length="default", # short | default | long
|
|
11
|
+
language="en", # ISO language code
|
|
12
|
+
source_ids=None, # list of source IDs to limit scope
|
|
13
|
+
)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
CLI: `notebooklm generate audio "instructions" --format deep-dive --length long --wait`
|
|
17
|
+
|
|
18
|
+
Download: MP3 or MP4
|
|
19
|
+
|
|
20
|
+
## Video Overview
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
await client.artifacts.generate_video(
|
|
24
|
+
nb_id,
|
|
25
|
+
instructions="Explainer for beginners",
|
|
26
|
+
format="explainer", # explainer | brief
|
|
27
|
+
style="whiteboard", # auto | classic | whiteboard | kawaii | anime | watercolor | retro-print | heritage | paper-craft
|
|
28
|
+
language="en",
|
|
29
|
+
)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
CLI: `notebooklm generate video --style kawaii --format brief --wait`
|
|
33
|
+
|
|
34
|
+
Download: MP4
|
|
35
|
+
|
|
36
|
+
## Slide Deck
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
await client.artifacts.generate_slide_deck(
|
|
40
|
+
nb_id,
|
|
41
|
+
instructions="Focus on key metrics",
|
|
42
|
+
format="detailed", # detailed | presenter
|
|
43
|
+
length="default", # default | short
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
CLI: `notebooklm generate slide-deck --format presenter --wait`
|
|
48
|
+
|
|
49
|
+
Download: PDF or PPTX (PPTX not available in web UI!)
|
|
50
|
+
|
|
51
|
+
## Quiz
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
await client.artifacts.generate_quiz(
|
|
55
|
+
nb_id,
|
|
56
|
+
difficulty="medium", # easy | medium | hard
|
|
57
|
+
quantity="standard", # fewer | standard | more
|
|
58
|
+
)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
CLI: `notebooklm generate quiz --difficulty hard --quantity more --wait`
|
|
62
|
+
|
|
63
|
+
Download: `output_format` → `json` | `markdown` | `html`
|
|
64
|
+
|
|
65
|
+
## Flashcards
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
await client.artifacts.generate_flashcards(
|
|
69
|
+
nb_id,
|
|
70
|
+
difficulty="medium",
|
|
71
|
+
quantity="standard",
|
|
72
|
+
)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
CLI: `notebooklm generate flashcards --quantity more --wait`
|
|
76
|
+
|
|
77
|
+
Download: `output_format` → `json` | `markdown` | `html`
|
|
78
|
+
|
|
79
|
+
## Infographic
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
await client.artifacts.generate_infographic(
|
|
83
|
+
nb_id,
|
|
84
|
+
instructions="Highlight statistics",
|
|
85
|
+
orientation="portrait", # landscape | portrait | square
|
|
86
|
+
detail="standard", # concise | standard | detailed
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
CLI: `notebooklm generate infographic --orientation portrait --detail detailed --wait`
|
|
91
|
+
|
|
92
|
+
Download: PNG
|
|
93
|
+
|
|
94
|
+
## Report
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
await client.artifacts.generate_report(
|
|
98
|
+
nb_id,
|
|
99
|
+
format="study-guide", # briefing-doc | study-guide | blog-post | custom
|
|
100
|
+
instructions="Include key examples", # extra instructions appended to template
|
|
101
|
+
)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
CLI: `notebooklm generate report --format blog-post --append "target audience: beginners" --wait`
|
|
105
|
+
|
|
106
|
+
Download: Markdown
|
|
107
|
+
|
|
108
|
+
## Data Table
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
await client.artifacts.generate_data_table(
|
|
112
|
+
nb_id,
|
|
113
|
+
instructions="Compare pricing, features, and limitations of each tool",
|
|
114
|
+
)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
CLI: `notebooklm generate data-table "compare main concepts" --wait`
|
|
118
|
+
|
|
119
|
+
Download: CSV
|
|
120
|
+
|
|
121
|
+
## Mind Map
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
# Synchronous — returns immediately, no wait needed
|
|
125
|
+
result = await client.artifacts.generate_mind_map(nb_id)
|
|
126
|
+
await client.artifacts.download_mind_map(nb_id, "mindmap.json")
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
CLI: `notebooklm generate mind-map`
|
|
130
|
+
|
|
131
|
+
Download: JSON (hierarchical structure)
|
|
132
|
+
|
|
133
|
+
## Revise Individual Slide
|
|
134
|
+
|
|
135
|
+
```python
|
|
136
|
+
# Requires existing slide deck artifact ID
|
|
137
|
+
await client.artifacts.revise_slide(
|
|
138
|
+
nb_id,
|
|
139
|
+
artifact_id="art_xxx",
|
|
140
|
+
slide_index=0, # 0-based
|
|
141
|
+
instructions="Move title to top, add bullet points",
|
|
142
|
+
)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
CLI: `notebooklm generate revise-slide "revise instructions" --artifact <id> --slide 0 --wait`
|
|
146
|
+
|
|
147
|
+
## Artifact Management
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
# List all artifacts
|
|
151
|
+
artifacts = await client.artifacts.list(nb_id)
|
|
152
|
+
artifacts = await client.artifacts.list(nb_id, artifact_type="audio")
|
|
153
|
+
|
|
154
|
+
# Get specific artifact
|
|
155
|
+
artifact = await client.artifacts.get(nb_id, artifact_id)
|
|
156
|
+
|
|
157
|
+
# Rename
|
|
158
|
+
await client.artifacts.rename(nb_id, artifact_id, "New Name")
|
|
159
|
+
|
|
160
|
+
# Delete
|
|
161
|
+
await client.artifacts.delete(nb_id, artifact_id)
|
|
162
|
+
|
|
163
|
+
# Export to Google Docs/Sheets
|
|
164
|
+
await client.artifacts.export(nb_id, artifact_id, export_type="docs", title="My Export")
|
|
165
|
+
|
|
166
|
+
# Get AI suggestions
|
|
167
|
+
suggestions = await client.artifacts.suggestions(nb_id)
|
|
168
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# NotebookLM Authentication
|
|
2
|
+
|
|
3
|
+
## First-Time Setup (Browser)
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install "notebooklm-py[browser]"
|
|
7
|
+
playwright install chromium
|
|
8
|
+
notebooklm login
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This opens a browser, you log into Google, and cookies are saved to `~/.notebooklm/storage_state.json`.
|
|
12
|
+
|
|
13
|
+
## Environment Variables
|
|
14
|
+
|
|
15
|
+
| Variable | Description |
|
|
16
|
+
|----------|-------------|
|
|
17
|
+
| `NOTEBOOKLM_HOME` | Base directory for config (default: `~/.notebooklm`) |
|
|
18
|
+
| `NOTEBOOKLM_AUTH_JSON` | Inline auth JSON — no file needed (for CI/CD) |
|
|
19
|
+
| `NOTEBOOKLM_DEBUG_RPC` | Set to `1` for debug logging |
|
|
20
|
+
|
|
21
|
+
## CI/CD (No Browser)
|
|
22
|
+
|
|
23
|
+
Export cookies from a logged-in session, then:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
export NOTEBOOKLM_AUTH_JSON='{"cookies": [{"name": "SID", "value": "...", ...}], "csrf_token": "...", "session_id": "..."}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or in Python:
|
|
30
|
+
```python
|
|
31
|
+
import os
|
|
32
|
+
os.environ["NOTEBOOKLM_AUTH_JSON"] = '{"cookies": [...]}'
|
|
33
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
34
|
+
...
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Auth Precedence (highest → lowest)
|
|
38
|
+
1. Explicit `path` arg to `from_storage()`
|
|
39
|
+
2. `NOTEBOOKLM_AUTH_JSON` env var
|
|
40
|
+
3. `$NOTEBOOKLM_HOME/storage_state.json`
|
|
41
|
+
4. `~/.notebooklm/storage_state.json`
|
|
42
|
+
|
|
43
|
+
## Token Refresh
|
|
44
|
+
|
|
45
|
+
CSRF tokens auto-refresh on 401/403. For proactive refresh:
|
|
46
|
+
```python
|
|
47
|
+
await client.refresh_auth()
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If session cookies expire entirely → re-run `notebooklm login`.
|
|
51
|
+
|
|
52
|
+
## Diagnose Auth Issues
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
notebooklm auth check
|
|
56
|
+
notebooklm auth check --test # Also validates network
|
|
57
|
+
notebooklm auth check --json # Machine-readable
|
|
58
|
+
```
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# NotebookLM Workflow Examples
|
|
2
|
+
|
|
3
|
+
## 1. Complete Quickstart
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
import asyncio
|
|
7
|
+
from notebooklm import NotebookLMClient
|
|
8
|
+
|
|
9
|
+
async def main():
|
|
10
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
11
|
+
# Create notebook
|
|
12
|
+
nb = await client.notebooks.create("Research")
|
|
13
|
+
|
|
14
|
+
# Add sources
|
|
15
|
+
await client.sources.add_url(nb.id, "https://example.com/article", wait=True)
|
|
16
|
+
await client.sources.add_file(nb.id, "./paper.pdf", wait=True)
|
|
17
|
+
|
|
18
|
+
# Chat
|
|
19
|
+
result = await client.chat.ask(nb.id, "What are the key findings?")
|
|
20
|
+
print(result.answer)
|
|
21
|
+
|
|
22
|
+
# Generate podcast
|
|
23
|
+
status = await client.artifacts.generate_audio(
|
|
24
|
+
nb.id, instructions="Make it engaging and accessible"
|
|
25
|
+
)
|
|
26
|
+
final = await client.artifacts.wait_for_completion(nb.id, status.task_id, timeout=300)
|
|
27
|
+
if final.is_complete:
|
|
28
|
+
await client.artifacts.download_audio(nb.id, "./podcast.mp3")
|
|
29
|
+
|
|
30
|
+
asyncio.run(main())
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 2. Research → Podcast Pipeline
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import asyncio
|
|
37
|
+
from notebooklm import NotebookLMClient
|
|
38
|
+
|
|
39
|
+
async def research_to_podcast(topic: str, output_path: str = "./podcast.mp3"):
|
|
40
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
41
|
+
# Create notebook
|
|
42
|
+
nb = await client.notebooks.create(f"Research: {topic}")
|
|
43
|
+
|
|
44
|
+
# Start deep research
|
|
45
|
+
research = await client.research.start(nb.id, topic, source="web", mode="deep")
|
|
46
|
+
task_id = research.get("task_id")
|
|
47
|
+
|
|
48
|
+
# Wait for research
|
|
49
|
+
for _ in range(30):
|
|
50
|
+
status = await client.research.poll(nb.id)
|
|
51
|
+
if status.get("status") == "completed":
|
|
52
|
+
sources = status.get("sources", [])
|
|
53
|
+
await client.research.import_sources(nb.id, task_id, sources[:10])
|
|
54
|
+
break
|
|
55
|
+
await asyncio.sleep(10)
|
|
56
|
+
|
|
57
|
+
# Generate podcast
|
|
58
|
+
gen = await client.artifacts.generate_audio(
|
|
59
|
+
nb.id, instructions=f"Engaging overview of {topic}"
|
|
60
|
+
)
|
|
61
|
+
final = await client.artifacts.wait_for_completion(nb.id, gen.task_id, timeout=600)
|
|
62
|
+
|
|
63
|
+
if final.is_complete:
|
|
64
|
+
await client.artifacts.download_audio(nb.id, output_path)
|
|
65
|
+
print(f"Saved to {output_path}")
|
|
66
|
+
|
|
67
|
+
return nb.id # Keep for reference
|
|
68
|
+
|
|
69
|
+
asyncio.run(research_to_podcast("AI trends 2025"))
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 3. Bulk URL Import
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
async def bulk_import(nb_id: str, urls: list[str]):
|
|
76
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
77
|
+
for i, url in enumerate(urls):
|
|
78
|
+
print(f"Adding {i+1}/{len(urls)}: {url}")
|
|
79
|
+
await client.sources.add_url(nb_id, url, wait=False)
|
|
80
|
+
await asyncio.sleep(1) # Avoid rate limits
|
|
81
|
+
print("All sources submitted. Processing in background.")
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 4. Generate All Content Types
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
async def generate_all(nb_id: str):
|
|
88
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
89
|
+
tasks = [
|
|
90
|
+
client.artifacts.generate_audio(nb_id, format="deep-dive"),
|
|
91
|
+
client.artifacts.generate_quiz(nb_id, difficulty="medium"),
|
|
92
|
+
client.artifacts.generate_flashcards(nb_id),
|
|
93
|
+
client.artifacts.generate_slide_deck(nb_id, format="detailed"),
|
|
94
|
+
client.artifacts.generate_mind_map(nb_id), # Sync, returns immediately
|
|
95
|
+
]
|
|
96
|
+
results = await asyncio.gather(*tasks, return_exceptions=True)
|
|
97
|
+
return results
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 5. Quiz Export in Multiple Formats
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
async def export_quiz(nb_id: str):
|
|
104
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
105
|
+
status = await client.artifacts.generate_quiz(nb_id, difficulty="hard", quantity="more")
|
|
106
|
+
final = await client.artifacts.wait_for_completion(nb_id, status.task_id)
|
|
107
|
+
|
|
108
|
+
if final.is_complete:
|
|
109
|
+
await client.artifacts.download_quiz(nb_id, "quiz.json", output_format="json")
|
|
110
|
+
await client.artifacts.download_quiz(nb_id, "quiz.md", output_format="markdown")
|
|
111
|
+
await client.artifacts.download_quiz(nb_id, "quiz.html", output_format="html")
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 6. Save Chat History as Notes
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
async def save_session(nb_id: str, questions: list[str]):
|
|
118
|
+
async with await NotebookLMClient.from_storage() as client:
|
|
119
|
+
for q in questions:
|
|
120
|
+
await client.chat.ask(nb_id, q)
|
|
121
|
+
# Save entire session as a notebook note
|
|
122
|
+
history = await client.chat.history(nb_id)
|
|
123
|
+
await client.notes.create(nb_id, content=str(history), title="Research Session")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## 7. CLI One-Liner Workflows
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Quick research notebook + podcast
|
|
130
|
+
notebooklm create "AI Research" && \
|
|
131
|
+
notebooklm source add-research "artificial intelligence 2025" --mode deep --import-all && \
|
|
132
|
+
notebooklm generate audio "engaging overview" --wait && \
|
|
133
|
+
notebooklm download audio ./ai-research.mp3
|
|
134
|
+
|
|
135
|
+
# Generate study materials from PDF
|
|
136
|
+
notebooklm create "Study" && \
|
|
137
|
+
notebooklm source add ./textbook.pdf && \
|
|
138
|
+
notebooklm generate quiz --difficulty hard --wait && \
|
|
139
|
+
notebooklm generate flashcards --quantity more --wait && \
|
|
140
|
+
notebooklm generate slide-deck --wait && \
|
|
141
|
+
notebooklm download quiz --format json ./quiz.json && \
|
|
142
|
+
notebooklm download flashcards --format markdown ./cards.md && \
|
|
143
|
+
notebooklm download slide-deck ./slides.pdf
|
|
144
|
+
```
|