Skip to main content

Beets AI Sauce Plugin

build status PyPI - Version

Because your tunes deserve a little extra flavor.

Let artificial intelligence decipher and enhance the mysterious metadata of your music tracks.

Who Needs This? (Definitely You)

  • You: The person who once gazed at your MP3 folder and thought, "My beats need more AI jazz hands!"
  • Also You: If you trust AI more than your friend who can't stop labeling everything "Track 1".
  • Definitely You: If you own folders full of tracks from bootlegs, unknown rips, or suspect compilation albums.

Features

  • Auto-Metadata Magic: Automatically retrieve and correct track and album metadata using AI-generated suggestions.
  • Cleanup Crew: Strip away unnecessary embellishments like "Free Download" in titles or SHOUTCAPS, giving your library a polished appearance.
  • Extensible System: Leverage AI configurations and prompts custom tailored for your library needs.

Installation

Prerequisites

  • Beets: Make sure you have Beets installed (pip install beets),
  • AI Service API Key: Get an API key from your preferred AI service provider (e.g., OpenAI, Deepseek).
    • Any service that supports openAI endpoints should work.

Plugin Setup

  1. Installation: Obtain the sauce by installing the plugin via pip:
    pip install beets-aisauce
    
  2. Configuration: Add the plugin to your Beets configuration file (config.yaml/beets config -e) with your AI provider details:
     plugins: 
       - aisauce
    
     aisauce:
         mode: "metadata_source" # or "metadata_cleanup"
         providers:
             - id: openai
               model: gpt-4o
               api_key: YOUR_API_KEY_HERE
               api_base_url: https://api.openai.com/v1
    
  3. Execute the AI Sauce: Import your tracks through Beets to start receiving AI-enhanced metadata suggestions.

Usage

There are two main ways to use the AI Sauce plugin, either as metadata source during import or as a pre-import correction step. You can also combine both methods for maximum flavor.

As a Metadata Source During Import

When importing new music, the AI Sauce plugin can act as a metadata source. Beets will query the AI model to suggest metadata for tracks that lack sufficient information.

For this set the as_metadata_source option to true in your configuration:

aisauce:
    mode: "metadata_source"
    providers:
        ...

During beet import, the plugin will prompt the AI model to generate metadata suggestions based on existing tags or file names.

As a Pre-Import Correction Step

If you want to use AI to cleanup your metadata before retrieving candidates from other sources, set the as_metadata_source option to false:

aisauce:
    mode: "metadata_cleanup"
    providers:
        ...

During beet import, the plugin will first use the AI model to correct and enhance existing metadata before proceeding with the standard import process. This allows you to clean up messy tags before Beets attempts to match them with external databases.

Advanced Usage

  • Custom Rules: Sometimes you have specific metadata correction rules that you want to apply. You can modify the default user and system prompts by adding a source to your configuration file:
    aisauce:
        providers:
            - id: openai
              model: gpt-4o
              api_key: YOUR_API_KEY_HERE
    
        sources:
            - provider_id: openai
              user_prompt: '
                Additional rules:
                - Replace any occurrences of Vulgar or inappropriate words with "**sauced**".
                '
    
  • Multiple sources can be defined allowing you to test different prompts or configurations for different types of music or metadata corrections and models.

Contributing

Great ideas welcome! Especially if they include more puns. Open a PR or send us a message in a bottle (GitHub issues also work).

License

This project is licensed under the MIT License—meaning you can do almost anything, but please don't sue us if the AI names your tracks "Untitled Jam 42."

Development

The following sections are for developers who want to contribute to the project. Feel free to skip if you're just here for the AI sauce.

Installation for Development

Clone the repository and install the package in editable mode:

git clone
pip install -e .[dev]

Running Tests

To run the tests, you can use pytest. Make sure you have the necessary dependencies installed:

pytest .

Running mypy locally

Running mypy local is a bit tricky due to the namespace packages used in this project. To run mypy, you need to specify the --namespace-packages and --explicit-package-bases flags.

mypy  --namespace-packages --explicit-package-bases .

Metadata

Release files for beets-aisauce 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beets-aisauce 0.2.1
File Size Uploaded Provenance Actions
beets_aisauce-0.2.1.tar.gz 11.8 kB With provenance Details for beets_aisauce-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beets-aisauce 0.2.1
File Interpreter ABI Platform Actions
beets_aisauce-0.2.1-py3-none-any.whl Python 3 none any Details for beets_aisauce-0.2.1-py3-none-any.whl

Total release size: 22.8 kB

Release files / beets_aisauce-0.2.1.tar.gz

Download URL beets_aisauce-0.2.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2be4e6c1e0b9a81c6880314c0bd7a40b4cfa03dec2aa3f4e2988c1d5e1fa44a0
BLAKE2b-256 checksum
How to use checksums
0ceb6cf25702a430bc7227091689990f18be290cff4b7f142df6af8eb1782d03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2025.

Transparency log

Release files / beets_aisauce-0.2.1-py3-none-any.whl

Download URL beets_aisauce-0.2.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d352fd8e4363e84563f9fd56725a3d786ed095cf74468b5e29472c0c6d30422
BLAKE2b-256 checksum
How to use checksums
02672b113425f6b4462848d5c7c91caf59850ea85ebae6275ee9a7350e6dedef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2025.

Transparency log

Security for beets-aisauce 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for beets_aisauce-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page