惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threat Research - Cisco Blogs
G
GRAHAM CLULEY
The Hacker News
The Hacker News
S
Securelist
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
H
Hacker News: Front Page
P
Privacy & Cybersecurity Law Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News | PayPal Newsroom
Project Zero
Project Zero
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
The Cloudflare Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
The Last Watchdog
The Last Watchdog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
S
Schneier on Security
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
月光博客
月光博客
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
IT之家
IT之家
PCI Perspectives
PCI Perspectives
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
F
Fortinet All Blogs
U
Unit 42
Help Net Security
Help Net Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
MongoDB | Blog
MongoDB | Blog
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店 GitHub - EdoardoBambini/Agent-Armor-Iaga: AI agents are getting tool access — shell, file system, databases, APIs, secrets. But **nobody is governing what they actually do with it**. Frameworks like LangChain, CrewAI, AutoGen, and Claude Code give agents the power to execute. Agent Armor gives you the power to control, audit, and approve every single action before it happens. HN Vibes — Week 15, Apr 7–13 2026 GitHub - chojs23/ec: Easy terminal-native 3-way git mergetool vim-like workflow GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - JakOb-dotcom/cloud-sandbox-security-analysis: Technical analysis and Proof of Concept (PoC) regarding environment variable exfiltration in containerized cloud sandboxes via side-channel data leaks. Springboards - Flint Alpha Show HN: A simpler coding agent harness GitHub - audiodude/sudomake-friends GitHub - 256thFission/mini-mythos: OSS clone of Anthropic’s Mythos harness to locate C/C++ memory vulnerabilities Show HN: OpenParallax: OS-level privilege separation for AI agent execution Hacker News Sorted - Chrome 应用商店 Show HN: How to Install Docker on Ubuntu 24.04 LTS: Complete 2026 Guide GitHub - himanshudongre/smriti GitHub - sverrirsig/claude-control: macOS desktop dashboard for monitoring and managing multiple Claude Code sessions GitHub - ory/dockertest: Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work. Chiral - Chrome 应用商店 Show HN: Two Claudes collaborating through shared memory on a $100 mini-PC GitHub - pmichaillat/latex-cv: Minimalist LaTeX template for academic CVs GitHub - oguzbilgic/posse: A web UI for Anthropic Managed Agents. GitHub - sshiraz/depsly: Dependency risk analysis tool for npm packages ABI Add safari/agent-harness — Safari browser automation via safari-mcp by achiya-automation · Pull Request #212 · HKUDS/CLI-Anything GitHub - Halfblood-Prince/trustcheck: Verify PyPI package attestations and improve Python supply-chain security GitHub - oguzbilgic/kern-ai: Agents that do the work and show it. GitHub - bruits/satteri: High-performance Markdown and MDX processing for the JavaScript ecosystem GitHub - tylergibbs1/feedstock: High-performance web crawler and scraper for TypeScript, powered by Bun and Playwright GitHub - Grimm67123/grimmbot: The self-improving sandboxed and open-source AI agent. With persistent memory and scheduling. GitHub - whitevanillaskies/whitebloom: Local whiteboard that blooms. GitHub - hwdsl2/docker-whisper: Docker image for a self-hosted Whisper speech-to-text server with speaker diarization and OpenAI-compatible transcription and translation APIs. Powered by faster-whisper. Supports all Whisper models, NVIDIA GPU (CUDA) acceleration, JSON/SRT/VTT output, SSE streaming, offline mode, and multi-arch (amd64, arm64). GitHub - yisding/reviewwiggum GitHub - MarwanAlsoltany/serrors: Structured errors for Go: sentinel hierarchies, typed data, custom formatting, and slog integration. GitHub - soatok/age-php GitHub - Luthiraa/markitme GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits GitHub - tombedor/excalicharts GitHub - wh1le/excalidraw-edit: Open and edit .excalidraw files from the terminal. Offline, auto-saves to disk. MalExt Sentry - Malicious Extension Scanner - Chrome 应用商店 GitHub - syi0808/asciianimesvg: Generate animated ASCII art SVGs from text. CLI, Rust library, WASM, and web editor. GitHub - zaina-ml/ml_forge: A visual-based graph node editor for training computer vision models. GitHub - anakin87/llm-rl-environments-lil-course: 🌱 A little course on Reinforcement Learning Environments for evaluating and training Language Models GitHub - takaakit/superpowers-uml: Superpowers-UML modifies Superpowers to ensure a software development workflow in which AI agents design through UML modeling. AdriByte Studio - Sviluppo Web e Soluzioni Digitali GitHub - chouligi/angel-copilot: Your personalized Angel Investment Advisor Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 GitHub - agenteractai/lodmem: Level Of Detail Context Management for Agents GitHub - ostefani/subnetlens: A fast, concurrent network scanner with a TUI and plain-text CLI, built in Go. It discovers live hosts on your network, scans their open ports, resolves hostnames, and fingerprints operating systems—delivered. Cyber Pulse: Agentic Intel - Apps on Google Play Whisper API: Self-Hostable Speech to Text Transcription The Agent-Web Protocol Stack: A Research Thesis GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Show HN: Provepy – A Python decorator that proves your code using Lean and LLMs Show HN: Pardonned.com – A searchable database of US Pardons GitHub - patrickdappollonio/dux: Dux is a terminal UI that lets you run multiple AI coding agents side by side, each in its own git worktree, with full companion terminals, macros, commit generation, and a command palette that knows more tricks than you do. kMC Crystal Simulator Show HN: HyperFlow – A self-improving agent framework built on LangGraph GitHub - stef41/vibescore: 🎵 Grade your vibe-coded project. One command, instant letter grade across security, quality, dependencies, and testing. GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. imgur.com GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. GitHub - nowork-studio/toprank: Open-source Claude Code skills for SEO, SEM, Google Ads GitHub - tacomanator/sash: Lightweight macOS menu bar app for reliably cycling through windows of the current application. Appents | Social Media Management for Product-First Teams GitHub - pnhoang/youtube-spam-blocker: Automatically detects and hides spam messages in YouTube Live chat. Set rate limits, keyword filters, and block repeat offenders. GitHub - decisionnode/DecisionNode: CLI + Local MCP - A shared structured memory store across Claude Code, Cursor, Windsurf, Antigravity, and every MCP client. Semantically queryable. GitHub - AvaCodeSolutions/django-email-learning: An open source Django app for creating email-based learning platforms with IMAP integration and React frontend components. The $100K Gap in Kubernetes Security Tooling Function Calling Harness: From 6.75% to 100%
GitHub - Benexl/yt-x: Browse youtube plus other yt-dlp supported sites from your terminal
Benex254 · 2026-05-20 · via Hacker News: Show HN
recording_20260509_095830.mp4
View Demos & Previews

