Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shazam_cli-0.1.0.tar.gz (57.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shazam_cli-0.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for shazam_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2f7928aa81cebc3b232fa88a1750dc0c145ed544d44d3c53f8984a7bd4844764
MD5 d24ed3bb95d054af06251280af7fd981
BLAKE2b-256 49bdfa870b853a0d760a0daed20aca5629aefe4302317129b221e51fc738d82d

See more details on using hashes here.

Provenance

The following attestation bundles were made for shazam_cli-0.1.0.tar.gz:

Publisher: publish.yml on bostrt/shazam-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for shazam_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2711ed193c4ae11044b86e83fc6d173cc5f5450cce2c5d76d0403cede2f73d7
MD5 5f420898f05938c67b461f1e11402cc8
BLAKE2b-256 bdd9e6f76608f5a88ce2546cf6617a3320ce2f117d89b499290faa4315287f87

See more details on using hashes here.

Provenance

The following attestation bundles were made for shazam_cli-0.1.0-py3-none-any.whl:

Publisher: publish.yml on bostrt/shazam-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page