Expand description
yt-tui is a terminal YouTube player: search via yt-dlp, playback
via a single long-lived mpv instance controlled over its IPC socket,
interface with ratatui, all orchestrated asynchronously with
tokio.
This crate is published primarily as the yt-tui binary (see
src/main.rs and docs/USAGE.md in the repository for the controls
and how to run it). The modules below are also exposed as a library in
case you want to reuse the YouTube-search / mpv-IPC / history plumbing
for a different frontend.
§Modules
yt— searches YouTube viayt-dlpand streams results back.mpv— controls a singlempvinstance over its JSON IPC socket.history— persists watched/queued videos tohistory.toml.app— ties the above together into theapp::Appstate machine that drives the TUI.ui— rendersapp::App’s state withratatui.
§External dependencies
This crate shells out to two binaries that must be installed and on
the PATH:
yt-dlp— search and stream resolution.mpv— audio/video playback, controlled via its JSON IPC protocol.
See docs/USAGE.md in the repository for installation instructions.
Modules§
- app
- Central application state: search results, history, the mpv-backed playback queue, and the glue between them.
- history
- Persists watched/queued videos to
history.tomlso they can be browsed again without re-searching YouTube. - mpv
- Controls a single
mpvinstance over its JSON IPC socket. - ui
- Renders
crate::app::App’s state to the terminal withratatui. - yt
- Searches YouTube via
yt-dlpand streams results back incrementally.