yit-player
Ai friendly CLI music player
README
Yit (No Tabs. Just Tunes.) Player 🎵
The Fire-and-Forget Music Player for Developers.
Yit is a lightweight, headless, terminal-based audio player designed for flow states. It allows you to search, queue, and control music directly from your CLI without ever touching a browser or a heavy GUI.
It runs in the background (daemonized), meaning you can close your terminal, switch tabs, or keep coding while the music plays.
🚀 Features
- Daemon Architecture: The player runs as a detached background process. Your terminal is never blocked.
- Instant Search: Uses
yt-dlpto fetch metadata in milliseconds. - Smart Queue: Manage your playlist (
add,next,back,Loop) with simple commands. - Cross-Platform: Works natively on Windows, macOS, and Linux.
- Agent-Native: Built from the ground up to be controlled by AI Agents (Vibe Coding).
📦 Installation
pip install yit-player
Requirements
- None! Yit automatically manages the
mpvaudio engine internally. - Windows: Auto-downloads a portable
mpv.exeif missing. - Mac/Linux: Uses system MPV (install via
breworaptif needed).
Troubleshooting: "Command/Path not found"
If you run yit and get an error, your Python scripts folder is not in your system PATH.
Solution: Run it like this instead (works 100% of the time):
python -m yit search "slava funk" -p
⚡ Quick Start
1. Search & Play
# Search for a song
yit search "funk sigilo"
# Auto-play the first result immediately
yit search "funk infernal" -p
2. Control Playback
yit pause # (or 'p')
yit resume # (or 'r')
yit toggle # Toggle play/pause
yit stop # Kill the player
3. Queue Management
yit add 1 # Add result #1 from your last search to the queue (use 1 - 5 to choose from search results)
yit queue # Show the current queue
yit next # Skip track (or 'n')
yit back # Previous track (or 'b')
yit clear # Wipe the queue
4. Looping
yit loop # Loop the current track indefinitely
yit unloop # Return to normal playback
5. Status
yit status # Check if currently Playing/Paused and Looped
6. Favorites (❤️)
Save your best tracks for later.
# list all favorites
yit fav
# Add to favorites
yit fav add # Add the CURRENTLY playing song
yit fav add 1 # Add result #1 from your last search
# Play favorites
yit fav play # Play ALL favorites (starting from #1)
yit fav play 3 # Play favorite #3
# Remove
yit fav remove 2 # Remove favorite #2
🤖 For AI Agents & Vibe Coding
Yit is designed to be self-documenting for AI context. If you are building an AI agent or using an LLM in your IDE:
- Read context: Point your agent to AI_INSTRUCTIONS.md (included in the repo).
- Discovery: Run
yit commandsto get a JSON list of all capabilities. - State: Run
yit agentto get the full player state (Track, Time, Queue) in pure JSON.
Example Agent Output (yit agent):
{
"status": "playing",
"track": {
"title": "Never Gonna Give You Up",
"url": "https://..."
},
"position": 45.2,
"duration": 212.0,
"queue_length": 5
}
Installation for Claude Desktop & AI IDEs (MCP)
Yit includes a built-in Model Context Protocol (MCP) server (yit-mcp). You can easily connect Yit to any supported AI IDE or desktop agent.
Add the following JSON configuration block to your client's MCP config file (e.g., mcp_config.json):
{
"mcpServers": {
"yit-player": {
"command": "yit-mcp",
"args": [],
"env": {},
"disabled": false
}
}
}
🛠️ Architecture
- Client: Python CLI (
yit) handles argument parsing and user signals. - Daemon: A detached
mpvprocess handles audio decoding and network streaming. - Communication: IPC (Inter-Process Communication) via Named Pipes (Windows) or Unix Sockets (Linux/Mac).
- Persistence:
~/.yit/history.jsonstores your playback history and queue metadata.
⚠️ Disclaimer and Legal Notice
1. Educational Purpose Only
This software (Yit) is a proof-of-concept project designed strictly for educational and research purposes. Its primary goal is to demonstrate:
- Advanced Python subprocess management and Daemon architecture.
- Inter-Process Communication (IPC) using sockets and named pipes.
- Memory-efficient resource management in CLI environments.
2. Third-Party Content
This tool acts as a command-line interface (CLI) wrapper for open-source media engines (mpv) and network libraries (yt-dlp).
- No Content Hosting: This application does not host, store, distribute, or decrypt any copyrighted media content.
- Streaming Only: It is designed for transient streaming of publicly available content. It does not include features to permanently download or "rip" media to the disk.
3. Terms of Service Users are responsible for ensuring their use of this tool complies with the Terms of Service of any third-party platforms they interact with. The developer of this tool assumes no liability for misuse, account suspensions, or legal consequences arising from the use of this software.
4. No Monetization This project is free and open-source. It is not monetized in any way, nor does it generate revenue from the content it accesses.
License
This project is licensed under the GNU General Public License v3.0 (GPLv3). This ensures the software remains free and open-source. Commercial distribution of this software as a closed-source product is strictly prohibited.
Contact
For any questions, please contact vijayaraj.devworks@gmail.com.
<!-- mcp-name: VijayarajParamasivam/yit-player -->
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。