Skip to main content

Generate and play music playlists from natural language prompts or seed songs

Project description

myplaylist

PyPI version Python versions

Generate and play music playlists in your terminal from natural language prompts or seed songs.

Features

  • Natural language prompts: myplaylist new "下雨天的 lo-fi jazz"
  • Seed songs: myplaylist new --seed "Norah Jones - Come Away With Me"
  • Terminal playback via mpv with a rich TUI (pause / skip / lyrics marquee)
  • Local persistence at ~/.myplaylist/playlists/
  • Export to .m3u, .csv, or .json
  • Zero-config LLM: uses your existing Claude subscription via claude -p

Requirements

  • Python 3.9+
  • Claude Code CLI (claude) — for natural language mode
  • macOS or Linux

Installation

Option 1 — curl one-liner (recommended)

curl -fsSL https://raw.githubusercontent.com/eddie/autoplaylist/main/install.sh | bash

The script will:

  1. Detect macOS / Linux
  2. Check for Python 3.9+
  3. Install pipx if missing (and guide PATH setup)
  4. Install myplaylist via pipx
  5. Install mpv (Homebrew on macOS, apt on Linux)

Option 2 — Homebrew tap

brew tap eddie/myplaylist
brew install myplaylist

Option 3 — pipx (manual)

pipx install myplaylist

mpv is required for playback. Install it separately if needed:

  • macOS: brew install mpv
  • Linux: sudo apt-get install mpv

On first run, myplaylist will walk you through the optional Last.fm API key setup.

Quick Start

# Natural language prompt
myplaylist new "rainy day lo-fi jazz for working"

# Seed song
myplaylist new --seed "Norah Jones - Come Away With Me"

# Seed from YouTube URL
myplaylist new --seed "https://www.youtube.com/watch?v=..."

# Custom track count and name
myplaylist new "chill beats" --count 20 --name my-chill-list

Commands

Command Description
myplaylist new "<prompt>" Generate playlist from natural language
myplaylist new --seed "<song>" Generate playlist from seed song
myplaylist list List all saved playlists
myplaylist show <name> Show track listing
myplaylist play <name> Play in terminal
myplaylist export <name> --format m3u|csv|json Export playlist
myplaylist delete <name> Delete a playlist
myplaylist setup Re-run first-time setup

Playback Controls

Key Action
p Pause / resume
n Skip to next track
↑ / ↓ Move cursor up / down
← / → Page up / page down
Enter Jump to selected track
q Quit

Last.fm (optional)

Last.fm integration improves similar-song quality. Get a free API key at https://www.last.fm/api/account/create and enter it during first-run setup. You can skip this and run in yt-dlp-only mode.

Data Storage

~/.myplaylist/
  config.json          # API keys and settings
  playlists/
    <name>.json        # Saved playlists

Uninstall

# If installed via pipx or the install.sh script:
pipx uninstall myplaylist

# If installed via Homebrew tap:
brew uninstall myplaylist
brew untap eddie/myplaylist

Running Tests

pip install pytest
pytest tests/                     # smoke tests (no network)
pytest tests/ -m slow             # include integration tests (requires network)

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

myplaylist-0.1.0.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

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

myplaylist-0.1.0-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file myplaylist-0.1.0.tar.gz.

File metadata

  • Download URL: myplaylist-0.1.0.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for myplaylist-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c79ff8c4b38fc8bf340f53a1e3f667c825a89ff65aa534636554b5fe8fde6261
MD5 2bbbd6f0004d019be2fd34d1ce83d871
BLAKE2b-256 4e6c41ae18170e7015946dda0146fd3cb05c4e3c3abffb5ffc84c37f7b65682a

See more details on using hashes here.

Provenance

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

Publisher: release.yml on haoziwlh/autoplaylist

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

File details

Details for the file myplaylist-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: myplaylist-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for myplaylist-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c0867f4d80e5aa21667a235c3d04c2cfb32a031e11a58991a5d33a329ea6950
MD5 69325d7430d400f84784a32f583652cf
BLAKE2b-256 9721339bf7a3f00337a264225b4d5fe3aebfdce5f618d73fd294f8ebab0f976a

See more details on using hashes here.

Provenance

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

Publisher: release.yml on haoziwlh/autoplaylist

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