Fetch missing album covers from Last.fm, iTunes, Deezer, MusicBrainz; embed in MP3/M4A/FLAC/Ogg and write a cover.jpg sidecar
Project description
coverart-cli
Fill the missing covers in your music library — embed and sidecar in one pass.
What it does
Most cover-art tools only embed or only sidecar. That breaks across players —
Subsonic apps (Amperfy, Symfonium) read tags, Plex / Jellyfin prefer cover.jpg,
Apple Music wants embedded. coverart-cli does both in one pass and ships an
HTML coverage report so you can see what's still missing.
Install
pipx install git+https://github.com/WildDragonKing/coverart-cli
Use
# Fetch + embed + sidecar (free providers — no key needed)
coverart ~/Music
# Add Last.fm too (much higher hit rate)
LASTFM_API_KEY=xxx coverart ~/Music
# Just generate the coverage report
coverart ~/Music --report-only --report-html report.html
# See what would happen, change nothing
coverart ~/Music --dry-run -v
Run coverart --help for the full flag list.
Config file
Save your defaults so you don't have to repeat flags:
# ~/.config/coverart-cli/config.toml
lastfm_key = "your-key"
min_bytes = 30000
replace_smaller = true
no_musicbrainz = false
Lookup order (later wins): built-in → ~/.config/coverart-cli/config.toml →
./coverart.toml → --config PATH → CLI flags → environment variables. Run
coverart ~/Music afterwards with no flags.
Sources
Tried in order until a cover is found:
- Last.fm —
album.getinfo(needs a free API key) - iTunes — Apple Music's public search, no key
- Deezer — public API, no key
- MusicBrainz + Cover Art Archive — fallback for niche releases
Supported formats
MP3 (ID3 APIC), M4A/M4B/MP4 (covr atom), FLAC (Picture block), Ogg Vorbis / Opus (metadata_block_picture).
Programmatic use
from pathlib import Path
from coverart_cli.core import RunOptions, run
from coverart_cli.providers import ITunesProvider, DeezerProvider
stats = run(RunOptions(
root=Path("~/Music").expanduser(),
providers=[ITunesProvider(), DeezerProvider()],
))
print(stats.fetched_from, stats.not_found)
Alternatives
| Tool | When to pick it |
|---|---|
| sacad | Best match rate; Rust binary, more sources |
| get-cover-art | Battle-tested Python API |
beets fetchart |
Already using beets for everything else |
coverart-cli (this) |
You want the HTML report + embed/sidecar dual-output in ~700 LOC |
Development
git clone https://github.com/WildDragonKing/coverart-cli && cd coverart-cli
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest && ruff check .
Releases
Releases are fully automated via release-please.
Commits to main follow Conventional Commits:
| Commit prefix | Effect on next release |
|---|---|
feat: … |
minor bump (0.3.0 → 0.4.0) |
fix: … |
patch bump (0.3.0 → 0.3.1) |
feat!: … / BREAKING CHANGE: |
major bump (0.3.0 → 1.0.0) |
docs:, refactor:, perf: |
changelog entry, no bump |
chore:, ci:, test: |
hidden in changelog |
release-please opens a single rolling "Release PR" that accumulates the pending version. Merging that PR creates the git tag, which triggers the PyPI publish workflow.
License
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 coverart_cli-0.4.0.tar.gz.
File metadata
- Download URL: coverart_cli-0.4.0.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dea34ccc04a7d95b525a8ec1857538bdffb58f1606dad6e472bec7369564c0cb
|
|
| MD5 |
c253b70f9755e2a3e64071ae9f839e36
|
|
| BLAKE2b-256 |
a6a2d50eb0c0895dad4d9f83a059432361d66daa0f4b5daedea197951e12e48f
|
Provenance
The following attestation bundles were made for coverart_cli-0.4.0.tar.gz:
Publisher:
release.yml on WildDragonKing/coverart-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coverart_cli-0.4.0.tar.gz -
Subject digest:
dea34ccc04a7d95b525a8ec1857538bdffb58f1606dad6e472bec7369564c0cb - Sigstore transparency entry: 1563785220
- Sigstore integration time:
-
Permalink:
WildDragonKing/coverart-cli@ffe5bded3dfcbb2277df9036fe322b1778124799 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/WildDragonKing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ffe5bded3dfcbb2277df9036fe322b1778124799 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file coverart_cli-0.4.0-py3-none-any.whl.
File metadata
- Download URL: coverart_cli-0.4.0-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02e57914090ee53613c4a1f29d3ce7c6f2db42e92053b6a98cc5b51bc94baa65
|
|
| MD5 |
bea00151d5588c6eb183f79de797c51e
|
|
| BLAKE2b-256 |
fe6223f243bff43299c0c5969a3712a19d79ccf9c33f1f11a18c2ae4a9ad1b22
|
Provenance
The following attestation bundles were made for coverart_cli-0.4.0-py3-none-any.whl:
Publisher:
release.yml on WildDragonKing/coverart-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coverart_cli-0.4.0-py3-none-any.whl -
Subject digest:
02e57914090ee53613c4a1f29d3ce7c6f2db42e92053b6a98cc5b51bc94baa65 - Sigstore transparency entry: 1563785231
- Sigstore integration time:
-
Permalink:
WildDragonKing/coverart-cli@ffe5bded3dfcbb2277df9036fe322b1778124799 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/WildDragonKing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ffe5bded3dfcbb2277df9036fe322b1778124799 -
Trigger Event:
workflow_dispatch
-
Statement type: