Back to Hub

yt2library: A Rust TUI for YouTube Downloads

The problem

I wanted a terminal-native way to search YouTube and download audio or video without juggling browser extensions. yt2library wraps yt-dlp behind a keyboard-driven TUI written in Rust.

How it works

  • Search and browse results with duration, views, and channel metadata
  • Download as MP3 or MP4 to a custom path (toggle with F on the results screen)
  • Progress display during transfers (speed, size, ETA)
  • Optional browser cookie login for age-restricted content (Ctrl+L)
  • install.sh that handles Rust, Python, and yt-dlp setup across Linux, macOS, and WSL

Rust owns the interactive UI (ratatui + crossterm) and orchestration; yt-dlp does extraction and format conversion. That split keeps the tool responsive while leaning on a downloader that tracks YouTube layout changes better than I could alone.

What I learned

Terminal UIs are pleasant until something external breaks. When yt-dlp fails after a YouTube change, the error surface is the whole app - so clear messages and a documented install path matter as much as the search UI.

Disclosure: This repo was developed with AI assistance - noted upfront in the README because I think that transparency belongs in portfolio work too.

What I'd improve next

Playlist support, download queue persistence, and tighter error messages when yt-dlp breaks after a YouTube layout change.

Source code