Skip to content

Repository files navigation

A Go CLI tool that fetches YouTube video transcripts
Multiple languages, multiple formats, zero dependencies

Architecture · Development · Guidelines · Testing · PR Workflow


ytt fetches transcripts from YouTube videos. Give it a video ID and it pulls the caption track, auto-generated or human-written, and outputs clean text. No browser, no clicking, no copy-paste.


Quick Start

git clone https://github.com/mgratzer/ytt.git
cd ytt
make build
./bin/ytt VIDEO_ID

Features

  • Fetch transcripts for any YouTube video with available captions
  • Support for multiple languages with fallback (--languages en de fr)
  • Filter by transcript type (--exclude-generated, --exclude-manually-created)
  • Output formats: pretty (default), json, text, srt, webvtt
  • Translate transcripts to any available language (--translate)
  • List all available transcripts for a video (--list-transcripts)
  • HTTP/HTTPS proxy support (--http-proxy, --https-proxy)

Usage

# Fetch transcript (defaults to English, pretty-printed JSON)
ytt VIDEO_ID

# Fetch in a specific format
ytt VIDEO_ID --format text
ytt VIDEO_ID --format srt
ytt VIDEO_ID --format json

# Specify languages (with fallback order)
ytt VIDEO_ID --languages de en

# List available transcripts
ytt VIDEO_ID --list-transcripts

# Translate to another language
ytt VIDEO_ID --translate es

Development

make install   # Sync dependencies
make run       # Run locally
make build     # Build binary
make test      # Run tests
make check     # Lint + tests

See Development Guide for full setup instructions.

Documentation

Document Purpose
Architecture System design and data flow
Development Setup and daily workflow
Coding Guidelines Code style and conventions
Testing Test commands and patterns
PR Workflow Commits, PRs, and review process

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by YouTube or Google. It accesses publicly available caption data for personal and educational use. Use responsibly and in accordance with YouTube's Terms of Service.

License

MIT

About

A Go CLI tool that fetches YouTube video transcripts

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages