ytsub is a subscriptions only tui youtube client that uses the invidious api.
mpv
and yt-dlp
are optional dependencies for playing videos.
sqlite
is a required dependency. If it is not available on the system,
it can be compiled and linked by enabling
the bundled_sqlite
feature when building with cargo:
cargo build --features bundled_sqlite
```bash cargo install ytsub
cargo install ytsub --features bundled_sqlite ```
``` USAGE: ytsub [OPTIONS]
OPTIONS:
-c, --config
Default directory of the configuration files is $HOME/.config/ytsub
.
| File | Description |
|---------------|-----------------------------------------------|
| config.toml
| option, key binding and theme configurations |
| instances
| list of invidious instances |
config.toml
Path to the configuration file can be specified with the -c
flag.
config.toml
with default values```toml
database = "/home/username/.local/share/ytsub/videos.db" # Path to database file instances = "/home/username/.config/ytsub/instances" # Path to instances file tickrate = 200 # Tick rate in milliseconds requesttimeout = 5 # Request timeout in seconds highlightsymbol = "" # Symbol to highlight selected items videoplayer = "mpv" # Path to video player hide_watched = false # Hide watched videos by default
[title] fg = "Cyan" modifiers = "bold"
[header] fg = "Yellow" modifiers = "bold"
[selected] fg = "Blue" modifiers = "bold"
[focused] fg = "Magenta" modifiers = "bold"
[watched] fg = "DarkGray"
[selected_watched]
[focused_watched]
[selected_block] fg = "Magenta"
[error] fg = "Red"
[help] fg = "Green"
[keybindings] "1" = "setmodesubs" # Switch to subscriptions mode "2" = "setmodelatestvideos" # Switch to latest videos mode "j down" = "ondown" # Go one line downward "k up" = "onup" # Go one line upward "h left" = "onleft" # Switch to channels block "l right" = "onright" # Switch to videos block "g" = "selectfirst" # Jump to the first line in the list "G" = "selectlast" # Jump to the last line in the list "c" = "jumptochannel" # Jump to the channel of the selected video from latest videos mode "t" = "togglehide" # Hide/unhide watched videos "i" = "subscribe" # Enter editing mode to enter channel id or url "d" = "unsubscribe" # Open confirmation window to unsubcribe from the selected channel "/" = "searchforward" # Enter editing mode to make a forward search "?" = "searchbackward" # Enter editing mode to make a backward search "n" = "repeatlastsearch" # Search with the latest pattern and direction "N" = "repeatlastsearchopposite" # Search with the latest pattern and opposite direction "r" = "refreshchannel" # Refresh videos of the selected channel "R" = "refreshchannels" # Refresh videos of every channel "F" = "refreshfailedchannels" # Refresh videos of channels which their latest refresh was a failure "o" = "openinbrowser" # Open channel or video in browser "p" = "playvideo" # Play selected video in a video player (default: mpv) "m" = "togglewatched" # Mark/unmark selected video as watched "ctrl+h" = "toggle_help" # Toggle help window "q ctrl-c" = "quit" # Quit application ```
instances
A custom path to the instances
file can be specified with the -i
flag.
The file can either be manually created by adding instances that have api enabled or
automatically generated from the instances in https://api.invidious.io by running the app with -g
flag.
Every instance entry is separated by a line.
If the instances
file doesn't exist, every time the app is launched,
instances list will be built from https://api.invidious.io.
instances
file
https://vid.puffyan.us
https://invidio.xamh.de
https://inv.riverside.rocks
https://yt.artemislena.eu
| Key Binding | Action |
| -------------------- | -------------------------------------------- |
| h/l,left/right
| switch to channels/videos block |
| k/j,up/down
| go one line upward/downward |
| g
| go to first line |
| G
| go to last line |
| c
| jump to channel from latest videos mode |
| 1
| switch to subscriptions mode |
| 2
| switch to latest videos mode |
| o
| open channel or video in browser |
| p
| play video in mpv |
| t
| toggle hide |
| i
| subscribe |
| d
| unsubscribe |
| /
| search forward |
| ?
| search backward |
| n
| repeat last search |
| N
| repeat last search in the opposite direction |
| r
| refresh selected channel |
| R
| refresh all channels |
| F
| retry refreshing failed channels |
| m
| toggle watched/unwatched |
| ctrl+h
| toggle help window |
| q
,ctrl+c
| quit application |