Banh-Canh / ytui

ytui is a TUI tool that allows users to query videos on youtube and play them in their local player.
MIT License
57 stars 2 forks source link

ytui - YouTube Terminal User Interface

![star] [![Downloads][downloads-badge]][releases] ![version] ![aurversion]

ytui is a terminal-based tool designed to help you search and play YouTube videos directly from your local terminal player. You can query videos from various sources such as your history, subscribed channels, or by searching YouTube.


Table of Contents

Features

ytui offers a wide range of features designed to enhance your YouTube experience directly from the terminal. Some of the key features include:

These features make ytui a powerful and convenient way to interact with YouTube directly from your terminal, streamlining video searching and viewing for command-line users.

Requirements

You must have mpv and yt-dlp installed.

Installation

To install ytui, follow the instructions for your operating system. Ensure that you have the required dependencies installed.

  1. Install binary

    ytui runs on most major platforms. If your platform isn't listed below, please [open an issue][issues].

    Please note that binaries are available on the release pages, you can extract the archives for your platform and manually install it.

    Linux / WSL > You can use the following package manager: > > | Distribution | Repository | Instructions | > | ------------ | ----------- | ----------------------------------------- | > | _Any_ | [Linuxbrew] | `brew install banh-canh/ytui-tap/formula` | > | Arch Linux | [AUR] | `yay -S ytui-bin` |
    macOS > You can use the following package manager: > > | Distribution | Repository | Instructions | > | ------------ | ----------- | ----------------------------------------- | > | _Any_ | [Linuxbrew] | `brew install banh-canh/ytui-tap/formula` |

Usage

See Documentations.

Configuration

The configuration file for ytui is located at $HOME/.config/ytui/config.yaml. This file allows you to specify which channels to subscribe to and your OAuth credentials.

Configuration File Structure

channels:
  local: false
  subscribed:
    - UCTt2AnK--mnRmICnf-CCcrw
    - UCutXfzLC5wrV3SInT_tdY0w
download_dir: ~/Videos/YouTube
history:
  enable: true
invidious:
  proxy: ''
  instance: invidious.jing.rocks
loglevel: info
youtube:
  clientid: fsdfsdf
  secretid: ffsdfsdf

Notes

Files

Examples

  1. Search for a Video on YouTube:

    ytui query search "your search query"
  2. Fetch Videos from Your Subscribed Channels:

    ytui query subscribed
  3. Retrieve Videos from Your History:

    ytui query history

Troubleshooting

If you encounter any issues while using this application, you can check the log file for detailed error messages and troubleshooting information. The log file is located at:

$HOME/.config/ytui/ytui.log

Steps to View the Log

  1. Open a terminal: Use your terminal application to navigate to the logs.

  2. Display the log: Run the following command to view the log content:

    cat $HOME/.config/ytui/ytui.log

    This will print the log file's contents directly to your terminal.

  3. Tail the log (Optional): If the application is still running and you want to monitor log updates in real-time, you can use the tail command:

    tail -f $HOME/.config/ytui/ytui.log
  4. Check for errors or warnings: Look for lines marked with [ERROR] or [WARNING] to identify issues.

Reporting Issues

When reporting issues, please include relevant log entries to help with diagnosing the problem. You can copy the log content and include it in your bug report.

License

licence

ytui is open-source and available under the LICENCE.

For more detailed usage, you can always use ytui --help or ytui <subcommand> --help to get more information about specific commands and flags.