A modular, plugin-based lyrics fetcher. Fetch synced and unsynced lyrics from various sources via plugins.
Project description
LibreLyrics
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 — Extensible with external plugins via entry points
- 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 by default. You need to install plugin packages separately to fetch lyrics from different services.
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 (requires appropriate plugin installed)
librelyrics https://open.spotify.com/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
ll = LibreLyrics()
# Fetch lyrics for a track
response = ll.fetch("https://open.spotify.com/track/...")
print(response.to_lrc())
Configuration
Run librelyrics config edit for an interactive configuration editor, or manually set values:
librelyrics config set download_path ./lyrics
librelyrics config set synced_lyrics true
# Plugin-specific configuration (example for Spotify plugin)
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 |
synced_lyrics |
true |
Prefer synced lyrics when available |
enhanced_lrc |
true |
Use Enhanced LRC format for word-level timing |
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(
name="MyService",
regex=re.compile(r"myservice\.com/track/"),
capabilities=frozenset({ModuleCapability.SINGLE_TRACK}),
)
LIBRELYRICS_API_VERSION = 1
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file librelyrics-1.0.0.tar.gz.
File metadata
- Download URL: librelyrics-1.0.0.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd6e745ed663642e27f1fba3d1f12eaddd9fabba1e52f585986f52f81b25b0f2
|
|
| MD5 |
7beac75f8557a092388761d3fc7319ef
|
|
| BLAKE2b-256 |
18fa8d9fa2c0f3e0ae7c1a69a6f5cb8e939bf3cca573fded1963105a8e96e414
|
Provenance
The following attestation bundles were made for librelyrics-1.0.0.tar.gz:
Publisher:
release_to_pypi.yml on libre-lyrics/librelyrics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
librelyrics-1.0.0.tar.gz -
Subject digest:
cd6e745ed663642e27f1fba3d1f12eaddd9fabba1e52f585986f52f81b25b0f2 - Sigstore transparency entry: 975920342
- Sigstore integration time:
-
Permalink:
libre-lyrics/librelyrics@6dea506162568dda633076602364c3f6ae607086 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/libre-lyrics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_to_pypi.yml@6dea506162568dda633076602364c3f6ae607086 -
Trigger Event:
push
-
Statement type:
File details
Details for the file librelyrics-1.0.0-py3-none-any.whl.
File metadata
- Download URL: librelyrics-1.0.0-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1e996840e60fbe53a61b686ce752ba977d92eadc68ca801dab83b1c7ad18560
|
|
| MD5 |
9a8e0314d8b1823512c3e50c3366917d
|
|
| BLAKE2b-256 |
8a37e36f67c501c715163cb7349ca4a7c0b8b0d9f9c5374ae68508f44e942635
|
Provenance
The following attestation bundles were made for librelyrics-1.0.0-py3-none-any.whl:
Publisher:
release_to_pypi.yml on libre-lyrics/librelyrics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
librelyrics-1.0.0-py3-none-any.whl -
Subject digest:
c1e996840e60fbe53a61b686ce752ba977d92eadc68ca801dab83b1c7ad18560 - Sigstore transparency entry: 975920345
- Sigstore integration time:
-
Permalink:
libre-lyrics/librelyrics@6dea506162568dda633076602364c3f6ae607086 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/libre-lyrics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_to_pypi.yml@6dea506162568dda633076602364c3f6ae607086 -
Trigger Event:
push
-
Statement type: