a74bf885a25c18f0367f6012dcb23a1ca9f216de
lrcfetch
A CLI tool for fetching LRC lyrics on Linux. Automatically detects the currently playing track via MPRIS/DBus and retrieves synced (or plain with all time tags set to [00:00.00] if failed to find any synced) lyrics from multiple sources.
Sources
Lyrics are fetched using a fallback pipeline (first synced result wins):
- Local — sidecar
.lrcfiles or embedded audio metadata (FLAC, MP3) - Spotify — synced lyrics via Spotify's API (requires
SPOTIFY_SP_DC) - LRCLIB — exact match from lrclib.net (requires full metadata)
- LRCLIB Search — fuzzy search from lrclib.net (requires at least a title)
- Netease — Netease Cloud Music public API
Usage
See lrcfetch --help for full command reference. Common use cases:
# Fetch lyrics for the currently playing track
lrcfetch fetch
# Search by metadata (bypasses MPRIS)
lrcfetch search -t "Song Title" -a "Artist"
# Export to .lrc file
lrcfetch export
# Force a specific source
lrcfetch fetch --method spotify
# Cache management
lrcfetch cache --stats
lrcfetch cache --query
lrcfetch cache --clear
Configuration
Set SPOTIFY_SP_DC via environment variable or .env file:
~/.config/lrcfetch/.env— user-level.envin working directory — project-local- Shell environment — highest priority
SPOTIFY_SP_DC=your_cookie_value
Description
Languages
Python
100%