Metadata-Version: 2.4
Name: ytm-player
Version: 1.9.0
Summary: A full-featured YouTube Music TUI client for the terminal
Project-URL: Homepage, https://github.com/peternaame-boop/ytm-player
Project-URL: Repository, https://github.com/peternaame-boop/ytm-player
Project-URL: Bug Tracker, https://github.com/peternaame-boop/ytm-player/issues
Project-URL: AUR Package, https://aur.archlinux.org/packages/ytm-player-git
Project-URL: Gentoo Package, https://gitweb.gentoo.org/repo/proj/guru.git/tree/media-sound/ytm-player
Project-URL: Changelog, https://github.com/peternaame-boop/ytm-player/blob/master/CHANGELOG.md
Author-email: Peter <peternaame@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: mpv,music-player,terminal,textual,tui,youtube-music
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Multimedia :: Sound/Audio :: Players
Requires-Python: >=3.10
Requires-Dist: aiosqlite>=0.20.0
Requires-Dist: click>=8.1.0
Requires-Dist: pillow>=10.0
Requires-Dist: pynput>=1.7.6; sys_platform == 'win32'
Requires-Dist: pyobjc-framework-mediaplayer>=11.0; sys_platform == 'darwin'
Requires-Dist: pyobjc-framework-quartz>=11.0; sys_platform == 'darwin'
Requires-Dist: python-mpv>=1.0.0
Requires-Dist: textual<9.0,>=7.0
Requires-Dist: tomli>=2.0; python_version < '3.11'
Requires-Dist: typing-extensions>=4.4; python_version < '3.11'
Requires-Dist: yt-dlp>=2025.1.0
Requires-Dist: ytmusicapi>=1.11.0
Provides-Extra: dev
Requires-Dist: anyascii>=0.3.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: responses>=0.25.0; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: discord
Requires-Dist: pypresence>=4.3.0; extra == 'discord'
Provides-Extra: images
Provides-Extra: lastfm
Requires-Dist: pylast>=5.0.0; extra == 'lastfm'
Provides-Extra: mpris
Requires-Dist: dbus-next>=0.2.3; extra == 'mpris'
Provides-Extra: spotify
Requires-Dist: spotifyscraper>=2.0.0; extra == 'spotify'
Requires-Dist: spotipy>=2.24.0; extra == 'spotify'
Requires-Dist: thefuzz>=0.22.0; extra == 'spotify'
Provides-Extra: transliteration
Requires-Dist: anyascii>=0.3.0; extra == 'transliteration'
Description-Content-Type: text/markdown

# ytm-player

[![PyPI](https://img.shields.io/pypi/v/ytm-player)](https://pypi.org/project/ytm-player/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
[![CI](https://github.com/peternaame-boop/ytm-player/actions/workflows/ci.yml/badge.svg)](https://github.com/peternaame-boop/ytm-player/actions/workflows/ci.yml)

A full-featured YouTube Music player for the terminal. Browse your library, search, queue tracks, and control playback — all from a TUI with vim-style keybindings. Runs on Linux, macOS, and Windows.

![ytm-player screenshot](docs/images/screenshot-v6.png)

> Available on **PyPI**, **AUR**, **NixOS**, and **Gentoo** — actively maintained with cross-platform support.

## Features

- **Vim-style keybindings** — j/k movement, multi-key sequences (`g s` for search, `g l` for library), count prefixes (`5j`)
- **Synced lyrics** — live-highlighted with LRCLIB fallback for tracks YouTube doesn't have, with title sanitization for better LRCLIB matches
- **mpv backend** — gapless audio, stream prefetching, broad codec support
- **Cross-platform native integrations** — MPRIS (Linux), Now Playing (macOS), media keys (Windows)
- **Theming** — 18+ Textual themes plus per-app color overrides in `theme.toml`
- **Spotify import** — pull playlists in via API or scraper fallback
- **CLI + IPC** — control a running TUI from another terminal (`ytm play`, `ytm pause`, etc.)
- **Free-tier support** — works without YouTube Music Premium
- **Session resume** — last-playing track + queue restored on launch
- **Local cache** — LRU audio cache for offline-like replay of previously heard tracks
- **Discord + Last.fm** — Rich Presence and scrobbling

## Requirements

- **Python 3.10+**
- **[mpv](https://mpv.io/)** (audio playback backend, must be installed system-wide)
- A YouTube Music account (free or Premium)

## Install

```bash
# PyPI (Linux / macOS / Windows)
pip install ytm-player

# Arch / CachyOS / Manjaro (AUR)
yay -S ytm-player-git
```

For NixOS, Gentoo, Windows-specific mpv DLL setup, source builds, and optional extras (Discord, Last.fm, Spotify import, etc.), see [docs/installation.md](docs/installation.md).

## Quickstart

```bash
ytm setup    # one-time auth (auto-detects browser cookies)
ytm          # launch the TUI
```

Windows: replace `ytm` with `py -m ytm_player`.

## Documentation

| Topic | Link |
|-------|------|
| Per-platform install + optional extras | [docs/installation.md](docs/installation.md) |
| `config.toml` + `theme.toml` reference | [docs/configuration.md](docs/configuration.md) |
| Full keyboard + mouse keybindings | [docs/keybindings.md](docs/keybindings.md) |
| All `ytm` CLI subcommands | [docs/cli-reference.md](docs/cli-reference.md) |
| Spotify playlist import | [docs/spotify-import.md](docs/spotify-import.md) |
| Troubleshooting (mpv / auth / MPRIS / macOS / cache) | [docs/troubleshooting.md](docs/troubleshooting.md) |
| File layout + stack | [docs/architecture.md](docs/architecture.md) |
| Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) |
| Security policy | [SECURITY.md](SECURITY.md) |

## Contributors

Thanks to [@dmnmsc](https://github.com/dmnmsc), [@Villoh](https://github.com/Villoh), [@valkyrieglasc](https://github.com/valkyrieglasc), [@dsafxP](https://github.com/dsafxP), [@Thayrov](https://github.com/Thayrov), [@glywil](https://github.com/glywil), [@Kineforce](https://github.com/Kineforce), [@CarterSnich](https://github.com/CarterSnich), [@Tohbuu](https://github.com/Tohbuu), [@nitsujri](https://github.com/nitsujri), [@uhs-robert](https://github.com/uhs-robert), [@moschi](https://github.com/moschi), and [@firedev](https://github.com/firedev) for bug reports, fixes, packaging, and platform support.

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for the full release history.
