Skip to main content

LibreLyrics

Logo

A modular, plugin-based lyrics fetcher. Fetch synced and unsynced lyrics from various sources via plugins.

Features

  • Synced lyrics — Line-by-line timestamps (LRC format)
  • Rich synced lyrics — Word-by-word karaoke-style timing (Enhanced LRC)
  • Plugin architecture — External plugins via entry points
  • Metadata search — Fetch by artist and title, with a user-defined source list
  • Batch downloads — Fetch lyrics for entire albums or playlists
  • CLI & Library — Use from the command line or import as a Python library
  • Interactive config — Menu-driven configuration editor

Installation

pip install librelyrics

Plugins

LibreLyrics is a plugin-based system. The core package does not include any lyrics sources. Install plugin packages separately.

Plugins must declare API version 2 (LIBRELYRICS_API_VERSION = 2) and a stable META.id (lower-case letters and digits only). Version 1 plugins do not load. META.name is the display name and the key under plugins in config.

Installing Plugins

Install plugins using pip or the built-in plugin manager:

# Using pip
pip install librelyrics-spotify

# Using the plugin manager
librelyrics plugin install librelyrics-spotify

# List installed plugins
librelyrics plugin list

Available Plugins

Plugin packages follow the naming convention librelyrics-{service}. Check the libre-lyrics organization for available plugins.

Quick Start

Command Line

# Fetch lyrics for a single track (URL plugin only when search_priority is empty)
librelyrics https://open.spotify.com/track/...

# Only the plugin that matches the URL (no search list)
librelyrics https://open.spotify.com/track/... --direct

# Resolve the URL, then fetch lyrics from a named plugin id
librelyrics https://open.spotify.com/track/... --from applemusic

# Metadata only (needs a SEARCH plugin)
librelyrics --artist "Artist" --title "Track"

# Fetch lyrics for an album
librelyrics https://open.spotify.com/album/...

# Fetch lyrics for a playlist
librelyrics https://open.spotify.com/playlist/...

# Configure settings
librelyrics config edit

# List installed plugins
librelyrics plugin list

As a Library

from librelyrics import LibreLyrics, TrackQuery

ll = LibreLyrics()

response = ll.fetch("https://open.spotify.com/track/...")
print(response.to_lrc())

response = ll.fetch_query(TrackQuery(artist="Artist", title="Track"))

Configuration

Run librelyrics config edit for an interactive configuration editor, or manually set values:

librelyrics config set download_path ./lyrics
librelyrics config set preferred_lyrics_order RICH

# Plugin-specific configuration (key is META.name in lower case, example spotify)
librelyrics config set plugins.spotify.sp_dc YOUR_SP_DC_COOKIE

Config Options

Key Default Description
download_path downloads Output directory for lyrics files
create_folder true Create folders for albums/playlists
preferred_lyrics_order RICH, SYNCED, UNSYNCED Stop at the first listed quality (RICH is best)
search_priority [] Plugin ids to try after resolve. Empty = URL plugin only. Album/playlist URLs need list_tracks() on the URL plugin; otherwise use --direct. Search uses simpler artist/title variants first (primary artist, title before -).
max_search_attempts 5 Cap on search plugins called per track
max_concurrent_tracks 4 Parallel per-track fetches in a batch
force_download false Overwrite existing lyrics files

Plugin Development

LibreLyrics supports external plugins via Python entry points. Create a plugin by subclassing LyricsModule:

import re
from librelyrics.modules.base import LyricsModule, ModuleMeta, ModuleCapability

class MyPlugin(LyricsModule):
    META = ModuleMeta(
        id="myservice",
        name="MyService",
        regex=re.compile(r"myservice\.com/track/"),
        capabilities=frozenset({ModuleCapability.SINGLE_TRACK}),
    )
    LIBRELYRICS_API_VERSION = 2

    def fetch(self):
        # Your implementation here
        ...

Register your plugin in pyproject.toml:

[project.entry-points."librelyrics.plugins"]
myservice = "my_plugin_package:MyPlugin"

License

This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.

Metadata

Release files for librelyrics 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for librelyrics 1.1.0
File Size Uploaded
librelyrics-1.1.0.tar.gz 56.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for librelyrics 1.1.0
File Interpreter ABI Platform
librelyrics-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 106.2 kB

Release files / librelyrics-1.1.0.tar.gz

Download URL librelyrics-1.1.0.tar.gz
Size 56.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7eb8ddbfe3e33da742958b23510df8b2f613e7707d7bce7f95592d2dc1386701
BLAKE2b-256 checksum
How to use checksums
6a01a64238601e56633b23ff9fdca92773e52a793f5d666aaceab715741e466e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / librelyrics-1.1.0-py3-none-any.whl

Download URL librelyrics-1.1.0-py3-none-any.whl
Size 50.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c69655b4b5bde1b29002937bc57ccca6a4049a6ac571e7456828f60fd8c07bf
BLAKE2b-256 checksum
How to use checksums
3101659152a0c6009f7466dd1191d604b084d1de983c84e3cfa5a7f9f5eee906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.0

2 release files

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page