Full Demo:

yt-x-full-github-demo.webm

Riced/Customized Previews:

image image image image image image image image image image image image image image image image image image image

📖 Table of Contents

🚀 Features

🔍 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/).

📥 Installation

Linux macOS Windows Android Arch Linux NixOS

⚙️ Prerequisites

Before installing, ensure your system meets the following requirements.

Required:

  • yt-dlp - The core engine for fetching media data.
  • fzf - The primary terminal UI engine.
  • jq - For robust JSON parsing.
  • curl - Used for fetching script updates and preview images.
  • sh - Any POSIX-compliant shell (Bash, Zsh, Dash, etc.).
  • Nerd Font - A Nerd Font is heavily required to render the UI icons correctly.

Optional (But Highly Recommended):

  • Media Players: mpv (default), vlc, or tplay (for playback).
  • Terminal Image Viewers (For Previews):
    • chafa (Cross-terminal, highly recommended)
    • icat (Built natively into Kitty and Ghostty)
    • imgcat (For iTerm2/WezTerm)
  • Alternate GUI: rofi (For running yt-x as a desktop application menu).
  • UI Enhancements: gum (For improved, polished prompts and loaders).

🌍 Universal Installation (macOS, Linux, Android)

The quickest and most universal way to install yt-x is to download the standalone script directly into your local binary directory.

Ensure ~/.local/bin exists and is added to your system's $PATH.

# Download the script and make it executable
curl -sL "https://raw.githubusercontent.com/Benexl/yt-x/refs/heads/master/yt-x" -o ~/.local/bin/yt-x
chmod +x ~/.local/bin/yt-x

To uninstall later, simply run: rm ~/.local/bin/yt-x


📦 Platform-Specific Instructions

🐧 Arch Linux (AUR)

Arch Linux users can install the bleeding-edge version directly from the Arch User Repository using their preferred AUR helper:

# Using yay
yay -S yt-x-git

# Using paru
paru -S yt-x-git
❄️ Nix / NixOS

You can install yt-x either imperatively or declaratively using Nix flakes.

1. Imperative / Direct installation:

nix profile install github:Benexl/yt-x

2. Declarative / Config-based: First, add the repository to your flake.nix inputs:

inputs = {
  nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  yt-x = {
    url = "github:Benexl/yt-x";
    inputs.nixpkgs.follows = "nixpkgs";
  };
}
  • For system-wide installation (in configuration.nix):

    environment.systemPackages = [ inputs.yt-x.packages."${system}".default ];
  • For user-level installation (via Home Manager in home.nix): nix home.packages = [ inputs.yt-x.packages."${system}".default ];

🪟 Windows (Git Bash, Cygwin) & WSL

yt-x is fully compatible with Windows, provided you are running it inside a compatible terminal environment.

  • Environment Detection: yt-x treats WSL natively as a Linux environment. However, if you are using Git Bash or MSYS/Cygwin, it correctly detects and treats them as Windows terminals.
  • Launcher: You must use fzf as your launcher on Windows terminals. (rofi is specifically designed for Linux desktop environments).
  • PATH Requirements: Ensure that Windows executables (like yt-dlp.exe, jq.exe, fzf.exe, and a media player like mpv.exe or vlc.exe) are accessible within your terminal's $PATH.
  • URL Opening: The script automatically supports Windows URL launching. It utilizes wslview (for WSL setups) or cmd.exe /C start (for Git Bash/Cygwin) to open links smoothly in your native Windows browser.

Usage

yt-x is designed to be highly flexible. You can launch it in fully interactive mode, pass direct search arguments, shortcut‑jump to menus, or integrate it into desktop environments using custom UI launchers.

Synopsis

yt-x [OPTIONS]
yt-x channels [CHANNEL OPTIONS]
yt-x completions [--fish | --bash | --zsh | --help]

Quick Start

To launch the interactive terminal interface with your default settings, simply run:

yt-x

Command‑Line Options

🔍 Search & Discovery

  • -s, --search <term> : Immediately execute a video search and bypass the main menu.
  • -sp, --search-playlist <term> : Immediately execute a playlist search.
  • -sc, --search-channel <term> : Immediately execute a channel search.
  • -ss, --search-short <term> : Immediately execute a short search.
  • -sm, --search-movie <term> : Immediately execute a movie search.

🔖 Access saved items

  • -cp, --custom-playlist <name> : Open a specific custom playlist by its saved name
  • -cc, --custom-cmd <name> : Execute a specific custom command by its saved name
  • -sv, --saved-video <title> : Open a specific saved video by its title

🖥️ UI & Interface

  • -l, --launcher <fzf|rofi> : Override the default menu launcher.
  • -i, --preview : Enable the media preview window (images and metadata).
  • -I, --no-preview : Disable the media preview window.
  • -x, --extension <ext> : Load a specific extension file (absolute path or relative to ~/.config/yt-x/extensions/; supports fish tab complete).
  • -ce, --cmd-exit : Exit after shortcut menu command‑line options (useful for scripting).
  • -ps, --playlist-skip : Skip the item selection menu and automatically pick the first entry in a playlist.
  • -me, --media-exit : Exit after performing a media action (watch, listen, download, etc.).

