Fetch YouTube transcripts and search for videos from the command line.
uv tool install git+https://github.com/PeachlifeAB/ytc.gitytc https://www.youtube.com/watch?v=dQw4w9WgXcQ
ytc dQw4w9WgXcQ
cat urls.txt | ytc
ytc search lex fridman sam altman
ytc search -q lex fridman sam altman
ytc search 'SOLID vs Clean Code 2026' --get-first-transcript
ytc search 'SOLID vs Clean Code 2026' --get-transcripts 3
ytc channels search fireship
ytc channels add UCsBjURrPoezykLs9EqgamOA
ytc channels fetch UCsBjURrPoezykLs9EqgamOA -n 5Any YouTube URL format works — youtu.be/, /shorts/, /live/, /embed/.
--get-transcripts accepts 1-3 and defaults to 1.
--json on search and transcript emits newline-delimited JSON; channels fetch always does. An unavailable transcript still yields a record, with "transcript": null and an "error" field.
ytc search fireship --json | jq -r '.url'On first run, ytc adds a noglob alias to your shell config so you can paste YouTube URLs unquoted without zsh/fish glob-expanding the ? character.
- youtube-transcript-api — transcript fetching
- yt-dlp — YouTube search and channel data