Youtui - a simple TUI YouTube Music player written in Rust aiming to implement an Artist->Albums workflow for searching for music, and using discoverability principles for navigation. Inspired by https://github.com/ccgauche/ytermusic/ and cmus.
Ytmapi-rs - an asynchronous API for YouTube Music using Google's internal API, Tokio and Reqwest. Inspired by https://github.com/sigma67/ytmusicapi/.
This project is not supported or endorsed by Google.
- Quickly and easily display entire artist's discography
- Buffer upcoming songs
- Search suggestions
- Sorting and filtering
paru -S youtui
pkg install youtui
cargo install youtui
The default option is to use browser authentication, To change this to oauth authentication, a config.toml file can be added to the local youtui config directory (e.g ~/.config/youtui/ on Linux), with the value auth_type = "OAuth". Please note however that config file format is currently unstable and could change in the future.
- To run the TUI application, execute
youtui
with no arguments. - To use the API in command-line mode, execute
youtui --help
to see available commands.
- Open YouTube Music in your browser - ensure you are logged in.
- Open web developer tools (F12).
- Open Network tab and locate a POST request to
music.youtube.com
. - Copy the
Cookie
into a text file namedcookie.txt
into your local youtui config directory. Note you will need to create the directory if it does not exist. Firefox example (Right click and Copy Value):Chrome example (Select manually and paste):
- Prerequisite: A Google Cloud Console account and project are required.
- Following the YouTube Data API docs, create a new
OAuth client ID
for the application typeTVs and Limited Input devices
. - Run
youtui setup-oauth
with your Client ID and Client Secret and following the instructions. This will create a newoauth.json
file in the default configuration directory.
- If music downloads always return an error, you are able to supply a PO Token by saving it to the file
po_token.txt
into your local youtui config directory. For more information on PO Tokens and how to obtain them, see here. - Configurable keybinds can be supplied as part of your
config.toml
. Exampleconfig.toml
s have been provided in the./youtui/config/
directory. Please note, the config file format is currently unstable and could break between releases.
- A font that can render FontAwesome symbols is required.
- Youtui uses the Rodio library for playback which relies on Cpal https://github.com/rustaudio/cpal for ALSA support. The cpal readme mentions the that the ALSA development files are required which can be found in the following packages:
libasound2-dev
(Debian / Ubuntu)alsa-lib-devel
(Fedora)
- This project is under heavy development, and interfaces could change at any time. The project will use semantic versioning to indicate when interfaces have stabilised.
- Windows support (target for 0.0.1)
- Configuration folder support (target for 0.0.1)
- Implement improved download speed
- Filtering (target for 0.0.3)
- Release to AUR (target for 0.0.4)
- Remove reliance on rust nightly (target for 0.0.4)
- OAuth authentication including automatic refresh of tokens
- Seeking
- Configurable key bindings
- Logging to a file
- Dbus support for media keys
- Display album cover
- Gapless playback (blocked - requires symphonia AAC gapless support)
- Mouse support
- Offline cache
- Streaming of buffered tracks
- Display lyrics
- Theming
- Document public API
- OAuth authentication
- Implement endpoint continuations
- Implement all endpoints
- Automatically update User Agent using a library
- i18n
Feature parity with ytmusicapi
Endpoint | Implemented: Query | Implemented: Continuations |
---|---|---|
GetArtist | [x]* | |
GetAlbum | [x] | |
GetArtistAlbums | [x] | |
Search | [x] | [x] |
GetSearchSuggestions | [x] | |
GetHome | Not Planned* | |
GetAlbumBrowseId | [ ] | |
GetUser | [x] | |
GetUserPlaylists | [x] | |
GetUserVideos | [x] | |
GetSong | [ ]* | |
GetSongRelated | Not Planned* | |
GetLyrics | [x] | |
GetTasteProfile | [x] | |
SetTasteProfile | [x] | |
GetMoodCategories | [x] | |
GetMoodPlaylists | [x] | |
GetCharts | Not Planned* | |
GetWatchPlaylist (tracks): GetWatchPlaylist | [x] | [x] |
GetWatchPlaylist (lyrics_id): GetLyricsID | [x] | |
GetLibraryPlaylists | [x] | [x] |
GetLibrarySongs | [x] | [x] |
GetLibraryAlbums | [x] | [x] |
GetLibraryArtists | [x] | [x] |
GetLibraryArtistSubscriptions | [x] | [x] |
GetLibraryPodcasts | [x] | [x] |
GetLibraryChannels | [x] | [x] |
GetLikedSongs | [ ] | [ ] |
GetSavedEpisodes | [ ] | [ ] |
GetAccountInfo | [ ] | |
GetHistory | [x] | |
AddHistoryItem | [x] | |
RemoveHistoryItem | [x] | |
RateSong | [x] | |
EditSongLibraryStatus | [x] | |
RatePlaylist | [x] | |
SubscribeArtist | [x] | |
UnsubscribeArtists | [x] | |
GetPlaylistTracks | [x] | [x] |
GetPlaylistDetails | [x] | |
CreatePlaylist | [x] | |
EditPlaylist | [x] | |
DeletePlaylist | [x] | |
AddPlaylistItems | [x] | |
RemovePlaylistItems | [x] | |
GetChannel | [*] | |
GetChannelEpisodes | [*] | |
GetPodcast | [*] | [ ] |
GetEpisode | [*] | |
GetEpisodesPlaylist | Not Planned* | |
Original: GetNewEpisodes | [*] | |
GetLibraryUploadSongs | [x] | [x] |
GetLibraryUploadArtists | [x] | [x] |
GetLibraryUploadAlbums | [x] | [x] |
GetLibraryUploadArtist | [x] | [x] |
GetLibraryUploadAlbum | [x] | |
UploadSong | [x] | |
DeleteUploadEntity | [x] |
* GetArtist is partially implemented only
- only returns albums and songs
* Only the tracking url from GetSong is implemented - as GetSongTrackingUrl. Any additional features for GetSong are not currently planned - recommend taking a look at rusty_ytdl
library for these features.
* Note, significantly dynamic pages, such as GetHome and GetSongRelated are not currently planned.
* GetEpisodesPlaylist is not implemented - it seems the only use case is to get the New Episodes playlist, which has been implemented instead as GetNewEpisodes.
See the wiki for additional information https://github.com/nick42d/youtui/wiki