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.0.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.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coder_music_cli-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 7d6d80bd42e8f3eaba750a4f3a0e2a608226668eaafa740352ffb96359931b54
MD5 a9fe710f58c9887c253b52cb1d2dbcb8
BLAKE2b-256 e452873f3b1e3bd8f6e09c195a18de1fc31dfda3faef12ca9365061e9490003a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coder_music_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ec88c1f62027451cb2343c20ec065e877a4ee5b2ed1eb101e000ea665132f9
MD5 6cbb0dfe1ee516960c8bfd9fbd0b69ab
BLAKE2b-256 84d090e2fba66a4d7d029aece23e0e76af31e0cec01e0b3b6d5896f7534dc718

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