App for various music-file-collection analyses (for example, chart of most popular artists in your MP3 collection) and AI playlist generation
Project description
muziqa
Analyze your music collection and generate interesting charts using command-line:
- Top artists by track count
- Tracks by decade
- Tracks by year, with a 5-year rolling average of mean tracks per artist
- Tracks by country (optional, see below)
- Tracks by genre (optional, see below)
Also create MP3 playlist using Anthropic Claude LLM. The generated playlist is an MP3 file of your songs, picked by AI, per your prompt. Example:
$ muziqa Music --playlist "Playlist of rock tunes where lead guitar is as close as possible to the picking style of Mark Knopfler. Max 1 hour. Max one song per artist." --playlist-output mark.mp3
Install
Linux / Mac:
$ pipx install muziqa
Windows (PowerShell; NOTE: untested):
winget install Python.Python.3 # if Python not already installed
pip install pipx
pipx ensurepath # restart terminal after this
pipx install muziqa
Windows +
--playlist: also install ffmpeg:winget install ffmpeg
Usage
No API keys, no accounts, no streaming service — just point muziqa to a folder of music files:
$ muziqa /path/to/music
Reads tags from all supported files in the folder and subfolders, and saves two charts:
muziqa.png— top artists + tracks by decademuziqa_years.png— tracks by year with rolling average
Supported formats: MP3, FLAC, WAV, M4A, OGG
Country and genre charts
$ muziqa /path/to/music --country
$ muziqa /path/to/music --genre
$ muziqa /path/to/music --country --genre
Looks up each artist's country of origin and genre from MusicBrainz and saves additional charts:
muziqa_country.png— tracks by countrymuziqa_genre.png— tracks by genre
Note: The first run with
--countryor--genrequeries MusicBrainz for every unique artist at 1 request/second (required by their API). For a large collection this can take a bit of time. Using both flags together does not double the time — data is fetched in a single pass. Results are cached inmuziqa_mb_cache.jsonso subsequent runs are instant.
Note on "Unknown" genre: This means MusicBrainz either didn't find the artist or has no community-submitted genre tags for them. It does not affect the rest of the chart.
All options
| Option | Description |
|---|---|
DIR |
Directory of music files to analyze |
--flat |
Search only the given folder, not subfolders |
--country |
Fetch artist countries from MusicBrainz and plot by country |
--genre |
Fetch artist genres from MusicBrainz and plot by genre |
--output FILE |
Output image filename (default: muziqa.png) |
--top N |
Number of top entries to show (default: 20) |
-playlist DESC |
Create a playlist MP3 matching the given description (requires ANTHROPIC_API_KEY and ffmpeg) |
--playlist-output FILE |
Output file for playlist (default: playlist.mp3) |
--model MODEL |
Claude model for --playlist (default: claude-sonnet-4-6). Tip: use 'llm-models -p Anthropic' to list available models --> github.com/ljbuturovic/llm-models |
Examples
$ muziqa ~/Music
$ muziqa ~/Music --flat
$ muziqa ~/Music --country --genre
$ muziqa ~/Music --top 30 --output top30.png
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 muziqa-1.0.23.tar.gz.
File metadata
- Download URL: muziqa-1.0.23.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d3f8179585c329adfb24128f7b028f554940db9cd6b7f74849fa1b54cbff1ae
|
|
| MD5 |
122571f9f690a53dab2b0b9e07907da1
|
|
| BLAKE2b-256 |
0d2201d478d22e94b54c6a38a95f879e173498bce3824155505f321238a2b096
|
File details
Details for the file muziqa-1.0.23-py3-none-any.whl.
File metadata
- Download URL: muziqa-1.0.23-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f225315c6b471ce47345c54200aa3b862ef150d4b5323ca4abd0bc1f9b652152
|
|
| MD5 |
18ee5a676eb743366faff4c5a6d48ada
|
|
| BLAKE2b-256 |
d45339b4800fae4f84d76e2e20ef4f0b89820abb0bf11422f03ad13080ffc106
|