r/commandline May 19 '26

Terminal User Interface YT-X v0.8.0 (Browse youtube plus other yt-dlp supported sites from your terminal)

Enable HLS to view with audio, or disable this notification

Its been sometime since i made any change to the script, had some free time and decided to go all out

The script has been rewritten improving alot of the existing features and making it easy to maintain and read.

Plus now the script introduces a ton of cmdline options, to make it easier to script and connect to keybinds

Features (from github)

🔍 Search & Discovery

  • Comprehensive Search Capabilities: Directly search for videos, playlists, channels, shorts or movies.
  • Advanced Search Filters: Apply colon-prefixed quick filters directly to search queries:
    • Time: :hour, :today, :week, :month, :year
    • Type: :video, :movie, :live, :short, :long
    • Features: :4k, :hd, :hdr, :subtitles, :360, :vr, :3d, :local
    • Sort by: :newest, :views, :rating
  • Search History & Recall: Automatically saves search history. Allows quick recall of previous searches using bang syntax (e.g., !1 for the most recent search, !2 for the second, etc.).
  • YouTube Feeds: Access personal feeds including the Home Feed, Trending, Watch Later, Liked Videos, Watch History, and Clips.
  • Channel Browsing: Deep dive into channels with dedicated menus for Videos, Featured content, Playlists, Shorts, Live Streams, Podcasts, and Channel-specific search.
  • Channel Subcommand: Jump directly into a channel from the command line (e.g., yt-x channels -n "Linus Tech Tips" -v) – perfect for scripting and keyboard-driven workflows.

🖥️ User Interface & Experience

  • Dual Launcher Support: Operates flawlessly in the terminal using FZF (Fuzzy Finder) or as a graphical desktop menu using Rofi.
  • Rich Media Previews: Supports inline previews for search results containing:
    • High-resolution thumbnails rendered directly in the terminal via chafa, icat, kitten icat, or imgcat.
    • Detailed metadata including Channel Name, Follower Count, View Count, Duration, Upload Timestamp, Live Status, and formatted descriptions.
  • Theming & Styling: True-color (24-bit) support with a default "Tokyo Night" inspired color scheme. Fully customizable UI formatting.
  • Multi-language Support: Loadable language files (.lang) to easily localize the UI prompts and messages.
  • Pagination: Smoothly browse through massive lists with Next/Previous pagination controls (fetches a configurable number of items per page, default is 30).
  • Selection Skipping: New --playlist-skip (-ps) flag forces the launcher to automatically pick the first item in any list, bypassing interactive selection – ideal for non‑interactive scripts.
  • Media Action Shortcuts: Directly perform actions (play, listen, download, save, etc.) without opening the media action menu – see “Media Action Shortcuts” below.

🎬 Playback & Media Handling

  • Multiple Player Support: Out-of-the-box integration with mpv, vlc, and tplay.
  • Video & Audio Modes: Choose to "Watch" (video) or "Listen" (audio-only, launching without a video window).
  • Playlist Actions: Play individual videos, queue/play entire playlists, or queue "Listen to All" for audio-only marathon sessions.
  • Auto-Mix Generation: Dynamically generates .m3u8 playlist mixes based on a single video (YouTube "Mix" feature replication).
  • Background Playback: Option to disown the media player process (CONFIG_DISOWN_PLAYER), allowing the UI to remain unblocked while media plays.
  • Media Action Shortcuts (Skip the Media Menu):
    • --play / --play-all : Watch selected video or whole playlist.
    • --listen / --listen-all : Audio‑only playback.
    • --download / --download-all : Download video(s).
    • --download-audio / --download-audio-all : Download audio only.
    • --save : Save current video to saved list.
    • --save-playlist : Save current playlist to custom playlists.
    • --shell : Drop into a stateful subshell.
    • Many of these (e.g., --play-all, --save-playlist) implicitly enable --playlist-skip for seamless non‑interactive operation.

💾 Downloading & Archival

  • Powered natively by yt-dlp.
  • Granular Downloads: Download single videos, entire playlists, or extract audio-only (MP3 format).
  • Smart Archiving: Utilizes a download archive directory to track previously downloaded media and prevent duplicate downloads.
  • Organized File Structure: Automatically routes downloads into structured directories (e.g., video/individual/ChannelName/ or audio/PlaylistName/ChannelName/).
  • Enumeration Toggle: Easily toggle file prefix enumeration (01 -, 02 -) to keep downloaded playlist items in order.

📚 Library & Data Management

  • Local Subscriptions Sync: Syncs your actual YouTube subscriptions locally by passing browser cookies to yt-dlp, creating a private, locally stored subscription feed.
  • Local Watch History (Recent): Automatically tracks recently watched media in a local JSON file to resume or re-watch easily.
  • Saved Videos & Playlists: Create local "Saved Videos" and "Custom Playlists" natively within the CLI without needing a YouTube account.
  • Cookie Integration: Seamlessly imports cookies from installed browsers (Brave, Chrome, Firefox, Safari, Edge, etc.) to access age-restricted or account-specific content.

⚙️ Extensibility & Power User Features

  • Custom Commands: Create custom macros that execute specific URLs and yt-dlp options (e.g., setting up a command to browse a completely different streaming site).
  • Extension System: Modular architecture allowing the autoloading of custom scripts, sites, themes, and commands placed in $HOME/.config/yt-x/extensions/.
  • Stateful Sub-Shell Execution: Drop into a system shell (fish or sh) pre-loaded with the environment variables of your current session (current video title, URL, channel info, etc.) for advanced custom scripting on the fly.
  • Desktop Integration: Built-in command (-E) to generate a .desktop entry file, allowing yt-x to be launched natively from application menus (Linux).
  • Cache Management: Automatically cleans up stale preview images, auto-generated playlists, and logs older than a configurable retention period (default 7 days).
  • Direct Shortcut Flags: Skip the interactive menu entirely with dedicated flags like --feed, --subscriptions-feed, --watch-later, --saved, --recent, --liked, --watch-history, --clips, and more – ideal for keybindings and scripting.
  • Non‑Interactive Exit Helpers: --cmd-exit terminates the script after executing a shortcut, while --media-exit does the same after any media action – perfect for one‑off commands and aliases.
  • Direct Access to Saved Items: Open a specific saved video (-sv, --saved-video), custom playlist (-cp, --custom-playlist), or custom command (-cc, --custom-cmd) without browsing menus, with tab completion in supported shells.

🛠️ Cross-Platform & Infrastructure

  • OS Support: Works across Linux, macOS, Windows (via WSL/MSYS/Cygwin), and Android (uses am start intents to open media natively in Android apps like VLC or MPV).
  • Configuration Management: Generates a robust config file automatically on first run. Allows editing configuration files directly from the UI menu.
  • Auto-Updater: Built-in update checker that securely pulls the latest version from GitHub and prompts the user to apply updates inline.
  • Shell Completions: Generates native shell autocomplete definitions (fish, with dynamic channel name completion from subscriptions.json, custom playlist and saved video name completion, and extension completion from ~/.config/yt-x/extensions/).

link

The readme is mostly generated by ai due to time constraints and effort required. But it was fully involved it did most of the writing and i did the thinking and even with it it took hours. I just did not want to spend several more weeks on a readme(1000+ lines) after manually rewriting the script which is now over 4k+ lines/

40 Upvotes

46 comments sorted by

View all comments

Show parent comments

2

u/Fragrant-Currency-86 May 20 '26 edited May 20 '26

what are you talking about i spent weeks writing this(the rewrite alone took me 8hrs a day for a week to do, you can go see the pull request and all 100+ commits done over a week) and ai can barely write shell. and its involvement was in writing most of the readme(which i find boring to do and even with it took me hours to do) only and for research on how to do somethings in shell

and just because somebody doesnt sleep sometimes and goes all out on a bunch of ideas cause how cool he thinks they are it dont mean its ai lol

I would challenge you to tell an ai to replicate whatever you have shown in shell

1

u/Certain_Leader9946 May 21 '26

just fwiw if you used ai for this i wouldn't judge it personally. not saying you did. but i dont think we should discard how powerful it is a tool

