Vim Motions + AI DJ.
Probably the best FUCKING thing I've ever coded
Remember NonStop-POP FM from GTA V? Yes I wanted that for my local music player and I do not use spotify :)
- Terminal Interface: A rich TUI experience using Textual with Vim Motions
- YouTube Music Integration: Search, play, like, and manage playlists.
- Efficient Playback: Lightweight audio playback with
python-vlc. - AI DJ (Kiara): An integrated AI DJ that announces songs and smooths transitions using a local LLM and
kokoroTTS.
- Python 3.10+
- VLC Media Player: Must be installed on your system (required for
python-vlc). - Dependencies:
textualytmusicapiyt-dlprequestspython-vlckokoro>=0.3.4soundfileonnxruntime-gpullama-cpp-python
pip install -r requirements.txtThe AI DJ feature uses a local LLM in GGUF format and the kokoro TTS library.
-
Download a GGUF model: Download a suitable GGUF model (e.g., Llama 3 8B Quantized) from Hugging Face.
-
Configure Path: Open
src/playback/dj.pyand update theMODEL_PATHvariable to point to your downloaded model file.# src/playback/dj.py MODEL_PATH = "path/to/your/model.gguf"
Note: GPU acceleration for
llama-cpp-pythonandkokororequires appropriate drivers (e.g., CUDA for NVIDIA GPUs).
Run the application from the root directory:
python src/main.pyThe application is structured into three main layers:
Responsible for all UI components and screens built with Textual.
home.py: Displays the main feed (Recommendations, Liked Songs, Library).player.py: The audio player interface.search.py: Search dialog and playlist selection.login.py: OAuth login flow.components.py: Shared widgets (e.g.,SongWidget).
Handles data fetching and business logic.
api.py: Wrappers forytmusicapito fetch songs, playlists, and artists.auth.py: Manages OAuth tokens and session.
Handles low-level audio reproduction and AI generation.
player.py: Singleton wrapper aroundpython-vlcfor audio playback andyt-dlpfor stream extraction.dj.py: Manages the AI DJ "Kiara", generating voice transitions using LLM and TTS.
src/main.py: The central controller that initializes the backend, authentication, and playback modules, and manages the UI application lifecycle.
j/k: Navigate lists (Down / Up)Space/Enter: Play selected song/: Open Searchl: Next songh: Previous songm: Mood searcha: Like songs: Dislike songp: Add to playlist1: View Recommendations2: View Liked Songs3: View Library Playlistsr: Refresh contentCtrl+Q: Quit App
Space: Toggle Play/Pausel: Next songh: Previous songq/Esc: Back to previous screena: Toggle Autoplayj/k: Navigate Queue/History
The app uses OAuth for YouTube Music access. On the first run, if no valid session is found, you will be prompted to follow instructions to authenticate.