🎬 Media Action Shortcuts (skip the media action menu)

  • --play : Immediately watch the selected video (you still choose from the list).
  • --play-all : Immediately play the whole playlist (implies --playlist-skip).
  • --listen : Immediately listen to the audio of the selected video.
  • --listen-all : Immediately listen to the whole playlist (audio only, implies --playlist-skip).
  • --download : Download the selected video.
  • --download-all : Download the whole playlist (video, implies --playlist-skip).
  • --download-audio : Download only the audio of the selected video.
  • --download-audio-all : Download the whole playlist as audio (implies --playlist-skip).
  • --save : Save the selected video to your local saved videos list.
  • --save-playlist : Save the current playlist to your custom playlists (implies --playlist-skip).
  • --shell : Open a subshell with the current state variables.

🎬 Player & Playback

  • -p, --player <mpv|vlc|tplay> : Specify the media player to use for playback.
  • --mpv-args : Pass custom mpv args at runtime
  • --vlc-args : Pass custom vlc args at runtime
  • --tplay-args : Pass custom tplay args at runtime
  • --disown-player : Detach the player process from the terminal (allows you to keep browsing while watching).
  • --no-disown-player : Keep the player attached to the terminal session (default).

⚙️ General & Utilities

  • -e, --edit-config : Open the yt-x configuration file in your $EDITOR.
  • -U, --update : Check for and apply the latest script update from GitHub.
  • -E, --generate-desktop-entry : Print a .desktop application entry to stdout (useful for Linux application menus).
  • -v, --version : Print version information and exit.
  • -h, --help : Show the help message and exit.

🎨 Rofi Theming

If using rofi as your launcher, you can pass custom .rasi paths dynamically:

  • --rofi-theme-main <path>
  • --rofi-theme-preview <path>
  • --rofi-theme-prompt <path>
  • --rofi-theme-confirm <path>
  • --rofi-theme-pager <path>

📌 Direct Shortcuts (skip the main menu)

  • --feed : Open your personalised feed immediately.
  • --subscriptions-feed : Open the subscriptions feed.
  • --watch-later : Open your Watch Later playlist.
  • --playlists : Browse saved YouTube playlists.
  • --custom-playlists : Browse custom playlists you've saved.
  • --saved : Open saved videos.
  • --recent : Show recently watched videos.
  • --liked : Open your Liked Videos playlist.
  • --watch-history : Show your watch history.
  • --clips : Browse your clips.
  • --new-custom-cmd : Jump straight to creating a custom command.
  • --custom-cmds : Execute an existing custom command.
  • --search-history : Browse your search history.
  • --edit-search-history : Edit the search history file.
  • --edit-custom-playlists : Edit the custom playlists JSON file.
  • --edit-mpv-config : Edit mpv’s configuration.
  • --edit-yt-dlp-config : Edit yt‑dlp’s configuration.
  • --edit-custom-cmds : Edit the custom commands JSON file.

Channels Subcommand

yt-x channels [OPTIONS]

Quickly jump into a channel from your subscriptions and browse its content.

Options:

  • -n, --name <channel> : Specify the channel name (exact match, case‑sensitive; tab complete supported).
  • -s, --search <query> : Search within the channel’s uploads.
  • -v, --videos : List the channel’s uploaded videos.
  • -f, --featured : Show the channel’s featured playlists.
  • -p, --playlists : List the channel’s playlists.
  • -sh, --shorts : Show the channel’s shorts.
  • -st, --streams : Show live streams & past broadcasts.
  • -po, --podcasts : Show the channel’s podcasts.

Examples:

yt-x channels                                  # Pick from subscriptions interactively
yt-x channels -n "Linus Tech Tips" -v          # Browse latest videos
yt-x channels -n "iambenexl" -s "Top linux tools"   # Search inside a channel
yt-x channels -n "StarTalk" -p             # Show channel playlists
yt-x channels -n "The PrimeTime" -st            # Show channel streams
yt-x --cmd-exit channels -n 'freeCodeCamp.org' -p # Browse freecodecamp playlists and immediately exit on back
yt-x --cmd-exit channels -n 'freeCodeCamp.org' # useful for setting aliases eg a shortcut to always go to freecodecamp channel `freecodecamp`
yt-x --launcher rofi --cmd-exit channels -n 'freeCodeCamp.org' # or as an app eg  `freecodecamp-app`

Inline Search Syntax & Filters

When entering a search query (either via the -s flag or within the interactive prompt), yt-x supports powerful inline filters.

Quick Filters (Colon Syntax)
Append a colon prefix to your search term to apply YouTube API filters:

  • Time: :hour, :today, :week, :month, :year
  • Format: :video, :movie, :live, :short, :long
  • Quality/Features: :4k, :hd, :hdr, :360, :vr, :3d, :local, :subtitles
  • Sorting: :newest, :views, :rating

Example: :4k nature documentary (Searches for nature documentaries specifically in 4K resolution).

History Recall (Bang Syntax)
Recall previous searches seamlessly without typing them out:

  • !1 : Re‑run your most recent search.
  • !2 : Re‑run your second most recent search, etc.

Environment Variables

Almost all CLI options can be permanently set in ~/.config/yt-x/config or overridden on‑the‑fly using environment variables.

  • YT_X_LAUNCHER (e.g., fzf or rofi)
  • YT_X_PLAYER (e.g., mpv)
  • YT_X_ENABLE_PREVIEW (true or false)
  • YT_X_ENABLE_PREVIEW_IMAGES (true or false)
  • YT_X_IMAGE_RENDERER (chafa, icat, imgcat)
  • YT_X_BROWSER (e.g., firefox, brave – extracts cookies for restricted content)

Examples & Workflows

1. Fast Search with Previews
Search for a specific topic instantly while enabling image previews:

yt-x --preview -s "cyberpunk 2077 ost"

2. Desktop/GUI Mode
Launch yt-x as a graphical application using Rofi (great for mapping to a keyboard shortcut in your Window Manager):

yt-x --launcher rofi --preview --no-disown-player

3. Audio‑Only Background Music
Search for a playlist and let mpv handle it in the background:

yt-x -l fzf -p mpv --disown-player --listen-all -sp "lofi hip hop radio" # skip playlist results menu
# or
yt-x -l fzf -p mpv --disown-player --listen -sp "lofi hip hop radio" # choose specific video to listen to

4. Non‑Interactive Actions (Scripting)
Automatically play the first video in a search result, then exit:

