YouTube transcript & AI-powered summary extension for pi.
pi-youtube.mp4
pi install npm:pi-youtube| Command | Description |
|---|---|
/youtube <url> |
Fetch transcript & trigger LLM summarisation |
/youtube-config |
View current save-directory settings |
/youtube-config set transcriptDir ~/path |
Change transcript output directory |
/youtube-config set summaryDir ~/path |
Change summary output directory |
- Extracts the YouTube video ID from the URL via regex
- Calls YouTube's InnerTube API (ANDROID client context) to get video metadata + caption track URLs
- Fetches the timedtext transcript in JSON format
- Saves a timestamped Markdown transcript file
- Sends a structured summarisation prompt to the LLM
- The LLM produces a comprehensive summary and writes it to disk
Zero dependencies — uses only built-in fetch.
Default save locations (edit ~/.pi/youtube-config.json):
{
"transcriptDir": "~/YouTube/transcripts",
"summaryDir": "~/YouTube/summaries"
}Both paths support ~ home-directory expansion.
MIT