Skip to content

๐ŸŽต A melodic command-line music player for streaming, managing playlists, and discovering new tunes seamlessly.

License

Notifications You must be signed in to change notification settings

pythonicforge/melody.cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽต Melody CLI

banner

Terminal Tunes, Done Right.

Melody CLI is a powerful, minimal, and interactive command-line music player that lets you search, download, and play songs from YouTube Music โ€“ all inside your terminal.

Built with Python, powered by ytmusicapi, yt-dlp, and pygame, this tool gives devs and terminal geeks a lightweight, distraction-free music experience.

๐Ÿš€ Features

  • ๐Ÿ” Search Songs from YouTube Music right inside the terminal
  • โฌ‡๏ธ Download & Cache Audio using yt-dlp for efficient playback
  • ๐ŸŽง Play Music with smooth pygame integration
  • โธ๏ธ Playback Controls โ€“ Pause, Resume, Stop, Skip, Previous
  • ๐Ÿ” Autoplay Queue โ€“ Auto-queues and plays recommended tracks
  • ๐Ÿง  Smart Caching โ€“ Replays already downloaded tracks to save bandwidth
  • ๐Ÿงน Disk Management โ€“ Only keeps the last 10 played songs in cache
  • ๐Ÿงผ Clear CLI โ€“ Use clear to reset your screen mid-session

๐Ÿ› ๏ธ Setup & Usage

๐Ÿ”„ Clone the Project

git clone https://github.com/pythonicforge/Melody.CLI
cd Melody.CLI

๐Ÿ“ฆ Set Up Environment

python3 -m venv env
source env/bin/activate  # or .\env\Scripts\activate on Windows
pip install -r requirements.txt

๐ŸŽฎ Run Melody CLI

python melody.py

Once you're in the CLI, use commands like:

search <song name>   # Search songs
play <index>         # Play a song from search results
pause                # Pause music
resume               # Resume playback
stop                 # Stop playback (also disables autoplay)
next                 # Play next song in the queue
prev                 # Play previous song
queue                # View the current queue
autoplay             # Toggle autoplay on/off
clear                # Clear the terminal screen
bye                  # Exit the CLI

๐Ÿง  How It Works

  • Search: Uses ytmusicapi to find relevant tracks.
  • Download: Fetches audio from YouTube with yt-dlp, stores it as MP3.
  • Playback: Uses pygame for low-latency audio control.
  • Queue: Automatically fills up with related tracks post-playback.
  • Memory Friendly: Automatically keeps cache folder to a max of 10 songs.

๐Ÿ’ก Tech Stack

Purpose Tool
Search API ytmusicapi
Download Engine yt-dlp
Audio Playback pygame
CLI Framework Python's cmd

๐Ÿค Contribute

Got ideas? Found bugs?
Pull requests and issues are super welcome! Letโ€™s make terminal music cool again ๐Ÿ’ป๐ŸŽถ

๐Ÿ“ข Final Note

This isnโ€™t your average MP3 player โ€“ Melody CLI is for the terminal generation. Itโ€™s fast, snappy, and doesnโ€™t need a GUI to vibe.

About

๐ŸŽต A melodic command-line music player for streaming, managing playlists, and discovering new tunes seamlessly.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages