Tools
Yt Summarizer
Openclaw plugin: transcribes YouTube videos via CloakBrowser and generates German summaries
Install
npm install
npm
Configuration Example
{
"plugins": {
"enabled": true,
"load": {
"paths": ["/path/to/yt-summarizer"]
},
"entries": {
"youtube-summarizer": {
"enabled": true,
"config": {
"cloakBrowserUrl": "http://localhost:9222",
"whisperUrl": "http://localhost:8000"
}
}
}
}
}
README
# yt-summarizer
An [Openclaw](https://openclaw.ai) plugin that opens YouTube videos via **CloakBrowser** (stealth Chromium), extracts the transcript (YouTube subtitles first, Whisper as fallback), and returns the full text for a structured German summary.
## What it does
1. Connects to a running CloakBrowser instance over CDP
2. Navigates to the YouTube URL in a stealth Chromium session
3. Extracts the transcript — two strategies in order:
- **youtube-json** — parses `ytInitialData` directly (fast, no extra clicks)
- **youtube-dom** — clicks the transcript panel in the UI (fallback)
4. If no subtitles exist, downloads audio via `yt-dlp` and transcribes with Whisper (local server or OpenAI API)
5. Returns the title + transcript; Openclaw's LLM produces the German summary
### Example output (after Openclaw summarizes)
```
**Hauptthema**: …
**Kernaussagen**:
- …
**Fazit**: …
```
## Requirements
| Dependency | Purpose |
|---|---|
| [Openclaw](https://openclaw.ai) ≥ 2026.1.0 | Plugin host |
| [CloakBrowser](https://cloakbrowser.com) | Stealth Chromium CDP server |
| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Audio download (Whisper fallback only) |
| Local Whisper server **or** OpenAI API key | Transcription fallback only |
### Local Whisper server (recommended — no API key needed)
```bash
docker run -d -p 8000:8000 fedirz/faster-whisper-server:latest-cpu
```
## Installation
### 1. Install the plugin in Openclaw
Add to your Openclaw config (e.g. `~/.openclaw/config.json`):
```json
{
"plugins": {
"enabled": true,
"load": {
"paths": ["/path/to/yt-summarizer"]
},
"entries": {
"youtube-summarizer": {
"enabled": true,
"config": {
"cloakBrowserUrl": "http://localhost:9222",
"whisperUrl": "http://localhost:8000"
}
}
}
}
}
```
To use OpenAI Whisper instead of a local server, replace `whisperUrl` with `openaiApiKey`:
```json
"config": {
"cloakBrowserUrl": "http://localhost:9222",
"openaiApiKey": "sk-…"
}
```
### 2. Enable the optional tool
The `youtube_summarize` tool is optional (opt-in). Enable it:
```json
{
"tools": {
"allow": ["youtube_summarize"]
}
}
```
### 3. Start CloakBrowser
```bash
cloakbrowser --cdp-port 9222
```
## Usage
Once the plugin is loaded and the tool is enabled, ask Openclaw:
```
Summarize https://www.youtube.com/watch?v=dQw4w9WgXcQ
```
or call the tool directly:
```
youtube_summarize("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
```
## Configuration reference
| Field | Type | Default | Description |
|---|---|---|---|
| `cloakBrowserUrl` | string | `http://localhost:9222` | CDP URL of the CloakBrowser instance |
| `whisperUrl` | string | — | URL of a local Whisper server (OpenAI-compatible) |
| `openaiApiKey` | string | — | OpenAI API key (used only when `whisperUrl` is not set) |
`whisperUrl` takes precedence over `openaiApiKey`. If neither is set and the video has no subtitles, the tool returns an error.
## Building from source
```bash
npm install
npm run build # compiles TypeScript → dist/
```
The built plugin is in `dist/`. The `openclaw.plugin.json` manifest at the project root is read by Openclaw at load time.
### Docker
```bash
docker build -t yt-summarizer .
```
## How transcript extraction works
```
YouTube page loaded
│
▼
ytInitialData present?
┌─────┴──────┐
Yes No
│ │
Parse JSON Open transcript panel via DOM
(fast) (UI interaction fallback)
│
▼
Transcript found?
┌─────┴──────┐
Yes No
│ │
Return text Whisper fallback
(yt-dlp + local/OpenAI)
```
## License
MIT
tools
Comments
Sign in to leave a comment