opencodekit 0.15.21 → 0.16.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/dist/index.js +5 -7
- package/dist/template/.opencode/AGENTS.md +21 -20
- package/dist/template/.opencode/agent/build.md +88 -7
- package/dist/template/.opencode/agent/explore.md +1 -1
- package/dist/template/.opencode/agent/general.md +54 -4
- package/dist/template/.opencode/agent/looker.md +1 -1
- package/dist/template/.opencode/agent/painter.md +1 -1
- package/dist/template/.opencode/agent/plan.md +52 -0
- package/dist/template/.opencode/agent/review.md +1 -1
- package/dist/template/.opencode/agent/scout.md +3 -3
- package/dist/template/.opencode/agent/vision.md +1 -1
- package/dist/template/.opencode/command/create.md +201 -95
- package/dist/template/.opencode/command/design.md +5 -7
- package/dist/template/.opencode/command/handoff.md +7 -0
- package/dist/template/.opencode/command/init.md +25 -47
- package/dist/template/.opencode/command/plan.md +35 -16
- package/dist/template/.opencode/command/resume.md +7 -18
- package/dist/template/.opencode/command/ship.md +156 -0
- package/dist/template/.opencode/command/start.md +315 -28
- package/dist/template/.opencode/command/ui-review.md +5 -7
- package/dist/template/.opencode/command/verify.md +279 -0
- package/dist/template/.opencode/memory/_templates/README.md +57 -19
- package/dist/template/.opencode/memory/_templates/prd.md +29 -0
- package/dist/template/.opencode/memory/_templates/project/tech-stack.md +50 -0
- package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
- package/dist/template/.opencode/memory/_templates/spec.md +66 -0
- package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-add-skills-vs-commands-to-global-agents-.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-build-agent-auto-loads-skills-contextual.md +31 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-fixed-agent-configuration-for-opencodeki.md +25 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-focused-agents-md-upgrade-for-opencode-k.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-implement-tier-1-permission-upgrades.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-instructions-config-explicit-paths-not-w.md +40 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-merged-context-into-memory-project-singl.md +42 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-oracle-tool-should-use-review-agent-not-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-agent-auto-loads-skills-contextuall.md +31 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-phased-oracle-command-merge-into-ne.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-prd-workflow-uses-prd-and-prd-task-skill.md +23 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-prefer-review-agent-via-opencode-cli-ove.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-add-ship-command-with.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-skills-vs-commands-section-from-a.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-tool-with-ship-command-fl.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-with-ship-command-workflo.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-proxypal-oracle-with-cli-review-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-dist-template-only-tech-stack.md +50 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-templates-only-tech-stack-md.md +26 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-subagents-load-minimal-skills-stay-lean.md +29 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-user-approved-permission-upgrades-in-ope.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-discovery-verify-command-already-implemented.md +28 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-feature-openspec-phase-b-complete-template-upgra.md +43 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-build-agent-should-use-dynamic-lsp-not-f.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-kimi-k2-5-model-requires-temperature-1-0.md +22 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-already-imple.md +27 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-uses-instruct.md +35 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-update-build-agent-prompt-to-use-context.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-using-opencode-expert-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-g.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-r.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-prefers-copilot-gpt-5-2-codex-mediu.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-contextu.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-reviewed.md +15 -0
- package/dist/template/.opencode/memory/project/command-rules.md +122 -0
- package/dist/template/.opencode/memory/project/tech-stack.md +50 -0
- package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
- package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
- package/dist/template/.opencode/opencode.json +916 -803
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
- package/package.json +1 -1
- package/dist/template/.opencode/command/accessibility-check.md +0 -331
- package/dist/template/.opencode/command/agent-browser.md +0 -21
- package/dist/template/.opencode/command/analyze-mockup.md +0 -423
- package/dist/template/.opencode/command/analyze-project.md +0 -295
- package/dist/template/.opencode/command/brainstorm.md +0 -373
- package/dist/template/.opencode/command/cloudflare.md +0 -70
- package/dist/template/.opencode/command/commit.md +0 -245
- package/dist/template/.opencode/command/complete-next-task.md +0 -77
- package/dist/template/.opencode/command/design-audit.md +0 -480
- package/dist/template/.opencode/command/edit-image.md +0 -242
- package/dist/template/.opencode/command/finish.md +0 -255
- package/dist/template/.opencode/command/fix-ci.md +0 -109
- package/dist/template/.opencode/command/fix-types.md +0 -104
- package/dist/template/.opencode/command/fix-ui.md +0 -117
- package/dist/template/.opencode/command/fix.md +0 -168
- package/dist/template/.opencode/command/frontend-design.md +0 -21
- package/dist/template/.opencode/command/generate-diagram.md +0 -349
- package/dist/template/.opencode/command/generate-icon.md +0 -283
- package/dist/template/.opencode/command/generate-image.md +0 -246
- package/dist/template/.opencode/command/generate-pattern.md +0 -247
- package/dist/template/.opencode/command/generate-storyboard.md +0 -250
- package/dist/template/.opencode/command/implement.md +0 -609
- package/dist/template/.opencode/command/import-plan.md +0 -406
- package/dist/template/.opencode/command/index-knowledge.md +0 -25
- package/dist/template/.opencode/command/integration-test.md +0 -424
- package/dist/template/.opencode/command/issue.md +0 -102
- package/dist/template/.opencode/command/new-feature.md +0 -651
- package/dist/template/.opencode/command/opensrc.md +0 -58
- package/dist/template/.opencode/command/quick-build.md +0 -238
- package/dist/template/.opencode/command/ralph.md +0 -41
- package/dist/template/.opencode/command/research-and-implement.md +0 -148
- package/dist/template/.opencode/command/research-ui.md +0 -466
- package/dist/template/.opencode/command/restore-image.md +0 -424
- package/dist/template/.opencode/command/revert-feature.md +0 -386
- package/dist/template/.opencode/command/skill-create.md +0 -517
- package/dist/template/.opencode/command/skill-optimize.md +0 -556
- package/dist/template/.opencode/command/summarize.md +0 -412
- package/dist/template/.opencode/command/triage.md +0 -398
- package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
- package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
- package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
- package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
- package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
- package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
- package/dist/template/.opencode/tool/notebooklm.ts +0 -488
- package/dist/template/.opencode/tool/oracle.ts +0 -240
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: notebooklm
|
|
3
|
-
description: >
|
|
4
|
-
Query Google NotebookLM notebooks directly from OpenCode for source-grounded, citation-backed answers.
|
|
5
|
-
Use when user mentions NotebookLM, shares notebook URLs, or wants to query their uploaded documents.
|
|
6
|
-
Provides document-only responses with drastically reduced hallucinations.
|
|
7
|
-
version: "1.0.0"
|
|
8
|
-
license: MIT
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# NotebookLM Skill
|
|
12
|
-
|
|
13
|
-
Interact with Google NotebookLM to query documentation with Gemini's source-grounded answers. Each question opens a fresh browser session, retrieves the answer exclusively from uploaded documents, and closes.
|
|
14
|
-
|
|
15
|
-
## When to Use This Skill
|
|
16
|
-
|
|
17
|
-
Trigger when user:
|
|
18
|
-
|
|
19
|
-
- Mentions NotebookLM explicitly
|
|
20
|
-
- Shares NotebookLM URL (`https://notebooklm.google.com/notebook/...`)
|
|
21
|
-
- Asks to query their notebooks/documentation
|
|
22
|
-
- Wants to add documentation to NotebookLM library
|
|
23
|
-
- Uses phrases like "ask my NotebookLM", "check my docs", "query my notebook"
|
|
24
|
-
|
|
25
|
-
## Prerequisites
|
|
26
|
-
|
|
27
|
-
Before using this skill, ensure:
|
|
28
|
-
|
|
29
|
-
1. **Python 3.10+** is installed
|
|
30
|
-
2. **Google Chrome** browser is installed
|
|
31
|
-
3. **NotebookLM account** with uploaded documents
|
|
32
|
-
4. **Google authentication** (one-time setup)
|
|
33
|
-
|
|
34
|
-
## Quick Start
|
|
35
|
-
|
|
36
|
-
```typescript
|
|
37
|
-
// Check authentication status
|
|
38
|
-
await notebooklm({ operation: "auth", subOperation: "status" });
|
|
39
|
-
|
|
40
|
-
// Query a notebook
|
|
41
|
-
await notebooklm({
|
|
42
|
-
operation: "query",
|
|
43
|
-
question: "What are the key findings in this document?",
|
|
44
|
-
notebookUrl: "https://notebooklm.google.com/notebook/...",
|
|
45
|
-
});
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Core Workflow
|
|
49
|
-
|
|
50
|
-
### Step 1: Check Authentication
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
const authStatus = await notebooklm({
|
|
54
|
-
operation: "auth",
|
|
55
|
-
subOperation: "status",
|
|
56
|
-
});
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
If not authenticated, proceed to setup.
|
|
60
|
-
|
|
61
|
-
### Step 2: Authenticate (One-Time Setup)
|
|
62
|
-
|
|
63
|
-
```typescript
|
|
64
|
-
await notebooklm({
|
|
65
|
-
operation: "auth",
|
|
66
|
-
subOperation: "setup",
|
|
67
|
-
showBrowser: true, // Browser must be visible for manual login
|
|
68
|
-
});
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Important:**
|
|
72
|
-
|
|
73
|
-
- Browser is VISIBLE for authentication
|
|
74
|
-
- Browser window opens automatically
|
|
75
|
-
- User must manually log in to Google
|
|
76
|
-
- Tell user: "A browser window will open for Google login"
|
|
77
|
-
|
|
78
|
-
### Step 3: Manage Notebook Library
|
|
79
|
-
|
|
80
|
-
```typescript
|
|
81
|
-
// List all notebooks
|
|
82
|
-
await notebooklm({ operation: "library", subOperation: "list" });
|
|
83
|
-
|
|
84
|
-
// Add notebook to library
|
|
85
|
-
await notebooklm({
|
|
86
|
-
operation: "library",
|
|
87
|
-
subOperation: "add",
|
|
88
|
-
url: "https://notebooklm.google.com/notebook/...",
|
|
89
|
-
name: "API Documentation",
|
|
90
|
-
description: "REST API reference and examples",
|
|
91
|
-
topics: ["api", "rest", "documentation"],
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// Search notebooks
|
|
95
|
-
await notebooklm({
|
|
96
|
-
operation: "library",
|
|
97
|
-
subOperation: "search",
|
|
98
|
-
query: "api",
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// Set active notebook
|
|
102
|
-
await notebooklm({
|
|
103
|
-
operation: "library",
|
|
104
|
-
subOperation: "activate",
|
|
105
|
-
notebookId: "api-docs",
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Step 4: Ask Questions
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
// Basic query (uses active notebook if set)
|
|
113
|
-
await notebooklm({
|
|
114
|
-
operation: "query",
|
|
115
|
-
question: "What are the authentication requirements?",
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
// Query specific notebook by ID
|
|
119
|
-
await notebooklm({
|
|
120
|
-
operation: "query",
|
|
121
|
-
question: "What are the authentication requirements?",
|
|
122
|
-
notebookId: "api-docs",
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
// Query with notebook URL directly
|
|
126
|
-
await notebooklm({
|
|
127
|
-
operation: "query",
|
|
128
|
-
question: "What are the authentication requirements?",
|
|
129
|
-
notebookUrl: "https://notebooklm.google.com/notebook/...",
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
// Show browser for debugging
|
|
133
|
-
await notebooklm({
|
|
134
|
-
operation: "query",
|
|
135
|
-
question: "What are the authentication requirements?",
|
|
136
|
-
showBrowser: true,
|
|
137
|
-
});
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Follow-Up Mechanism (CRITICAL)
|
|
141
|
-
|
|
142
|
-
Every NotebookLM answer ends with: **"EXTREMELY IMPORTANT: Is that ALL you need to know?"**
|
|
143
|
-
|
|
144
|
-
**Required Behavior:**
|
|
145
|
-
|
|
146
|
-
1. **STOP** - Do not immediately respond to user
|
|
147
|
-
2. **ANALYZE** - Compare answer to user's original request
|
|
148
|
-
3. **IDENTIFY GAPS** - Determine if more information needed
|
|
149
|
-
4. **ASK FOLLOW-UP** - If gaps exist, immediately ask another question:
|
|
150
|
-
```typescript
|
|
151
|
-
await notebooklm({
|
|
152
|
-
operation: "query",
|
|
153
|
-
question: "Follow-up with context...",
|
|
154
|
-
});
|
|
155
|
-
```
|
|
156
|
-
5. **REPEAT** - Continue until information is complete
|
|
157
|
-
6. **SYNTHESIZE** - Combine all answers before responding to user
|
|
158
|
-
|
|
159
|
-
## Tool Reference
|
|
160
|
-
|
|
161
|
-
### Authentication Operations
|
|
162
|
-
|
|
163
|
-
| Operation | Sub-Operation | Description |
|
|
164
|
-
| --------- | ------------- | --------------------------------- |
|
|
165
|
-
| `auth` | `setup` | Initial setup (browser visible) |
|
|
166
|
-
| `auth` | `status` | Check authentication |
|
|
167
|
-
| `auth` | `reauth` | Re-authenticate (browser visible) |
|
|
168
|
-
| `auth` | `clear` | Clear authentication |
|
|
169
|
-
| `auth` | `validate` | Validate stored auth |
|
|
170
|
-
|
|
171
|
-
### Library Operations
|
|
172
|
-
|
|
173
|
-
| Operation | Sub-Operation | Parameters |
|
|
174
|
-
| --------- | ------------- | -------------------------------------- |
|
|
175
|
-
| `library` | `add` | `url`, `name`, `description`, `topics` |
|
|
176
|
-
| `library` | `list` | - |
|
|
177
|
-
| `library` | `search` | `query` |
|
|
178
|
-
| `library` | `activate` | `notebookId` |
|
|
179
|
-
| `library` | `remove` | `notebookId` |
|
|
180
|
-
| `library` | `stats` | - |
|
|
181
|
-
|
|
182
|
-
### Query Operations
|
|
183
|
-
|
|
184
|
-
| Operation | Parameters |
|
|
185
|
-
| --------- | -------------------------------------------------------------------------------------------------- |
|
|
186
|
-
| `query` | `question` (required), `notebookId` (optional), `notebookUrl` (optional), `showBrowser` (optional) |
|
|
187
|
-
|
|
188
|
-
## Smart Discovery Pattern
|
|
189
|
-
|
|
190
|
-
When user wants to add a notebook without providing details:
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
// Step 1: Query the notebook to discover its content
|
|
194
|
-
const discovery = await notebooklm({
|
|
195
|
-
operation: "query",
|
|
196
|
-
question:
|
|
197
|
-
"What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely",
|
|
198
|
-
notebookUrl: "https://notebooklm.google.com/notebook/...",
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
// Step 2: Use discovered information to add it
|
|
202
|
-
await notebooklm({
|
|
203
|
-
operation: "library",
|
|
204
|
-
subOperation: "add",
|
|
205
|
-
url: "https://notebooklm.google.com/notebook/...",
|
|
206
|
-
name: "[Based on content]",
|
|
207
|
-
description: "[Based on content]",
|
|
208
|
-
topics: ["[Based on content]"],
|
|
209
|
-
});
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
## Decision Flow
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
User mentions NotebookLM
|
|
216
|
-
↓
|
|
217
|
-
Check auth → notebooklm({ operation: "auth", subOperation: "status" })
|
|
218
|
-
↓
|
|
219
|
-
If not authenticated → notebooklm({ operation: "auth", subOperation: "setup", showBrowser: true })
|
|
220
|
-
↓
|
|
221
|
-
Check/Add notebook → notebooklm({ operation: "library", subOperation: "list/add" })
|
|
222
|
-
↓
|
|
223
|
-
Activate notebook → notebooklm({ operation: "library", subOperation: "activate", notebookId: "..." })
|
|
224
|
-
↓
|
|
225
|
-
Ask question → notebooklm({ operation: "query", question: "..." })
|
|
226
|
-
↓
|
|
227
|
-
See "Is that ALL you need?" → Ask follow-ups until complete
|
|
228
|
-
↓
|
|
229
|
-
Synthesize and respond to user
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
## Troubleshooting
|
|
233
|
-
|
|
234
|
-
| Problem | Solution |
|
|
235
|
-
| -------------------- | --------------------------------------- |
|
|
236
|
-
| Not authenticated | Run auth setup with `showBrowser: true` |
|
|
237
|
-
| Authentication fails | Browser must be visible for setup |
|
|
238
|
-
| Rate limit (50/day) | Wait or switch Google account |
|
|
239
|
-
| Notebook not found | Check with `library` → `list` operation |
|
|
240
|
-
| ModuleNotFoundError | Tool auto-installs dependencies |
|
|
241
|
-
|
|
242
|
-
## Best Practices
|
|
243
|
-
|
|
244
|
-
1. **Always check auth first** - Before any operations
|
|
245
|
-
2. **Follow-up questions** - Don't stop at first answer
|
|
246
|
-
3. **Browser visible for auth** - Required for manual login
|
|
247
|
-
4. **Include context** - Each question is independent
|
|
248
|
-
5. **Synthesize answers** - Combine multiple responses
|
|
249
|
-
|
|
250
|
-
## Limitations
|
|
251
|
-
|
|
252
|
-
- No session persistence (each question = new browser)
|
|
253
|
-
- Rate limits on free Google accounts (50 queries/day)
|
|
254
|
-
- Manual upload required (user must add docs to NotebookLM)
|
|
255
|
-
- Browser overhead (few seconds per question)
|
|
256
|
-
- Requires Python and Chrome installed
|
|
257
|
-
|
|
258
|
-
## Data Storage
|
|
259
|
-
|
|
260
|
-
All data stored in `~/.opencode/skills/notebooklm/data/`:
|
|
261
|
-
|
|
262
|
-
- `library.json` - Notebook metadata
|
|
263
|
-
- `auth_info.json` - Authentication status
|
|
264
|
-
- `browser_state/` - Browser cookies and session
|
|
265
|
-
|
|
266
|
-
**Security:** Protected by `.gitignore`, never commit to git.
|
|
267
|
-
|
|
268
|
-
## Resources
|
|
269
|
-
|
|
270
|
-
- **Original Skill**: https://github.com/PleasePrompto/notebooklm-skill
|
|
271
|
-
- **NotebookLM**: https://notebooklm.google.com
|
|
272
|
-
- **Setup Guide**: See `references/setup.md`
|
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
# NotebookLM Skill Setup Guide
|
|
2
|
-
|
|
3
|
-
Complete setup instructions for the NotebookLM skill integration.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
### 1. Python 3.10+
|
|
8
|
-
|
|
9
|
-
Check if Python is installed:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
python --version
|
|
13
|
-
# or
|
|
14
|
-
python3 --version
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Install if missing:**
|
|
18
|
-
|
|
19
|
-
**macOS (using Homebrew):**
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
brew install python@3.11
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
**Ubuntu/Debian:**
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
sudo apt update
|
|
29
|
-
sudo apt install python3 python3-pip python3-venv
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Windows:**
|
|
33
|
-
Download from [python.org](https://python.org) and install with "Add to PATH" checked.
|
|
34
|
-
|
|
35
|
-
### 2. Google Chrome
|
|
36
|
-
|
|
37
|
-
Check if Chrome is installed:
|
|
38
|
-
|
|
39
|
-
**macOS:**
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
ls /Applications/Google\ Chrome.app
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Linux:**
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
which google-chrome
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**Windows:**
|
|
52
|
-
Check Start Menu for Google Chrome.
|
|
53
|
-
|
|
54
|
-
**Install if missing:**
|
|
55
|
-
Download from [google.com/chrome](https://google.com/chrome)
|
|
56
|
-
|
|
57
|
-
### 3. NotebookLM Account
|
|
58
|
-
|
|
59
|
-
1. Visit [notebooklm.google.com](https://notebooklm.google.com)
|
|
60
|
-
2. Sign in with Google account
|
|
61
|
-
3. Upload documents to create notebooks
|
|
62
|
-
|
|
63
|
-
## First-Time Setup
|
|
64
|
-
|
|
65
|
-
### Step 1: Verify Tool Installation
|
|
66
|
-
|
|
67
|
-
The tool auto-installs the Python skill on first use. Verify it's working:
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
const setup = await notebooklm({ operation: "setup" });
|
|
71
|
-
console.log(setup.output);
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Expected output:
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
📦 NotebookLM skill not found. Installing...
|
|
78
|
-
Cloning from https://github.com/PleasePrompto/notebooklm-skill...
|
|
79
|
-
✓ Skill installed successfully
|
|
80
|
-
📍 Location: ~/.opencode/skills/notebooklm
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Step 2: Authenticate with Google
|
|
84
|
-
|
|
85
|
-
**CRITICAL:** Browser must be visible for manual login.
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
await notebooklm({
|
|
89
|
-
operation: "auth",
|
|
90
|
-
subOperation: "setup",
|
|
91
|
-
showBrowser: true,
|
|
92
|
-
});
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**What happens:**
|
|
96
|
-
|
|
97
|
-
1. Browser window opens automatically
|
|
98
|
-
2. Navigate to notebooklm.google.com
|
|
99
|
-
3. **You must manually log in** to your Google account
|
|
100
|
-
4. Authentication state is saved for future use
|
|
101
|
-
|
|
102
|
-
**Authentication lasts:** ~7 days (then requires re-auth)
|
|
103
|
-
|
|
104
|
-
### Step 3: Verify Authentication
|
|
105
|
-
|
|
106
|
-
```typescript
|
|
107
|
-
const status = await notebooklm({
|
|
108
|
-
operation: "auth",
|
|
109
|
-
subOperation: "status",
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
console.log(status.output);
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Expected output:
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
🔐 Authentication Status:
|
|
119
|
-
Authenticated: Yes
|
|
120
|
-
State age: 0.5 hours
|
|
121
|
-
Last auth: 2025-01-30 14:32:15
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Adding Notebooks
|
|
125
|
-
|
|
126
|
-
### Method 1: Smart Discovery (Recommended)
|
|
127
|
-
|
|
128
|
-
If you don't know the notebook content:
|
|
129
|
-
|
|
130
|
-
```typescript
|
|
131
|
-
// Step 1: Query to discover content
|
|
132
|
-
const discovery = await notebooklm({
|
|
133
|
-
operation: "query",
|
|
134
|
-
question:
|
|
135
|
-
"What is the content of this notebook? What topics are covered? Provide a complete overview briefly and concisely",
|
|
136
|
-
notebookUrl: "https://notebooklm.google.com/notebook/abc123...",
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// Step 2: Add with discovered info
|
|
140
|
-
await notebooklm({
|
|
141
|
-
operation: "library",
|
|
142
|
-
subOperation: "add",
|
|
143
|
-
url: "https://notebooklm.google.com/notebook/abc123...",
|
|
144
|
-
name: "API Documentation",
|
|
145
|
-
description: "REST API reference with authentication examples",
|
|
146
|
-
topics: ["api", "rest", "authentication"],
|
|
147
|
-
});
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Method 2: Manual Entry
|
|
151
|
-
|
|
152
|
-
If you already know the details:
|
|
153
|
-
|
|
154
|
-
```typescript
|
|
155
|
-
await notebooklm({
|
|
156
|
-
operation: "library",
|
|
157
|
-
subOperation: "add",
|
|
158
|
-
url: "https://notebooklm.google.com/notebook/abc123...",
|
|
159
|
-
name: "Project Documentation",
|
|
160
|
-
description: "Architecture and design decisions",
|
|
161
|
-
topics: ["architecture", "design", "documentation"],
|
|
162
|
-
});
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Usage Examples
|
|
166
|
-
|
|
167
|
-
### Query Active Notebook
|
|
168
|
-
|
|
169
|
-
```typescript
|
|
170
|
-
// Set active notebook first
|
|
171
|
-
await notebooklm({
|
|
172
|
-
operation: "library",
|
|
173
|
-
subOperation: "activate",
|
|
174
|
-
notebookId: "api-docs",
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
// Query without specifying notebook
|
|
178
|
-
const answer = await notebooklm({
|
|
179
|
-
operation: "query",
|
|
180
|
-
question: "What are the rate limits?",
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
console.log(answer.output);
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Query Specific Notebook
|
|
187
|
-
|
|
188
|
-
```typescript
|
|
189
|
-
const answer = await notebooklm({
|
|
190
|
-
operation: "query",
|
|
191
|
-
question: "What are the rate limits?",
|
|
192
|
-
notebookId: "api-docs",
|
|
193
|
-
});
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
### Query by URL
|
|
197
|
-
|
|
198
|
-
```typescript
|
|
199
|
-
const answer = await notebooklm({
|
|
200
|
-
operation: "query",
|
|
201
|
-
question: "What are the rate limits?",
|
|
202
|
-
notebookUrl: "https://notebooklm.google.com/notebook/abc123...",
|
|
203
|
-
});
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
### List All Notebooks
|
|
207
|
-
|
|
208
|
-
```typescript
|
|
209
|
-
const library = await notebooklm({
|
|
210
|
-
operation: "library",
|
|
211
|
-
subOperation: "list",
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
console.log(library.output);
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
### Search Notebooks
|
|
218
|
-
|
|
219
|
-
```typescript
|
|
220
|
-
const results = await notebooklm({
|
|
221
|
-
operation: "library",
|
|
222
|
-
subOperation: "search",
|
|
223
|
-
query: "authentication",
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
console.log(results.output);
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Troubleshooting
|
|
230
|
-
|
|
231
|
-
### "Not authenticated" Error
|
|
232
|
-
|
|
233
|
-
**Cause:** Authentication expired or never completed.
|
|
234
|
-
|
|
235
|
-
**Fix:**
|
|
236
|
-
|
|
237
|
-
```typescript
|
|
238
|
-
await notebooklm({
|
|
239
|
-
operation: "auth",
|
|
240
|
-
subOperation: "setup",
|
|
241
|
-
showBrowser: true,
|
|
242
|
-
});
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### "ModuleNotFoundError" Error
|
|
246
|
-
|
|
247
|
-
**Cause:** Python dependencies not installed.
|
|
248
|
-
|
|
249
|
-
**Fix:** The tool auto-installs on first use. If it fails:
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
cd ~/.opencode/skills/notebooklm
|
|
253
|
-
python -m venv .venv
|
|
254
|
-
source .venv/bin/activate # Linux/Mac
|
|
255
|
-
# or .venv\Scripts\activate # Windows
|
|
256
|
-
pip install -r requirements.txt
|
|
257
|
-
python -m patchright install chromium
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### "Notebook not found" Error
|
|
261
|
-
|
|
262
|
-
**Cause:** Notebook ID doesn't exist in library.
|
|
263
|
-
|
|
264
|
-
**Fix:**
|
|
265
|
-
|
|
266
|
-
```typescript
|
|
267
|
-
// List available notebooks
|
|
268
|
-
await notebooklm({ operation: "library", subOperation: "list" });
|
|
269
|
-
|
|
270
|
-
// Or add the notebook first
|
|
271
|
-
await notebooklm({
|
|
272
|
-
operation: "library",
|
|
273
|
-
subOperation: "add",
|
|
274
|
-
url: "...",
|
|
275
|
-
name: "...",
|
|
276
|
-
description: "...",
|
|
277
|
-
topics: ["..."],
|
|
278
|
-
});
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### Rate Limit (50 queries/day)
|
|
282
|
-
|
|
283
|
-
**Cause:** Free Google account limit reached.
|
|
284
|
-
|
|
285
|
-
**Fix:**
|
|
286
|
-
|
|
287
|
-
- Wait 24 hours
|
|
288
|
-
- Use a different Google account
|
|
289
|
-
- Upgrade to Google One AI Premium (if available)
|
|
290
|
-
|
|
291
|
-
### Browser Not Opening
|
|
292
|
-
|
|
293
|
-
**Cause:** Chrome not found or headless mode enabled.
|
|
294
|
-
|
|
295
|
-
**Fix:**
|
|
296
|
-
|
|
297
|
-
```typescript
|
|
298
|
-
// Always use showBrowser: true for auth
|
|
299
|
-
await notebooklm({
|
|
300
|
-
operation: "auth",
|
|
301
|
-
subOperation: "setup",
|
|
302
|
-
showBrowser: true, // Required!
|
|
303
|
-
});
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
## Data Locations
|
|
307
|
-
|
|
308
|
-
All data stored in `~/.opencode/skills/notebooklm/`:
|
|
309
|
-
|
|
310
|
-
```
|
|
311
|
-
~/.opencode/skills/notebooklm/
|
|
312
|
-
├── data/
|
|
313
|
-
│ ├── library.json # Your notebook library
|
|
314
|
-
│ ├── auth_info.json # Authentication metadata
|
|
315
|
-
│ └── browser_state/ # Browser cookies/session
|
|
316
|
-
│ ├── state.json
|
|
317
|
-
│ └── browser_profile/
|
|
318
|
-
├── scripts/ # Python automation scripts
|
|
319
|
-
│ ├── run.py # Virtual environment wrapper
|
|
320
|
-
│ ├── ask_question.py # Query interface
|
|
321
|
-
│ ├── notebook_manager.py # Library management
|
|
322
|
-
│ ├── auth_manager.py # Authentication
|
|
323
|
-
│ ├── browser_utils.py # Browser utilities
|
|
324
|
-
│ └── config.py # Configuration
|
|
325
|
-
├── .venv/ # Python virtual environment
|
|
326
|
-
├── requirements.txt # Python dependencies
|
|
327
|
-
└── .gitignore # Protects sensitive data
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
**Security Note:** The `data/` directory contains authentication cookies. Never commit this to git.
|
|
331
|
-
|
|
332
|
-
## Updating the Skill
|
|
333
|
-
|
|
334
|
-
To update to the latest version:
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
cd ~/.opencode/skills/notebooklm
|
|
338
|
-
git pull origin master
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
## Uninstalling
|
|
342
|
-
|
|
343
|
-
To completely remove the skill:
|
|
344
|
-
|
|
345
|
-
```bash
|
|
346
|
-
rm -rf ~/.opencode/skills/notebooklm
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
## Getting Help
|
|
350
|
-
|
|
351
|
-
- **Original Repository:** https://github.com/PleasePrompto/notebooklm-skill
|
|
352
|
-
- **NotebookLM Help:** https://support.google.com/notebooklm
|
|
353
|
-
- **OpenCodeKit Issues:** File an issue in the opencodekit-template repository
|