Skip to content

A sleek Python CLI tool that displays synchronized lyrics directly in your terminal.

Notifications You must be signed in to change notification settings

abdipr/python-lyrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

🎶 Python Terminal Live Lyrics Viewer

A sleek Python CLI tool that displays synchronized lyrics (from lrclib.net) directly in your terminal with smooth typing animation, dynamic coloring, and live timing.


📍 Features

  • 🎧 Fetches synced lyrics from lrclib.net automatically
  • 🕐 Perfectly timed display according to .lrc timestamps
  • ⌨️ Smooth typewriter effect with customizable speed
  • 🌈 ANSI-colored text and blinking cursor effects
  • ⏩ Adjustable playback speed & start time

✨ Support

If you like this project, please star on this repository, thank you ⭐
You can support me by:
Trakteer Saya Buy Me A Coffee


📦 Installation

  1. Install Python 3.8+

    Download from python.org/downloads.
    Make sure to check ✅ “Add Python to PATH” during setup.

    Verify the installation:

    python --version
  2. (Optional) Install requests

    pip install requests

    If you don’t install requests, the script will automatically fall back to Python’s built-in urllib.

  3. Clone this repository

    git clone https://github.com/abdipr/python-lyrics.git
    cd python-lyrics

🚀 Usage

Basic command:

python main.py --track "Song Name" --artist "Artist Name"

Example:

python main.py --track "XXL" --artist "LANY"

Start playback from a specific time:

python main.py --track "XXL" --artist "LANY" --start 0:30

Speed up or slow down lyric timing:

python main.py --track "XXL" --artist "LANY" --speed 1.25

⚙️ Command Line Options

Option Description Example
--track Track title (required) --track "ILYSB"
--artist Artist name (optional) --artist "LANY"
--start Start time in mm:ss or seconds --start "1:20"
--speed Playback speed multiplier --speed 0.8

🧠 How It Works

  1. The script queries lrclib.net for a song’s synced lyrics.
  2. It parses [mm:ss.xx] timestamps from the LRC format.
  3. Each lyric line appears at the correct time, letter-by-letter, with color and cursor animation.
  4. Past lines are dimmed, while the active line is displayed brightly in cyan.

🖥️ Demo

Now playing: LANY — XXL
Start offset: 0.00s | Speed: x1.0

    Bloodstream full of desert lightnin'
    Thank God I'm not drivin'
    A blur the whole way home

    I still remember █

🪶 Example Output (Static Preview)

Terminal Lyrics Viewer Screenshot


🧰 Tech Stack

  • Python 3.8+
  • requests (optional)
  • ANSI escape codes for color and cursor control
  • CLI-based UX with argparse

🛠️ File Structure

python-lyrics/
├── main.py           # Main executable script
├── README.md         # Documentation
└── snapshot.png      # Example screenshot

❤️ Credits

  • Lyrics data: lrclib.net
  • Terminal color codes inspired by classic Linux CLI tools

📜 License

This project is licensed under the MIT License — feel free to modify and distribute.
Made with ☕ and 🎧 by abdipr.

About

A sleek Python CLI tool that displays synchronized lyrics directly in your terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages