42bcb8b5bacac20b5b5344397dc656ab29066163
lrcfetch
A CLI tool for fetching LRC lyrics on Linux. Automatically detects the currently playing track via MPRIS/DBus and retrieves synced or plain 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
# 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%