Skip to main content

A command-line music application for coders with daemon support, radio streaming, and AI-generated music

Project description

music-cli

PyPI version Python 3.9+ License: MIT

A command-line music player for coders. Background daemon with radio streaming, local MP3s, and AI-generated music.

music-cli play --mood focus    # Start focus music
music-cli pause                # Pause for meeting
music-cli resume               # Back to coding

Installation

# Install from PyPI
pip install coder-music-cli

# Or with uv (faster)
uv pip install coder-music-cli

# Install FFmpeg (required)
brew install ffmpeg      # macOS
sudo apt install ffmpeg  # Ubuntu/Debian

Optional: AI Music Generation

pip install 'coder-music-cli[ai]'  # ~5GB (PyTorch + MusicGen)

Features

  • Daemon-based - Persistent background playback
  • Multiple sources - Local files, radio streams, AI generation
  • Context-aware - Selects music based on time of day and mood
  • Simple config - Human-readable text files

Quick Start

# Play
music-cli play                    # Context-aware radio
music-cli play --mood focus       # Focus music
music-cli play -m local --auto    # Shuffle local library

# Control
music-cli pause | resume | stop | status

Commands

Command Description
play Start playing (radio/local/ai/history)
stop / pause / resume Playback control
status Current track and state
next Skip track (auto-play mode)
volume [0-100] Get/set volume
radios List stations
history Playback log
moods Available mood tags
daemon start|stop|status Daemon control

Play Modes

# Radio (default)
music-cli play                     # Time-based selection
music-cli play -s "deep house"     # By station name
music-cli play --mood focus        # By mood

# Local
music-cli play -m local -s song.mp3
music-cli play -m local --auto     # Shuffle

# AI (requires [ai] extras)
music-cli play -m ai --mood happy -d 60

# History
music-cli play -m history -i 3     # Replay item #3

Moods

focus happy sad excited relaxed energetic melancholic peaceful

Configuration

Files in ~/.config/music-cli/:

File Purpose
config.toml Settings
radios.txt Station URLs
history.jsonl Play history

Add stations to radios.txt:

ChillHop|https://streams.example.com/chillhop.mp3
Jazz FM|https://streams.example.com/jazz.mp3

Documentation

Document Description
User Guide Complete usage instructions
Architecture System design and diagrams
Development Contributing guide

Requirements

  • Python 3.9+
  • FFmpeg

License

MIT

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

coder_music_cli-0.2.1.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

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

coder_music_cli-0.2.1-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file coder_music_cli-0.2.1.tar.gz.

File metadata

  • Download URL: coder_music_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for coder_music_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7de44ff00cfa0695ff654a834e2cf5775dd63cf53cd1659b1213e0732e645d83
MD5 aa0a763e95dbdc59fd20bb60cd0c29bd
BLAKE2b-256 8ad6753bab79884747ff2d40bd9d4e38838e151614f2f9891306f8a3a0aa0972

See more details on using hashes here.

File details

Details for the file coder_music_cli-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for coder_music_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 350f49ef8cb4291709770daf15cf4d7d5e74dfb8147651a63045b7b627a43fbc
MD5 455e86ec998874ffb97345756a083f33
BLAKE2b-256 d7aacbf04a025922dda5947a81ad6f550aeeab0ad17a2317bd1d5e7ba6fcc159

See more details on using hashes here.

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