yt-x --playlist-skip --play -s "cute cats"

5. Play Whole Playlist Immediately
Skip both the main menu and the item selection – jump straight into playing a whole playlist:

yt-x --play-all --watch-later

6. Save Current Playlist Without Any Menus
When browsing a playlist, save it as a custom playlist and exit:

yt-x --save-playlist --media-exit

7. Jump Directly to a Channel
Open a subscribed channel’s videos without going through the main menu:

yt-x channels -n "Linus Tech Tips" -v

8. Generate a Desktop Entry (Linux)
Create a native application shortcut in your desktop environment:

yt-x -E > ~/.local/share/applications/yt-x.desktop
update-desktop-database ~/.local/share/applications/

9. Shell Completions
Generate and apply autocomplete scripts for your shell (e.g., Fish):

yt-x completions --fish > ~/.config/fish/completions/yt-x.fish

10. Open a Specific Saved Video
Bypass the saved videos menu and jump straight to a particular saved video:

yt-x -sv "My favourite video"

Configuration

yt-x is highly customizable. On its first run, it automatically generates a configuration file. Because the configuration file is sourced natively as a shell script, it remains lightweight and extremely fast, while allowing for dynamic shell evaluations if needed.

Configuration File Location

By default, the main configuration file is located at:

~/.config/yt-x/config

(Note: It respects the $XDG_CONFIG_HOME environment variable if set).

Quick Edit: You can open your configuration file in your default text editor at any time directly from the CLI:

yt-x --edit-config

Configuration Variables

Below is a categorized breakdown of the available configuration options you can define in your config file.

🖥️ Display & Interface

Variable Default Description
CONFIG_LAUNCHER fzf The menu launcher tool to use. Options: fzf or rofi.
CONFIG_ENABLE_COLORS true Enable or disable ANSI true-color (24-bit) formatting in the UI.
CONFIG_PER_PAGE 30 Maximum number of search/list results to fetch and display per page.
CONFIG_EDITOR vi (or $EDITOR) Text editor used for editing config files, histories, and extensions.
CONFIG_NOTIFICATION_DURATION 5 Duration (in seconds) for desktop/CLI notifications to remain visible.

🖼️ Media Previews

Variable Default Description
CONFIG_ENABLE_PREVIEW false Enable or disable the preview window (metadata & descriptions).
CONFIG_ENABLE_PREVIEW_IMAGES false Download and render high-quality thumbnails in the preview window.
CONFIG_IMAGE_RENDERER chafa Tool used to render images in the terminal. Options: chafa, icat, imgcat.
CONFIG_CHAFA_ARGS "" Pass custom arguments to chafa (e.g., --polite on).
CONFIG_ICAT_ARGS "" Pass custom arguments to icat / kitty +kitten icat.
CONFIG_IMGCAT_ARGS "" Pass custom arguments to imgcat.

🎬 Playback & Media Handling

Variable Default Description
CONFIG_PLAYER mpv Preferred media player. Options: mpv, vlc, tplay.
CONFIG_DISOWN_PLAYER false Set to true to run the player in the background without blocking the UI.
CONFIG_MPV_ARGS "" Custom arguments passed directly to mpv.
CONFIG_VLC_ARGS "" Custom arguments passed directly to vlc.
CONFIG_TPLAY_ARGS "" Custom arguments passed directly to tplay.

🌐 Web Integration & yt-dlp

Variable Default Description
CONFIG_BROWSER "" Highly Recommended. Specify a browser (brave, chrome, firefox, edge, etc.) to securely extract cookies. Grants access to YouTube Subscriptions, age-restricted, and member-only videos.
CONFIG_YT_DLP_ARGS "" Global fallback arguments passed directly to the yt-dlp backend.

💾 Downloading & Archival

Variable Default Description
CONFIG_DOWNLOAD_DIR ~/Videos/yt-x Base directory where all downloaded videos and audio files are saved.
CONFIG_DOWNLOADS_ENUMERATE false Set to true to prepend numbers (01 -, 02 -) to downloaded playlist items.

📚 History & Caching

Variable Default Description
CONFIG_ENABLE_SEARCH_HISTORY true Save local search history to track and quickly recall past queries.
CONFIG_NO_OF_RECENT 10 The number of recent "Watch History" items to retain locally.
CONFIG_CACHE_RETENTION_DAYS 7 Auto-clean stale preview images, autogen playlists, and logs older than this duration.

⚙️ Advanced UI Tuning (FZF & Rofi)

Variable Default Description
CONFIG_FZF_HEADER (logo) A custom header string displayed at the top of the fzf menu (defaults to the yt-x ASCII logo).
CONFIG_FZF_OPTS (see config) Fine‑tune fzf layout, colors, pointers, and keybindings. Defaults to a fully‑themed "Tokyo Night" style.
CONFIG_ROFI_THEME_MAIN "" Path to a custom Rofi .rasi theme for the main menu.
CONFIG_ROFI_THEME_PREVIEW "" Path to a custom Rofi .rasi theme for the preview menu.
CONFIG_ROFI_THEME_PROMPT "" Path to a custom Rofi .rasi theme for prompt dialogs.
CONFIG_ROFI_THEME_CONFIRM "" Path to a custom Rofi .rasi theme for confirmation dialogs.
CONFIG_ROFI_THEME_PAGER "" Path to a custom Rofi .rasi theme for the pager.

🧩 System & Extensions

Variable Default Description
CONFIG_AUTOLOADED_EXTENSIONS "" Comma-separated list of extension scripts to load automatically on startup.
CONFIG_CHECK_FOR_UPDATES true Periodically check the GitHub repository for updates and prompt to install.

❓ Frequently Asked Questions (FAQ)

Is yt-x a standalone media downloader or player? (Reporting Bugs)

No. yt-x is a highly advanced wrapper that orchestrates several powerful underlying tools. Before opening an issue on GitHub, please determine if the bug is actually related to yt-x or one of its backend utilities:

  • Media Fetching/Downloading fails: This is handled by yt-dlp. If a specific site breaks or videos refuse to download, try updating yt-dlp first (yt-dlp -U).
  • Video Playback stutters or crashes: This is handled by your media player (mpv, vlc, etc.).
  • Menu rendering issues / freezes: This is handled by fzf or rofi.
  • State management, navigation, or UI logic fails: This is handled by yt-x. Please open an issue!