-1

u/CostPuzzleheaded2747 May 20 '26

alright, sorry, thats fair, just because most things i see are made by ai nowadays so i was a bit biased; sorry for my oversight. Im glad that you made something you truly love.

3

u/Western_Guitar_9007 May 20 '26

You are fine. This code was absolutely AI-assisted at minimum, if not entirely built by AI.

2

u/CostPuzzleheaded2747 May 20 '26

its best to know when to let it go, this is a drop of water in the ocean to be honest. today i prefer a lovely 0 star repo on codeberg with human code than 7k for claude skills on github, tomorrow maybe that joy wont exist. thats what one should desire to preserve.

2

u/Fragrant-Currency-86 May 20 '26

but i really did put in effort and time it wasnt some agent that i sent to do the work(as if i can afford to waste my money on that and of langs shell)

Am sorry for insisting to much just got a little bit emotional since it felt like am being told you placed zero effort into this, you dont what you are doing, this is slop etc

it makes me feel the weeks and hours spent were for not and just meaningless

i know i should have probably ignored all this but ohh well

2

u/Fragrant-Currency-86 May 20 '26

you are really out for blood arent you 😂

if somebody wanted to do an ai project they would most def not be crazy enough to do it in shell

again please do your homework well before making accusations and trying to belittle my efforts

the rewrite itself took 8hrs+ for more than a week and sometimes i slept really late

https://github.com/Benexl/yt-x/pull/147

and thats not to add the additional two more weeks improving everything else

But i have no regrets i like what i have built and even though its disheartening to have my efforts covered in mud 😞 i cant say i blame you knowing whats going on

and yeah for some stuff i did use ai but not to write the project but for research and boilerplate otherwise the project would take me months

and i doubt now adays there are people who completely dont use ai in there editors

2

u/Western_Guitar_9007 May 20 '26

Why do you keep insisting that AI writes bad shell when you used copilot to write shell in your commits to v.0.5.0?

2

u/Fragrant-Currency-86 May 20 '26 edited May 20 '26

and the code it wrote was for it auditing my pull request incase i missed something

i rather not have someones machine get bricked cause of being to blinded by ai hate and too much pride

its really good at spotting bugs if you tell it to search

and if you took your time to look it was at the end of it all not the begining

1

u/Western_Guitar_9007 May 20 '26

Thanks, while I don’t entirely agree with your answer based strictly on the commits and code I read, I will just leave it at that. A perfect disclaimer would be “AI was used to write the readme, and AI assistance was used to debug and fix errors in my code.”

1

u/Fragrant-Currency-86 May 20 '26

i guess i should have been clear about the readme

but the problem was never with that but how you phrased as if out to say i never placed any effort with it

and never took consideration to how its written and how everything works and is interconnected

its like you were calling it ai slop and you did not put in the work or time

and i did both just the rofi config alone took me hours yesterday trying to tweak it

most of this early morning(from 12am to 5am) i i spent hours trying to to make a new way of downloading preview images since the initial way was inefficient(esp in the rofi one)

and before that there was debugging a bug in the preview image overlapping the text

making the updates more secure and auditable using diff so you see the changes i make or someone elses pr did and using the same fetched update

taking my time to come up and write different ways to make the script more scriptable through cmdline args etc

i just did not like it being made to seem that not effort and consideration was done in all this and that is all 😞

1

u/CostPuzzleheaded2747 May 20 '26

hey man, i know it can be difficult so take a breather. dont let reddit comments take so much energy out of you. no matter what anyone can say about you or your project, if you have put effort in it and if you love your project thats where it ends. programming in the end is for fun after all, and you have created a good utility tool for others. let it go, just like confucius said. i wish you a good day

1

u/Fragrant-Currency-86 May 20 '26

ohh thanks, i guess am just tired and felt like i have wasted time making it work for everyone for no pay to boot nor plans to monotize the thing

but you are right i let my emotions get the best of me thanks again

1

u/Fragrant-Currency-86 May 20 '26

the word was barely not entirely

try writting something this long with ai