Metadata-Version: 2.4
Name: coder-music-cli
Version: 0.2.1
Summary: A command-line music application for coders with daemon support, radio streaming, and AI-generated music
Author-email: Luong Nguyen <luongnv89@gmail.com>
Maintainer-email: Luong Nguyen <luongnv89@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/luongnv89/music-cli
Project-URL: Repository, https://github.com/luongnv89/music-cli
Project-URL: Documentation, https://github.com/luongnv89/music-cli#readme
Project-URL: Issues, https://github.com/luongnv89/music-cli/issues
Project-URL: Changelog, https://github.com/luongnv89/music-cli/releases
Keywords: music,cli,daemon,radio,ai-music,focus,coding,background-music,lofi,productivity
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Players
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: tomli>=2.0; python_version < "3.11"
Requires-Dist: tomli-w>=1.0
Provides-Extra: ai
Requires-Dist: torch>=2.0; extra == "ai"
Requires-Dist: transformers<4.51,>=4.31; extra == "ai"
Requires-Dist: scipy>=1.10; extra == "ai"
Provides-Extra: ai-full
Requires-Dist: torch>=2.0; extra == "ai-full"
Requires-Dist: transformers>=4.30; extra == "ai-full"
Requires-Dist: audiocraft>=1.0; python_version < "3.14" and extra == "ai-full"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: bandit>=1.7; extra == "dev"
Requires-Dist: pre-commit>=3.0; extra == "dev"
Dynamic: license-file

# music-cli

[![PyPI version](https://badge.fury.io/py/coder-music-cli.svg)](https://badge.fury.io/py/coder-music-cli)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

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

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

## Installation

```bash
# 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

```bash
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

```bash
# 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

```bash
# 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](docs/user-guide.md) | Complete usage instructions |
| [Architecture](docs/architecture.md) | System design and diagrams |
| [Development](docs/development.md) | Contributing guide |

## Requirements

- Python 3.9+
- FFmpeg

## License

MIT
