Ytap is a cross-platform terminal application for searching YouTube and playing
audio with mpv or VLC. It supports Linux and Windows. fzf is optional; without
it, Ytap uses numbered menus.
Install Python 3.10 or newer, pipx, Git, and either mpv or VLC using your distribution's package manager. For example:
# Arch Linux
sudo pacman -S python python-pipx git mpv
# Debian / Ubuntu
sudo apt install python3 python3-pipx git mpv
# Fedora
sudo dnf install python3-pipx git mpvVLC can be installed instead of mpv. Install fzf if you want its interactive
selection interface; it is not required.
Install Python 3.10 or newer, Git, and pipx. Install either mpv or VLC separately.
Make sure the player's executable is on PATH. For VLC installed in a
non-standard location, set YTAP_VLC_PATH to the executable path.
After installing the prerequisites, the Ytap installation command is the same on Linux and Windows:
pipx install git+https://github.com/Mathieux83/Ytap.gitThe Git URL installation requires Git. Once installed, pipx makes ytap
available as a terminal command. If the command is not found after installing
pipx, run pipx ensurepath and restart the terminal.
Ytap uses a YouTube Data API v3 key. Create a key in the Google Cloud Console, then save it through the interactive prompt:
ytap configure
ytapThe key is stored in the operating system's user configuration directory using
platformdirs (XDG configuration directory on Linux, the appropriate per-user
configuration directory on Windows). Alternatively, set YTAP_API_KEY in the
environment; this takes precedence over the saved key.
pipx upgrade ytap
pipx uninstall ytapInstall from a clone in editable mode and run the test suite:
python -m venv .venv
# Linux:
source .venv/bin/activate
# Windows PowerShell:
# .venv\Scripts\Activate.ps1
python -m pip install -e .
python -m unittest discover -s tests -vOn other Linux distributions, install Python, pip, Git, and mpv or VLC using the distribution's package manager, then use a virtual environment as above. Ytap's Python package does not install the external audio player.
The automated tests cover packaging commands, configuration, simulated YouTube API responses, and missing optional programs on Linux and Windows. Audio playback itself should also be checked manually with the chosen player.