How do I access age-restricted or members-only videos?

You need to pass your browser cookies to yt-dlp. You can do this natively in yt-x by editing your config (~/.config/yt-x/config) and setting the CONFIG_BROWSER variable to your daily browser (e.g., firefox, chrome, brave).

Note: For the best playback experience, you should also configure your media player to use these cookies (see the MPV optimization tip below).

🎬 How can I optimize MPV playback (Quality, Cookies, Hardware Decoding)?

By default, mpv handles streaming via yt-dlp under the hood. To ensure mpv uses your browser cookies (for age-restricted content) and defaults to 1080p hardware-accelerated playback, add the following to your ~/.config/mpv/mpv.conf:

# Pass cookies to yt-dlp inside mpv
ytdl-raw-options=cookies-from-browser=firefox

# Force highest quality 1080p video + best audio
ytdl-format="bestvideo[vcodec^=avc1][height<=1080]+bestaudio/best"

# General QoL improvements
hwdec=auto
vo=gpu
slang=en,eng,enUS,en-US
sub-auto=fuzzy
🎨 How do I change the colors or theme of yt-x?

yt-x ships with a default Tokyo Night color palette. You can easily "rice" it to match your system theme by either:

  1. Editing CONFIG_FZF_OPTS directly in ~/.config/yt-x/config.
  2. Creating a dedicated .theme file inside ~/.config/yt-x/extensions/themes/ and autoloading it.

Example: Custom Catppuccin-style Config

CONFIG_FZF_OPTS="
  --color=bg+:#283457,bg:#16161e,border:#27a1b9,fg:#c0caf5,header:#2ac3de,hl+:#2ac3de,hl:#2ac3de,info:#545c7e,marker:#ff007c,pointer:#ff007c,prompt:#2ac3de,query:#c0caf5,scrollbar:#27a1b9,separator:#ff9e64,spinner:#ff007c
  --border=rounded --prompt=' >' --marker=' >' --pointer='◆' --layout=reverse --cycle
"
📁 How do I manually add or edit Custom Playlists?

You can save custom playlists via the yt-x UI, but you can also manually maintain them locally. They are stored in a simple JSON file located at ~/.config/yt-x/custom-playlists.json.

Ensure your file follows this structure:

[
  {
    "id": "PLYOURPLAYLISTID",
    "name": "My Custom Chill Mix",
    "url": "https://www.youtube.com/playlist?list=PLYOURPLAYLISTID"
  }
]
🖼️ Why are my image previews not showing up?

Image previews require a few components to work together:

  1. Ensure you have enabled them in your config: CONFIG_ENABLE_PREVIEW=true and CONFIG_ENABLE_PREVIEW_IMAGES=true.
  2. Ensure you have a supported image renderer installed (e.g., chafa, icat, or imgcat).
  3. Set the correct renderer in your config: CONFIG_IMAGE_RENDERER="chafa".
  4. Ensure your terminal emulator actually supports image rendering (sixel, kitty graphics protocol, or iTerm2 protocol). If it doesn't, stick with chafa, which falls back to excellent ASCII/block character rendering.
🔑 How do I fix "Cannot decrypt v11 cookies", Flatpak, or unsupported browser errors?

yt-x passes the CONFIG_BROWSER variable directly to yt-dlp.

  • Chromium v11+ / Brave / Edge: Modern Chromium browsers encrypt cookies via your OS keyring (GNOME Keyring, KWallet). yt-dlp needs access to this keyring to decrypt them.
  • Flatpaks / Snaps: yt-dlp cannot easily read cookies from containerized browsers due to sandboxing. Use natively installed browsers (deb/rpm/AUR/Homebrew) for the best cookie compatibility.
  • Alternative: If your browser (like Zen) isn't supported natively, use an extension like "Get cookies.txt LOCALLY", save the file, and pass it via your config: CONFIG_YT_DLP_ARGS="--cookies /path/to/cookies.txt".
🖼️ Previews overlap text or look distorted. How do I fix this?

If your images are overlapping with UI text, your terminal may not properly support the image clearing sequences used by chafa.

  1. Kitty / Ghostty: Set CONFIG_IMAGE_RENDERER="icat". These terminals have native, high-performance image protocols.
  2. iTerm2 / WezTerm: Try CONFIG_IMAGE_RENDERER="imgcat".
  3. Other Terminals: Stick to CONFIG_IMAGE_RENDERER="chafa", but ensure your terminal supports Sixel or true-color ASCII. If overlaps persist, disable image previews (CONFIG_ENABLE_PREVIEW_IMAGES=false) and use text-only previews.
⌨️ How do I add Vim motions (j/k) or change menu keybindings?

Since the UI is driven by fzf, you can easily customize keybindings by modifying the CONFIG_FZF_OPTS variable in your ~/.config/yt-x/config file. Add --bind flags to map your preferred keys. For example, to add Vim motions and page scrolling:

CONFIG_FZF_OPTS="...your existing options... --bind 'j:down,k:up,ctrl-u:half-page-up,ctrl-d:half-page-down'"
⏯️ How do I return to the menu while a video is playing?

By default, yt-x blocks the terminal until the media player is closed. To browse while watching, enable background playback by setting CONFIG_DISOWN_PLAYER=true in your config, or launch the script with the --disown-player flag.

🍎 I'm on macOS and getting `command not found`, `_load_config`, or `jq` errors.

macOS ships with an outdated version of Bash (v3.x) and older standard utilities. yt-x requires modern tooling. Ensure you have installed the core dependencies via Homebrew (brew install yt-dlp fzf jq chafa mpv). If you encounter shell-specific errors, ensure your terminal is executing the script using a modern, Homebrew-installed shell environment rather than Apple's legacy /bin/sh.

📺 Why is a video playing in the wrong quality (e.g., 4K instead of 1080p) or throwing "Requested Format not available"?

