ytcs

ytcs.sh fetches YouTube channel feeds, lets you browse them with fzf, and plays videos with mpv and yt-dlp.

Features

Requirements

Required:

Optional:

Installation

Clone the repository and make the script executable if needed:

git clone <repo-url>
cd ytcs
chmod +x ytcs.sh

Copy the example environment file and edit it for your setup:

cp ytcs.env.example ytcs.env

Usage

Play a single video URL:

./ytcs.sh 'https://www.youtube.com/watch?v=VIDEO_ID'

Open the interactive launcher:

./ytcs.sh

Refresh all cached feeds:

./ytcs.sh --refresh

Browse grouped by channel:

./ytcs.sh --grouped

Browse in chronological order:

./ytcs.sh --time

Browse by channel:

./ytcs.sh --subscription

Import subscriptions from CSV:

./ytcs.sh --import /path/to/subscriptions.csv

Add one subscription from a YouTube URL:

./ytcs.sh --addsub 'https://www.youtube.com/@kurzgesagt'

Show CLI help:

./ytcs.sh --help

Command-line options

If no arguments are provided, ytcs.sh opens an fzf multi-select launcher for the main actions.

Configuration

The default configuration in ytcs.env.example is:

export MAX_CHANNEL_AGE=182
export MAX_GROUPED_VIDS=10
#export watchtop=4
export LOUD=0
export YTDLP_COOKIES="firefox"
export MARK_AGE="TRUE"
export GEOMETRY1="1366x768+50%+50%"
export GEOMETRY2="1366x768"
export CLIMODE=0
export YTPOT_BASEURL="youtubepot-bgutilhttp:base_url=http://127.0.0.1:8080"
export YTUBE_API_KEY=""

Important settings:

Preview behavior

When selecting videos, fzf shows:

In --kitty mode, fzf fills the terminal and the preview pane is shown below the list.

Notes

License

MIT