pi-youtube
v1.1.0
Published
Fetch YouTube video transcripts and AI-powered summaries — slash command for pi. Customise the summary prompt.
Readme
pi-youtube
YouTube transcript & AI-powered summary extension for pi.
https://github.com/user-attachments/assets/721c14bd-6d87-40d0-8004-a6dbf0657b8b
Install
pi install npm:pi-youtubeCommands
| 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 |
How it works
- 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.
Config
Default save locations (edit ~/.pi/youtube-config.json):
{
"transcriptDir": "~/YouTube/transcripts",
"summaryDir": "~/YouTube/summaries"
}Both paths support ~ home-directory expansion.
License
MIT
