Skip to main content

YouTube in Terminal - Fire-and-Forget Music CLI

Project description

Yit (YouTube in Terminal) Player 🎵

PyPI version License: MIT Python 3.7+

The Fire-and-Forget Music Player for Developers.

Yit (YouTube in Terminal) 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-dlp to 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

Yit uses mpv as its audio engine.

  • Windows: Yit will attempt to auto-install it via winget if missing.
  • macOS: brew install mpv
  • Linux: sudo apt install mpv (or your distro's equivalent).

⚡ Quick Start

1. Search & Play

# Search for a song
yit search "lofi hip hop"

# Auto-play the first result immediately
yit search "daft punk" -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

🤖 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:

  1. Read context: Point your agent to AI_INSTRUCTIONS.md (included in the repo).
  2. Discovery: Run yit commands to get a JSON list of all capabilities.
  3. State: Run yit agent to 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
}

🛠️ Architecture

  • Client: Python CLI (yit) handles argument parsing and user signals.
  • Daemon: A detached mpv process handles audio decoding and network streaming.
  • Communication: IPC (Inter-Process Communication) via Named Pipes (Windows) or Unix Sockets (Linux/Mac).
  • Persistence: ~/.yit/history.json stores your playback history and queue metadata.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yit_player-0.1.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yit_player-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file yit_player-0.1.1.tar.gz.

File metadata

  • Download URL: yit_player-0.1.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yit_player-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c2a3c846e924424bfbbf96628af847297b93638412659a70c3f1da3a4e8edce9
MD5 449c6efd6b2518ee7d2c57f3900f1773
BLAKE2b-256 87db71ad8ed1f49b4d1b07578b24235ba4ec068a7a03d9490f54c24329dd32d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for yit_player-0.1.1.tar.gz:

Publisher: publish.yml on VijayarajParamasivam/yit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yit_player-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: yit_player-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yit_player-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0b987459472dbf2516f78004a2c14fecb76fbbbddab3a1eec1cfc054e9165b9
MD5 095c8deb72edf766568a1b782a299699
BLAKE2b-256 9c0de5b05815fabd3fce4192c0a3131f8b421c5d8164ed1b837566c0188ee69c

See more details on using hashes here.

Provenance

The following attestation bundles were made for yit_player-0.1.1-py3-none-any.whl:

Publisher: publish.yml on VijayarajParamasivam/yit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page