{"id":22413006,"url":"https://github.com/benexl/yt-x","last_synced_at":"2025-05-15T02:05:21.517Z","repository":{"id":263038500,"uuid":"855713680","full_name":"Benexl/yt-x","owner":"Benexl","description":"Browse youtube from your terminal","archived":false,"fork":false,"pushed_at":"2025-03-29T14:13:15.000Z","size":236,"stargazers_count":896,"open_issues_count":4,"forks_count":41,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-06T23:04:05.629Z","etag":null,"topics":["cli","command-line","fzf","jq","mpv","youtube","yt-dlp","yt-dlp-wrapper","yt-x"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Benexl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"benexl","patreon":null,"open_collective":null,"ko_fi":"benexl","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-09-11T10:45:35.000Z","updated_at":"2025-04-05T21:11:54.000Z","dependencies_parsed_at":"2024-11-22T07:34:40.489Z","dependency_job_id":"d81e154d-0c99-4cbd-8c98-d6995f51238c","html_url":"https://github.com/Benexl/yt-x","commit_stats":null,"previous_names":["benex254/yt-x","benexl/yt-x"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Benexl%2Fyt-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Benexl%2Fyt-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Benexl%2Fyt-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Benexl%2Fyt-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Benexl","download_url":"https://codeload.github.com/Benexl/yt-x/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809024,"owners_count":21164895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","fzf","jq","mpv","youtube","yt-dlp","yt-dlp-wrapper","yt-x"],"created_at":"2024-12-05T14:11:36.823Z","updated_at":"2025-04-14T01:50:32.394Z","avatar_url":"https://github.com/Benexl.png","language":"Shell","funding_links":["https://github.com/sponsors/benexl","https://ko-fi.com/benexl","https://ko-fi.com/Y8Y8ZAA7N"],"categories":[],"sub_categories":[],"readme":"# yt-x\n\n![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/Benex254/yt-x)\n![GitHub License](https://img.shields.io/github/license/Benex254/yt-x)\n![GitHub file size in bytes](https://img.shields.io/github/size/Benex254/yt-x/yt-x)\n![GitHub Release](https://img.shields.io/github/v/release/Benex254/yt-x)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/Benex254/yt-x)\n\nBrowse YouTube from your terminal.\nPlus other sites yt-dlp supports.\n\nInspired by [magic-tape](https://gitlab.com/christosangel/magic-tape)\n\n[yt-x-github-demo.webm](https://github.com/user-attachments/assets/08e491cc-fc91-4f13-849b-6ce8e78bf6f0)\n\n\u003cdetails\u003e\n\u003csummary\u003eFull Demo\u003c/summary\u003e\n  \n[yt-x-full-github-demo.webm](https://github.com/user-attachments/assets/06e388c4-4399-4358-a6cc-68045db48177)\n\n\u003c/details\u003e\n\n## Features\n\n- **Interactive Menu**: Text-based UI using `fzf` or `rofi` for seamless navigation.\n- **YouTube-Specific Menus**: Access your feed, trending videos, playlists, watch later, subscriptions feed, liked videos, clips.\n- **Playback Support**: Play videos and audio via `mpv` or `vlc`.\n- **Search Functionality**: Search for videos, channels and playlists directly.\n- **Channel Exploration**: Explore channels, including their videos, streams, podcasts, shorts, and playlists.\n- **Saved Channels**: Bookmark your favorite channels for quick access, with support for importing existing subscriptions.\n- **Saved Videos**: Save videos to watch later.\n- **Mixes**: Generate and explore YouTube song mixes.\n- **Yt-x Shell:** Run custom yt-dlp and mpv commands for downloading and viewing videos and playlists\n- **Custom Playlists**: Save playlists for easier access.\n- **Download Management**: Download videos, audio, and playlists using `yt-dlp`.\n- **History \u0026 Recents**: Track your recent videos and search history.\n- **Configuration Management**: Customize and manage configurations for yt-x, mpv and yt-dlp with ease.\n- **Extensions:** Extend yt-x with your own custom ui and preview logic allowing more precise coverage of other sites that yt-dlp supports🥳\n- **Custom Commands:** Basically a simple way to achieve the same thing with extensions. A custom command is just a yt-dlp command that loads a playlist or playlist like json.\n- **Miscellaneous Features**:\n  - Shell completions for `bash`, `zsh`, and `fish`.\n  - Desktop entry generation for easy access.\n\n## 📥 Installation\n\n![Linux/BSD](https://img.shields.io/badge/-Linux/BSD-red.svg?style=for-the-badge\u0026logo=linux) \u003ca href=\"#arch-linux\" target=\"_blank\"\u003e \u003cimg src=\"https://img.shields.io/badge/-Arch_Linux-black.svg?style=for-the-badge\u0026logo=archlinux\" alt=\"Arch Linux\"\u003e \u003c/a\u003e ![MacOS](https://img.shields.io/badge/-MacOS-lightblue.svg?style=for-the-badge\u0026logo=apple) ![Android](https://img.shields.io/badge/-Android-green.svg?style=for-the-badge\u0026logo=android)\n\n### ❄️ NixOS or Home Manager\n\n### \u003csamp\u003eOn NixOS, you can install packages using two main methods:\u003c/samp\u003e\n\n1. **Imperative/Direct installation**:\n```bash\nnix profile install github:Benexl/yt-x\n```\n#\n2. **Declarative/Config-based**:\n\n    2.1 Add the following to your `flake.nix`:\n\n    ```nix\n    inputs = {\n      yt-x.url = \"github:Benexl/yt-x\";\n      ...\n    }\n    ```\n\n    2.2 Then, add Yt-x to your packages:\n    \u003e For system wide installation in *configuration.nix*\n    ```nix\n    environment.systemPackages = with pkgs; [\n      inputs.yt-x.packages.\"${system}\".default\n    ];\n    ```\n\n    \u003e For user level installation in *home.nix*\n    ```nix\n    home.packages = with pkgs; [\n      inputs.yt-x.packages.\"${system}\".default\n    ];\n    ```\n\n### Arch Linux\n\n![AUR Version](https://img.shields.io/aur/version/yt-x-git?style=for-the-badge\u0026color=e64553\u0026logo=arch-linux\u0026label=%5BAUR%5D%20yt-x-git\u0026logocolor=85e185\u0026labelColor=000000)\n\n**You can install [`yt-x`](https://aur.archlinux.org/packages/yt-x-git) from the Arch Linux [AUR](https://aur.archlinux.org/) repository.**\n\n**To install, use your preferred package manager [`paru`](https://aur.archlinux.org/packages/paru-bin) or [`yay`](https://aur.archlinux.org/packages/yay-bin):**\n\n```bash\n# for paru users\nparu -S yt-x-git\n\n# for yay users\nyay -S yt-x-git\n```\n\n### Cross-platform\n\n\n```bash\n# NOTE: ~/.local/bin should exist and be in path for this to work\ncurl -sL \"https://raw.githubusercontent.com/Benexl/yt-x/refs/heads/master/yt-x\" -o ~/.local/bin/yt-x \u0026\u0026 chmod +x ~/.local/bin/yt-x\n```\n\n\n## Dependencies\n\n### Required\n\n- [jq](https://github.com/jqlang/jq) - JSON parsing.\n- [curl](https://curl.se/) - Download preview images.\n- [yt-dlp](https://github.com/yt-dlp/yt-dlp) - Fetch YouTube data.\n- [fzf](https://github.com/junegunn/fzf) - Main UI navigation.\n- [mpv](https://mpv.io/) - Video and audio playback.\n- [ffmpeg](https://www.ffmpeg.org/) - Proper HLS stream downloading.\n- [bash](https://www.gnu.org/software/bash/) - Script interpreter.\n- [nerdfont](https://www.nerdfonts.com/) - for the icons\n\n### Optional\n\n- [gum](https://github.com/charmbracelet/gum) - Enhanced UI (highly recommended).\n- [rofi](https://github.com/davatorium/rofi) - Alternate UI.\n- **terminal image viewer:**\n  - [chafa](https://github.com/hpjansson/chafa) - Cross-terminal image rendering (recommended).\n  - [icat](https://sw.kovidgoyal.net/kitty/kittens/icat/) - recommended for kitty terminal and ghostty\n  - [imgcat](https://github.com/danielgatis/imgcat)\n- **terminal with image rendering support:**\n  - [kitty](https://sw.kovidgoyal.net/kitty/) - currently has the best image rendering capabilities (recommended)\n  - [wezterm](https://wezfurlong.org/wezterm/index.html)\n  - [ghostty](https://github.com/ghostty-org/ghostty)\n   \n---\n\n## Usage\n\n```bash\n# Launch the UI\nyt-x\n\n# Edit configuration\nyt-x -e\n\n# load an extension\n# extensions are located at ~/.config/yt-x/extensions\n# the extension name is the name of a file in the extensions folder\nyt-x -x \u003cextension-name\u003e\n\n# Specify player at runtime\nyt-x --player \u003cmpv/vlc\u003e\n\n# Set selector at runtime\nyt-x -s \u003cfzf/rofi\u003e\n\n# Specify Rofi theme path\nyt-x --rofi-theme \u003cpath\u003e\n\n# Enable/disable preview\nyt-x --preview / yt-x --no-preview\n\n# Print desktop entry\nyt-x -E\n\n# Print shell completions\nyt-x completions --bash\nyt-x completions --zsh\nyt-x completions --fish\n\n# Update the script\nyt-x --update\n\n# Display help\nyt-x --help\n```\n\n---\n\n## Tips\n\n### Enabling Imports of Subscriptions \u0026 Private Playlists\n\nSet your preferred browser in the configuration file:\n\n```ini\nPREFERRED_BROWSER: firefox\n```\n\nTo enable `mpv` to access private playlists and videos, add something like this to `mpv.conf` (you can also use the ui to edit `mpv.conf`):\n\n```ini\nytdl-raw-options=cookies-from-browser=firefox\n\n# --- bonus mpv tips ---\n\n# define the quality for mpv to use\nytdl-format=\"bestvideo[vcodec^=avc1][height=1080]+bestaudio/best[vcodec^=avc1][height=1080]/bestvideo[vcodec^=avc1][height=720]+bestaudio/best[vcodec^=avc1][height=720]/best\"\n\n# defines where screenshots will be saved\nscreenshot-directory=~/Pictures/mpv_screenshots/\n\n# enable hardware accelaration\nhwdec=auto\nvo=gpu\n```\n\nTo customise download options with yt-dlp you can add something like this to `yt-dlp.conf` (you can also use the ui to edit `yt-dlp.conf`)\n\n```bash\n-f bestvideo[vcodec^=avc1][height=1080]+bestaudio/best[vcodec^=avc1][height=1080]/bestvideo[vcodec^=avc1][height=720]+bestaudio/best[vcodec^=avc1][height=720]/best\n--embed-chapters\n--sponsorblock-mark all\n--embed-metadata\n--embed-thumbnail\n--add-metadata\n--embed-subs\n--sub-lang en\n--merge-output-format mkv\n```\n\nFor additional enhancements, consider:\n\n- [uosc](https://github.com/tomasklaen/uosc) for a modern `mpv` UI.\n- [thumbfast](https://github.com/po5/thumbfast) for thumbnail timeline previews.\n\n## Custom Playlists\n\nDefine custom playlists by editing `~/.config/yt-x/custom_playlists.json` (or use the UI):\n\n```json\n[\n  {\n    \"name\": \"\u003cplaylist name\u003e\",\n    \"playlistUrl\": \"https://www.youtube.com/playlist?list=\u003cplaylist-id\u003e\",\n    \"playlistWatchUrl\": \"https://www.youtube.com/watch?list=\u003cplaylist-id\u003e\"\n  }\n]\n```\n## Theming\nTo change the default colorscheme, set `YT_X_FZF_OPTS` env var and give it custom fzf opts.\n\neg. (.bashrc)\n\n```\n#yt-x\nexport YT_X_FZF_OPTS=$FZF_DEFAULT_OPTS'\n--color=fg:#e0def4,fg+:#e0def4,bg:#232136,bg+:#44415a\n--color=hl:#3e8fb0,hl+:#9ccfd8,info:#f6c177,marker:#3e8fb0\n--color=prompt:#eb6f92,spinner:#c4a7e7,pointer:#c4a7e7,header:#3e8fb0\n--color=border:#44415a,label:#ea9a97,query:#f6c177\n--border=\"rounded\" --border-label=\"\" --preview-window=\"border-rounded\" --prompt=\"\u003e \"\n--marker=\"\u003e\" --pointer=\"◆\" --separator=\"─\" --scrollbar=\"│\"'\n```\n\n## Other Terminal Browsers I Made\n[lib-x](https://github.com/Benexl/lib-x) - browse your calibre library from the terminal\n\n[fastanime](https://github.com/Benexl/FastAnime) - browse anime from the terminal\n\n\n\n## Contribution\n\nPull requests are highly welcome!\n\n## Support\n\nNeed help? Join the community on Discord:\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://discord.gg/HBEmAwvbHV\"\u003e\n\u003cimg src=\"https://invidget.switchblade.xyz/C4rhMA4mmK\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Supporting the Project\n\nGive the project a star and consider contributing to the codebase.\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/Y8Y8ZAA7N)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenexl%2Fyt-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenexl%2Fyt-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenexl%2Fyt-x/lists"}