While you can set CONFIG_VIDEO_QUALITY in yt-x, the actual stream negotiation is done by your media player (like mpv) via yt-dlp. If mpv decides to override the quality, you will get the maximum available resolution. To strictly enforce video quality, you must configure your media player. Add this to your ~/.config/mpv/mpv.conf: ytdl-format="bestvideo[height<=?1080]+bestaudio/best" (Change 1080 to your preferred maximum height).

🤖 I have no audio when playing videos on Termux / Android.

On Android, yt-x does not play the media inside the terminal. Instead, it uses Android am start intents to pass the stream URL to an installed GUI application (like the VLC or MPV Android apps). If you have no audio or video, ensure you have the actual MPV or VLC Android application installed on your device, and check the app's internal settings.

Also since you can't directly use the mpv command in termux unless you have installed a window manager we use apps like mpv and vlc android through android intents api and there it only supports giving it one url

the script uses --get-url yt-dlp opt inorder to get the url but only picks the top one for video where the second maybe the audio file if the video has a separate audio file

so to 'fix' this you only need to specify --format yt-dlp opt in your config where you specify merged formats like best --format 'best'

in case someone figures out how to also pass an audio file(more than one url) using android intents this will always limit what you can stream to only merged files and incase you do please share :)

💥 I'm getting "Malformed State" or "Invalid Action" errors constantly.

This typically happens for two reasons:

  1. Corrupt Cache: A previous yt-x session crashed and didn't clean up its state files. You can manually fix this by deleting the cache directory: rm -rf ~/.cache/yt-x/state/.
  2. FZF Aliases: If you have customized fzf in your .bashrc/.zshrc with aliases that alter its default output formatting, it will break yt-x's state parsing. Ensure fzf operates normally.
🎨 I customized my colors and now the script crashes with "Invalid color specification".

This is an fzf error. If you modified CONFIG_FZF_OPTS to add custom hex colors (e.g., #2ac3de), you must ensure your terminal emulator actually supports True Color (24-bit). If it doesn't, fzf will crash. Revert to standard ANSI colors (like blue, red, cyan) in your config if your terminal lacks True Color support.

🔄 Why am I being prompted to update the script every single time I run it?

This happens if yt-x lacks the correct permissions to write to its own file. If you installed yt-x system-wide using sudo (e.g., to /usr/local/bin), the auto-updater running as your normal user cannot overwrite the binary. Fix: Reinstall yt-x to your local user directory (~/.local/bin/yt-x) as shown in the Installation guide, or disable the updater by setting CONFIG_CHECK_FOR_UPDATES=false in your config.

🗂️ How do I populate the Channels/Subscriptions tab? It says my JSON is empty.

You need to sync your subscriptions first.

  1. Ensure CONFIG_BROWSER is set to the browser where you are logged into YouTube.
  2. Go to the Main Menu -> Miscellaneous -> Sync YouTube Subscriptions. yt-dlp will use your browser cookies to fetch your subscriptions and populate the ~/.config/yt-x/subscriptions.json file.
🖼️ Can I get image previews when using Rofi instead of FZF?

Yes! yt-x uses rofi's native \0icon\x1f protocol to display images. Ensure you have CONFIG_ENABLE_PREVIEW_IMAGES=true enabled in your yt-x config. Furthermore, your custom Rofi .rasi theme (CONFIG_ROFI_THEME_PREVIEW) must be configured to actually display the element-icon property.

🎵 How can I get my system to display media metadata (title, artist) when using the "Listen" action?

This is actually a feature of your media player rather than yt-x. Integrating this directly into yt-x would require complex workarounds (such as intercepting mpv's output using Lua scripts or enforcing playerctl + MPRIS dependencies), which goes against yt-x's lightweight design philosophy.

The Solution: The cleanest way to achieve this is by enabling MPRIS support directly in your media player.

  • For mpv: Install the mpv-mpris plugin. This allows mpv to broadcast the current track's metadata to your OS, exactly like a web browser does for YouTube.
  • For other players: Search for similar MPRIS or D-Bus integration plugins/settings.

Once configured, any compatible desktop widget or notification daemon will automatically pick it up and display what's playing. For example, using the Noctalia daemon on the Niri compositor handles this beautifully:

Noctalia MPRIS Example 1 Noctalia MPRIS Example 2 Noctalia MPRIS Example 3
⚡ How can I play or download something without any interactive menus? (Non‑interactive mode)

yt-x now supports several flags that let you bypass all menus and run actions non‑interactively – perfect for scripting, keybindings, or quick one‑off commands.

  • --playlist-skip (-ps) : Automatically picks the first item in any list (search results, playlist, etc.) without showing the selection menu.
  • --play-all, --listen-all, --download-all, --download-audio-all, --save-playlist : These implicitly enable --playlist-skip and act on the whole playlist immediately.
  • --media-exit (-me) : After performing a media action (play, download, save, etc.), exit the script.
  • --cmd-exit (-ce) : After processing any shortcut menu command (e.g., --feed, --subscriptions-feed), exit.

Examples:

# Play the first video from a search and exit
yt-x --playlist-skip --play -s "cute kittens" --media-exit

# Download the whole Watch Later playlist without any prompts
yt-x --download-all --watch-later

# Save the current playlist as a custom playlist and exit
yt-x --save-playlist --media-exit
📁 How do I directly open a specific saved video or custom playlist without browsing the menu?

Use the -sv / --saved-video, -cp / --custom-playlist, and -cc / --custom-cmd flags to jump straight to an item.
In supported shells (Fish), you get tab completion for the names.

# Open a specific saved video by its title
yt-x -sv "My favourite coding tutorial"

# Open a specific custom playlist
yt-x -cp "Jazz for studying"

# Execute a specific custom command by name
yt-x -cc "My Custom Search"

If you omit the argument, yt-x will prompt you to select from the list interactively.

🐚 What is the `--shell` flag and when should I use it?

--shell drops you into a subshell (either fish or POSIX sh) that is pre‑loaded with all the current session’s state variables. This is a power‑user feature for advanced scripting or ad‑hoc manipulation.

Available variables in the subshell:

  • STATE_CURRENT_VIDEO, STATE_CURRENT_VIDEO_URL, STATE_CURRENT_VIDEO_TITLE
  • STATE_CURRENT_PLAYLIST_RESULTS, STATE_CURRENT_PLAYLIST_URL, STATE_CURRENT_PLAYLIST_TITLE
  • Channel info, pagination indices, etc.

You can use this to, for example, manually run yt-dlp commands on the current video, extract metadata, or automate custom post‑processing.

yt-x --shell   # After navigating to a video, you'll get a shell with that video's info loaded

Type exit to return to yt-x.

🔁 Why does `--play-all` skip the item selection menu automatically?

--play-all, --listen-all, --download-all, --download-audio-all, and --save-playlist are designed for whole‑playlist actions. They assume you want to act on the entire list, not a single item, so they automatically set --playlist-skip internally. This saves you from having to type both flags and makes command‑line usage more intuitive.

If you do want to select a specific item from a playlist before playing the whole list, just use --play (without -all) and choose interactively.

⌨️ How do I get tab completion for custom playlist names or saved video titles?

Fish shell completions are fully supported and include dynamic completion for:

  • -cp / --custom-playlist : reads playlist names from ~/.config/yt-x/custom-playlists.json
  • -sv / --saved-video : reads video titles from ~/.config/yt-x/saved-videos.json
  • -cc / --custom-cmd : reads command names from ~/.config/yt-x/custom-cmds.json
  • channels -n : reads channel names from ~/.config/yt-x/subscriptions.json
  • -x / --extension : lists files in ~/.config/yt-x/extensions/

To install Fish completions:

yt-x completions --fish > ~/.config/fish/completions/yt-x.fish

Bash and Zsh completions are not yet implemented – contributions are welcome!

🛑 Why does `--cmd-exit` not exit immediately after some commands?

--cmd-exit works by setting a flag that tells yt-x to exit once the current “command” (menu or action) returns to the main loop. If you use --cmd-exit with a shortcut that opens another menu (e.g., --saved followed by selecting a video), the exit will only happen after you fully exit that sub‑menu (by pressing Back/Exit). For a hard exit right after a media action, use --media-exit instead.

🔍 How do I search for videos, playlists, channels, shorts, or movies without going through the main menu?

Use the dedicated search flags to jump straight to results:

  • -s, --search <term> : Video search
  • -sp, --search-playlist <term> : Playlist search
  • -sc, --search-channel <term> : Channel search
  • -ss, --search-short <term> : Shorts search
  • -sm, --search-movie <term> : Movie search

If you omit the search term, yt-x will prompt you to enter one interactively.

Example:

yt-x -s "linux kernel tutorial"
yt-x -sp "jazz playlist"
yt-x -sc "tech news"
⚙️ Can I temporarily change the launcher (fzf/rofi) or media player without editing the config file?

Yes, use the -l / --launcher and -p / --player flags. These override the config file settings for a single run.

# Use rofi as the menu launcher for this session
yt-x -l rofi

# Use vlc as the media player
yt-x -p vlc

# Combine with other options
yt-x -l rofi -p vlc --preview
🖼️ How do I temporarily enable or disable previews (images and metadata) from the command line?

Use -i to enable previews or -I to disable them. This overrides your CONFIG_ENABLE_PREVIEW setting for that run.

# Run with previews enabled
yt-x -i

# Run with previews disabled (useful for slow connections)
yt-x -I

Previews can also be toggled inside fzf using ctrl-/ (if not disabled in your config).

📦 How do I create a desktop shortcut (Linux) to launch yt-x from my app menu?

Use the -E / --generate-desktop-entry flag. It prints a .desktop file to stdout, which you can redirect to the appropriate directory.

# For a terminal‑based launcher (fzf)
yt-x -E > ~/.local/share/applications/yt-x.desktop

# For a GUI‑style launcher with rofi (no terminal window)
# (Modify the generated file to set Terminal=false and add --launcher rofi)

After saving, run update-desktop-database ~/.local/share/applications/ to refresh the menu.

🔄 How do I manually update yt‑x to the latest version?

Run yt-x -U or yt-x --update. The script will check the GitHub repository for changes, show you a diff if available, and prompt you to apply the update. If you installed yt-x to a system‑wide location (e.g., /usr/local/bin) without proper write permissions, you may need to reinstall it in your ~/.local/bin directory for the auto‑updater to work.

To disable automatic update checks, set CONFIG_CHECK_FOR_UPDATES=false in your config file.

🧩 How do I load an extension without restarting yt‑x or editing the config?

Use the -x / --extension flag followed by the extension file name (relative to ~/.config/yt-x/extensions/) or an absolute path. Extensions can be anything from theme files (.theme), language files (.lang), site definitions (.site), or custom command scripts (.cmd).

# Load a theme
yt-x -x themes/catppuccin.theme

# Load a site extension for a different video platform
yt-x -x sites/dailymotion.site

# Load a custom command script
yt-x -x cmd/my-search

Multiple -x flags can be used. To autoload extensions on every startup, list them in CONFIG_AUTOLOADED_EXTENSIONS (comma‑separated) in your config file.

🌐 How do I override configuration settings using environment variables?

Every config variable can be overridden by an environment variable prefixed with YT_X_. This is useful for scripting or one‑off changes without touching the config file.

Examples:

# Use rofi as launcher for this session
YT_X_LAUNCHER=rofi yt-x

# Enable previews and use chafa for images
YT_X_ENABLE_PREVIEW=true YT_X_IMAGE_RENDERER=chafa yt-x

# Change download directory temporarily
YT_X_DOWNLOAD_DIR="$HOME/Downloads/temp" yt-x --download-all

See the config file for all available variables (e.g., YT_X_PLAYER, YT_X_BROWSER, YT_X_PER_PAGE, etc.).

🗑️ How does yt‑x manage cache, and can I clean it manually?

yt-x automatically cleans up old cache files (preview images, auto‑generated playlists, logs) based on CONFIG_CACHE_RETENTION_DAYS (default 7 days). The cache directories are located under ~/.cache/yt-x/.

To manually clean everything:

rm -rf ~/.cache/yt-x/

To keep the cache but remove only stale items older than a certain number of days (e.g., 3):

find ~/.cache/yt-x/ -type f -mtime +3 -delete

Clearing the cache will not affect your saved videos, custom playlists, or subscriptions – those are stored in ~/.config/yt-x/.

📺 How do I use the `channels` subcommand non‑interactively?

The channels subcommand accepts -n (channel name) plus an action flag. You can combine it with --cmd-exit to exit after browsing the channel.

Examples:

# Open a channel's videos and exit when you go back
yt-x channels -n "Linus Tech Tips" -v --cmd-exit

# Search within a channel without any interactive channel selection
yt-x channels -n "freeCodeCamp.org" -s "python tutorial"

# List a channel's playlists and then exit
yt-x channels -n "StarTalk" -p --cmd-exit

If -n is omitted, you'll be prompted to pick from your subscriptions. If no action flag is given, you'll enter the channel's interactive menu.

🎛️ What are all the direct menu shortcuts I can use to skip the main menu?

These flags take you straight to specific sections:

Flag Destination
--feed Your personalised feed
--subscriptions-feed Subscriptions feed
--watch-later Watch Later playlist
--playlists Saved YouTube playlists
--custom-playlists Your local custom playlists
--saved Your saved videos
--recent Recently watched
--liked Liked videos
--watch-history Watch history
--clips Your clips
--new-custom-cmd Create a new custom command
--custom-cmds Run an existing custom command
-cc, --custom-cmd <name> Execute a specific custom command by name
--search-history Browse search history
--edit-search-history Edit search history file
--edit-custom-playlists Edit custom playlists JSON
--edit-mpv-config Edit mpv config
--edit-yt-dlp-config Edit yt‑dlp config
--edit-custom-cmds Edit custom commands JSON

Combine these with --cmd-exit for non‑interactive workflows.

what window manager is that and how do i make mine look like that?

i am using niri as my compositer and noctalia does all the theming for me. Though am planning to create my own riced setup when i gate free time, and maybe even a my own widget system which should also function as an sddm alternative since i personally dont like quickshell since its a resource hog and one of the reasons i like linux is low resource usage; especially since my first laptop was not powerful (celeron, 4gb ram, 1tb harddisk), so i still have the over optimizing mindset. I even have a name for it lol, i cant remember it now but i know it has an 'x' in it lol its probably going to be based on iced-rs and the config language rhai since i like its concept and prefer not to have to deal with ffi bindings of another lang so no lua. And i want it to be as stable as possible and no points of failure due to memory stuff

does that mean am a rust fanatic, nope just dont want to deal with a class of bugs and want to focus on logic though i still plan to master zig after rust since i like its concept of explicit memory management it helps in reducing cognitive overload in large systems and there are times where manual memory management is useful like when you need to squeeze every single bit of performance plus its syntax looks interesting

whats up with the half terminal?

its kitty's quake terminal mode, you can set one using quake-terminal kitten for kitty users. Other terminals also implement may also implement a similar feature.

How can i get mpv to look like the one in the demos (just look nicer)?

I personaly use uosc which in my opinion its by far the best ui for mpv. They have even implemented rendering yt's heatmap in the timeline. You can even also install thumbfast which will add timeline previews.

Why shell (4k+ lines) and not a language like python, go, rust etc?

Honestly, it was initially cause at the time the project where i first saw the concept was in bash magictape. Other than that i had know meaningful reason then. But now i can say its portability(runs in zsh, dash, bash, ksh; posix compliant systems) and its really easy to modify, audit and build upon a shell script since the excutable is just one file and you can open it up in your editor anytime or easily modify it to do what you want without having to open a pr have a fork etc. I have also grown to like writing shell scripts and the challenge involved its kinda cool and ais suck at writing it esp long ones lol, so yeah. Though for the same reason it makes it had to find reliable material or information on some concepts, so its one hell of a learning xp

Why did you decide to write your own version and not just use magic-tape?

Initially previews on kitty did not work and it took sometime before my issue was answered and solved, and a month later i decided to write my own on github(what am use to) in contrast with magic tape on gitlab.

And thus in my first year, during orientation week, yt-x was born and became my second popular oss project.

Whats the point of releases if the script only checks for updates from the latest commit?

well non really just there to show the progression to a stable version v1.0.0. where i wont wake up one night with a ton of ideas and implement them before i go back to sleep the next day lol.

Other than that i dont think going forward there will be that many changes esp since the heavy lifting is done by its dependencies like yt-dlp. The script will proabably work for many years to come as long as yt-dlp exists, which i think it will. And ways the last major change i have made before v1.0.0 was the rewrite v0.5.0 which was done in a separate branch and took a week ~8hrs a day to write and i aint doing that again lol

Plus the update process is pretty transparent since you always get to see what changed. Which i think its unique to yt-x.

Why are there functions in the script which just call another function?

My goal with this was to make it easier to build ontop of a feature or menu without losing the original functionality eg in extensions. In other languages this would be trivial without need for the redundancy but in shell this is the best idea i have so far

Can i use the ui functions etc in the script for my own project or personal script?
yes
Why is feature x not implemented?

Well i only have so much time and i really do have to sleep lol such is the fate of organic lifeforms lol. Though prs are mighty welcomed

Like i have so many ideas, though i decided not to implement some due to the illusion of how long it will take like v0.5.0, thought i could do the rewrite in a day lol, ended up being a week working nearly most of the day. There are even somethings i mentioned i will do at the start of the pr that i got so tired i decided not to implement.

And for the same reason if you want to request a feature its fine, though whether i personally will implement it is entirely whether i find it interesting enough or i will use it.

Otherwise you will probably have to open a pr or wait for someone else to implement it

Why such a long faq?

well most of the issues that have been opened in github since before the faq are not related to yt-x itself and i thought why not just share all the knowledge i have on the tools the script is using or ones i have shown in my demos. Plus i remember how hard and long it took to solve some issues and want the script to be something you install and it just works.

🤝 Support & Contribution

Pull requests are highly welcome! Whether it's adding new extension logic, fixing bugs, or expanding search parameters, feel free to fork and contribute.

⭐ Supporting the Project

If you enjoy using yt-x and want to support its ongoing development, consider leaving a Star on GitHub!