Skip to main content

musci

I wanted to start fucking around with mixing music, and couldn't be asked to download mp3s myself from youtube, so i thought i'd do something about it. Could extend this to be like an npm package, but i still don't know if Spotify and Apple apis will let me do that.

Bulk playlist MP3 downloader and DJ mixing prep CLI. Supports Spotify playlists/albums/tracks, Apple Music playlists/albums/songs, YouTube playlists/videos, SoundCloud/Bandcamp links, and text tracklists.

Downloads audio concurrently as 320kbps CBR MP3s (constant bitrate to prevent beatgrid drift in Rekordbox, Serato, Traktor, and CDJs) with BPM + Camelot Wheel key detection and ID3v2.3 tagging.

Install (No Code / .venv Needed)

Install ffmpeg + pipx once on macOS (Homebrew), then install musci globally:

brew install ffmpeg pipx
pipx ensurepath
pipx install git+https://github.com/sakhnoukh/musci.git

(Once published to PyPI, this becomes pipx install musci.)

Launch the Interactive Terminal UI

Just run:

musci

musci boots with an animated 3D neon logo + spinning DJ turntable/EQ sprite, system readiness indicators, a command cheat sheet, and an interactive musci ▸ prompt where you can simply paste any playlist URL and hit Enter (or run commands directly from your shell below).

Direct CLI Commands

1. Download a Spotify, Apple Music, or YouTube playlist (with BPM & Camelot key detection)

musci download "https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M"
musci download "https://music.apple.com/us/playlist/..."
musci download "https://www.youtube.com/playlist?list=PL..."

2. Fast download-only mode (skip BPM & key analysis)

musci download "https://open.spotify.com/playlist/..." --download-only

3. Prefix filenames with [BPM - Camelot] for quick folder browsing

musci download "https://open.spotify.com/playlist/..." --prefix-filename
# Produces e.g.: [128 - 8A] Artist - Track Title.mp3

4. Batch download from a text file of playlist URLs or Artist - Title lines

musci download --from-file playlists.txt --workers 6 -o ./downloads

5. Analyze an existing folder of MP3s for BPM & Camelot key

musci analyze ./downloads/my-playlist --prefix-filename

Large Spotify Playlists (>100 tracks)

Out of the box, musci reads public Spotify playlists with zero configuration (up to ~100 tracks per playlist via Spotify's public embed metadata).

For playlists with 100+ tracks (using your Spotify Premium account):

  1. Go to the Spotify Developer Dashboard and click Create app:
    • Redirect URI: http://127.0.0.1:8888/callback
    • Check Web API and click Save.
  2. Run the guided setup wizard (prompts for your Client ID & Secret, stores them securely in ~/.config/musci/.env, and opens browser login automatically):
    musci spotify-setup
    
  3. If the 100+ track playlist was created by someone else: Under Spotify's 2026 Developer Mode rules, the API only returns full 100+ item lists for playlists you own or collaborate on. In Spotify Desktop, open the playlist, click ... -> Add to other playlist -> New playlist (takes 2 seconds), and pass your new playlist's link to musci download.

Notes for DJ Mixing

  • 320kbps CBR MP3: All downloads are encoded using libmp3lame at 320kbps constant bitrate with ID3v2.3 tags (TBPM, TKEY, TIT2, TPE1, TALB, cover art) for reliable beatgrids across Rekordbox, Serato, VirtualDJ, Traktor, and Mixxx.
  • Source Audio Quality: YouTube native audio streams top out around 128–160kbps Opus/AAC. While 320kbps CBR MP3 packaging works well for bedroom mixing, set prep, and casual gigs, large club sound systems benefit from lossless/DJ-pool masters.
  • Incremental Sync: Each output folder stores .musci-manifest.json so re-running musci download on an updated playlist skips tracks you already downloaded.

Metadata

Release files for musci 0.1.0

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

Source distribution (sdist)

Source distribution for musci 0.1.0
File Size Uploaded Provenance Actions
musci-0.1.0.tar.gz 39.2 kB Without provenance Details for musci-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for musci 0.1.0
File Interpreter ABI Platform Actions
musci-0.1.0-py3-none-any.whl Python 3 none any Details for musci-0.1.0-py3-none-any.whl

Total release size: 74.7 kB

Release files / musci-0.1.0.tar.gz

Download URL musci-0.1.0.tar.gz
Size 39.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cfbfdb69f87a259014e09e7fda5206fc7ecd8e6f06bec14c8d22c8bf1c6b1d7e
BLAKE2b-256 checksum
How to use checksums
9d32725acdf03d7a6709c5a9a0d0019011385a58adcc3a34a37df68577b4cd68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / musci-0.1.0-py3-none-any.whl

Download URL musci-0.1.0-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
135a2910804e4c3b28755bddf4f7ec78ceb9ea911d9bfcbad44fa5a551da2f19
BLAKE2b-256 checksum
How to use checksums
ecaf96b1ec82405dcff350440997fa405aa06ef2d9e5716922200b1fcac01576
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for musci 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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