A CLI for recognizing audio files and writing Shazam metadata tags.
Project description
shazam-cli
A small command-line tool for recognizing audio files with ShazamIO and writing Shazam metadata back to the file.
The package installs as shazam-cli, but the command-line executable is shazam.
Installation
For normal CLI usage, install with pipx:
pipx install shazam-cli
Or install with pip:
python -m pip install shazam-cli
Usage
Recognize an audio file and print the raw Shazam result:
shazam recognize path/to/audio.mp3
Write recognized metadata tags and rename the file to Artist - Title.ext:
shazam tag path/to/audio.mp3
Tag and rename every FLAC file in the current directory:
shazam tag *.flac
Write tags without renaming the file:
shazam tag --no-rename path/to/audio.mp3
Create a renamed copy instead of renaming the original file:
shazam tag --copy-renamed path/to/audio.mp3
Preview the match, tags, and rename path without writing files:
shazam tag --dry-run path/to/audio.mp3
Skip cover art:
shazam tag --no-cover path/to/audio.mp3
Fetch Shazam metadata by ID:
shazam track 123456789
shazam artist 123456789
Development
Install locally in editable mode:
python -m pip install -e .
Build distribution files:
python -m pip install -U build twine
python -m build
twine check dist/*
Publishing
This project includes a GitHub Actions workflow for PyPI Trusted Publishing. Configure a pending publisher on PyPI for:
- Project name:
shazam-cli - Owner:
bostrt - Repository:
shazam-cli - Workflow filename:
publish.yml - Environment name:
pypi
Then create a GitHub release to publish to PyPI.
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 shazam_cli-0.1.0.tar.gz.
File metadata
- Download URL: shazam_cli-0.1.0.tar.gz
- Upload date:
- Size: 57.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f7928aa81cebc3b232fa88a1750dc0c145ed544d44d3c53f8984a7bd4844764
|
|
| MD5 |
d24ed3bb95d054af06251280af7fd981
|
|
| BLAKE2b-256 |
49bdfa870b853a0d760a0daed20aca5629aefe4302317129b221e51fc738d82d
|
Provenance
The following attestation bundles were made for shazam_cli-0.1.0.tar.gz:
Publisher:
publish.yml on bostrt/shazam-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shazam_cli-0.1.0.tar.gz -
Subject digest:
2f7928aa81cebc3b232fa88a1750dc0c145ed544d44d3c53f8984a7bd4844764 - Sigstore transparency entry: 1429657237
- Sigstore integration time:
-
Permalink:
bostrt/shazam-cli@55a3ab57276a05f50b77e7ae2887f815882aea46 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bostrt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55a3ab57276a05f50b77e7ae2887f815882aea46 -
Trigger Event:
release
-
Statement type:
File details
Details for the file shazam_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: shazam_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 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 |
e2711ed193c4ae11044b86e83fc6d173cc5f5450cce2c5d76d0403cede2f73d7
|
|
| MD5 |
5f420898f05938c67b461f1e11402cc8
|
|
| BLAKE2b-256 |
bdd9e6f76608f5a88ce2546cf6617a3320ce2f117d89b499290faa4315287f87
|
Provenance
The following attestation bundles were made for shazam_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on bostrt/shazam-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shazam_cli-0.1.0-py3-none-any.whl -
Subject digest:
e2711ed193c4ae11044b86e83fc6d173cc5f5450cce2c5d76d0403cede2f73d7 - Sigstore transparency entry: 1429657240
- Sigstore integration time:
-
Permalink:
bostrt/shazam-cli@55a3ab57276a05f50b77e7ae2887f815882aea46 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bostrt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55a3ab57276a05f50b77e7ae2887f815882aea46 -
Trigger Event:
release
-
Statement type: