ytx-cli-0.1.0 is not a library.
ytx
Extract YouTube transcripts from the terminal. Pipe-friendly, no API key needed.
Why ytx?
- Stdout by default -- transcripts go straight to your terminal, ready to pipe anywhere
- No API key, no setup -- scrapes what it needs from the video page automatically
- Built for LLM workflows -- feed any YouTube video into
llm,fabric,mods, or your own tools in one command
Install
Or build from source:
&&
Quick Start
Pipe It Anywhere
This is where ytx shines. It's a Unix building block -- grab a transcript and send it wherever you want.
# Search a lecture for a specific concept
|
# Summarize a video with an LLM
|
# Extract action items with fabric
|
# Get a word count
|
# Save to a file
# Copy to clipboard (macOS)
|
# Translate via LLM
|
# Timestamped transcript to file
Options
| Flag | Description | Default |
|---|---|---|
-t, --timestamps |
Prepend [MM:SS] or [HH:MM:SS] timestamps |
off |
-l, --lang <CODE> |
Caption language code | en |
-o, --output <FILE> |
Write to file instead of stdout | stdout |
How It Works
- Fetches the YouTube video page and extracts the InnerTube API key
- Calls the InnerTube player API (ANDROID client) to get caption URLs -- no PoToken needed
- Fetches and parses the caption XML (supports both srv3 and legacy formats)
No API key required. No browser automation. Just HTTP requests.
Supported URL Formats
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://www.youtube.com/shorts/VIDEO_ID- Bare 11-character video IDs
License
MIT