coder-music-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- coder_music_cli-0.1.0/LICENSE +21 -0
- coder_music_cli-0.1.0/PKG-INFO +167 -0
- coder_music_cli-0.1.0/README.md +122 -0
- coder_music_cli-0.1.0/coder_music_cli.egg-info/PKG-INFO +167 -0
- coder_music_cli-0.1.0/coder_music_cli.egg-info/SOURCES.txt +29 -0
- coder_music_cli-0.1.0/coder_music_cli.egg-info/dependency_links.txt +1 -0
- coder_music_cli-0.1.0/coder_music_cli.egg-info/entry_points.txt +2 -0
- coder_music_cli-0.1.0/coder_music_cli.egg-info/requires.txt +20 -0
- coder_music_cli-0.1.0/coder_music_cli.egg-info/top_level.txt +1 -0
- coder_music_cli-0.1.0/music_cli/__init__.py +3 -0
- coder_music_cli-0.1.0/music_cli/__main__.py +6 -0
- coder_music_cli-0.1.0/music_cli/cli.py +378 -0
- coder_music_cli-0.1.0/music_cli/client.py +161 -0
- coder_music_cli-0.1.0/music_cli/config.py +181 -0
- coder_music_cli-0.1.0/music_cli/context/__init__.py +6 -0
- coder_music_cli-0.1.0/music_cli/context/mood.py +134 -0
- coder_music_cli-0.1.0/music_cli/context/temporal.py +171 -0
- coder_music_cli-0.1.0/music_cli/daemon.py +374 -0
- coder_music_cli-0.1.0/music_cli/history.py +176 -0
- coder_music_cli-0.1.0/music_cli/player/__init__.py +6 -0
- coder_music_cli-0.1.0/music_cli/player/base.py +108 -0
- coder_music_cli-0.1.0/music_cli/player/ffplay.py +179 -0
- coder_music_cli-0.1.0/music_cli/sources/__init__.py +6 -0
- coder_music_cli-0.1.0/music_cli/sources/ai_generator.py +219 -0
- coder_music_cli-0.1.0/music_cli/sources/local.py +75 -0
- coder_music_cli-0.1.0/music_cli/sources/radio.py +90 -0
- coder_music_cli-0.1.0/pyproject.toml +115 -0
- coder_music_cli-0.1.0/setup.cfg +4 -0
- coder_music_cli-0.1.0/tests/test_config.py +80 -0
- coder_music_cli-0.1.0/tests/test_context.py +142 -0
- coder_music_cli-0.1.0/tests/test_history.py +161 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Luong Nguyen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: coder-music-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A command-line music application for coders with daemon support, radio streaming, and AI-generated music
|
|
5
|
+
Author-email: Luong Nguyen <luongnv89@gmail.com>
|
|
6
|
+
Maintainer-email: Luong Nguyen <luongnv89@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/luongnv89/music-cli
|
|
9
|
+
Project-URL: Repository, https://github.com/luongnv89/music-cli
|
|
10
|
+
Project-URL: Documentation, https://github.com/luongnv89/music-cli#readme
|
|
11
|
+
Project-URL: Issues, https://github.com/luongnv89/music-cli/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/luongnv89/music-cli/releases
|
|
13
|
+
Keywords: music,cli,daemon,radio,ai-music,focus,coding,background-music,lofi,productivity
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Operating System :: MacOS
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Players
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: click>=8.0
|
|
29
|
+
Requires-Dist: tomli>=2.0; python_version < "3.11"
|
|
30
|
+
Requires-Dist: tomli-w>=1.0
|
|
31
|
+
Provides-Extra: ai
|
|
32
|
+
Requires-Dist: torch>=2.0; extra == "ai"
|
|
33
|
+
Requires-Dist: transformers>=4.30; extra == "ai"
|
|
34
|
+
Requires-Dist: audiocraft>=1.0; extra == "ai"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
39
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
42
|
+
Requires-Dist: bandit>=1.7; extra == "dev"
|
|
43
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# music-cli
|
|
47
|
+
|
|
48
|
+
[](https://badge.fury.io/py/coder-music-cli)
|
|
49
|
+
[](https://www.python.org/downloads/)
|
|
50
|
+
[](https://opensource.org/licenses/MIT)
|
|
51
|
+
|
|
52
|
+
A command-line music player for coders. Background daemon with radio streaming, local MP3s, and AI-generated music.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
music-cli play --mood focus # Start focus music
|
|
56
|
+
music-cli pause # Pause for meeting
|
|
57
|
+
music-cli resume # Back to coding
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Install from PyPI
|
|
64
|
+
pip install coder-music-cli
|
|
65
|
+
|
|
66
|
+
# Or with uv (faster)
|
|
67
|
+
uv pip install coder-music-cli
|
|
68
|
+
|
|
69
|
+
# Install FFmpeg (required)
|
|
70
|
+
brew install ffmpeg # macOS
|
|
71
|
+
sudo apt install ffmpeg # Ubuntu/Debian
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Optional: AI Music Generation
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install 'coder-music-cli[ai]' # ~5GB (PyTorch + MusicGen)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Features
|
|
81
|
+
|
|
82
|
+
- **Daemon-based** - Persistent background playback
|
|
83
|
+
- **Multiple sources** - Local files, radio streams, AI generation
|
|
84
|
+
- **Context-aware** - Selects music based on time of day and mood
|
|
85
|
+
- **Simple config** - Human-readable text files
|
|
86
|
+
|
|
87
|
+
## Quick Start
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Play
|
|
91
|
+
music-cli play # Context-aware radio
|
|
92
|
+
music-cli play --mood focus # Focus music
|
|
93
|
+
music-cli play -m local --auto # Shuffle local library
|
|
94
|
+
|
|
95
|
+
# Control
|
|
96
|
+
music-cli pause | resume | stop | status
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Commands
|
|
100
|
+
|
|
101
|
+
| Command | Description |
|
|
102
|
+
|---------|-------------|
|
|
103
|
+
| `play` | Start playing (radio/local/ai/history) |
|
|
104
|
+
| `stop` / `pause` / `resume` | Playback control |
|
|
105
|
+
| `status` | Current track and state |
|
|
106
|
+
| `next` | Skip track (auto-play mode) |
|
|
107
|
+
| `volume [0-100]` | Get/set volume |
|
|
108
|
+
| `radios` | List stations |
|
|
109
|
+
| `history` | Playback log |
|
|
110
|
+
| `moods` | Available mood tags |
|
|
111
|
+
| `daemon start\|stop\|status` | Daemon control |
|
|
112
|
+
|
|
113
|
+
## Play Modes
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Radio (default)
|
|
117
|
+
music-cli play # Time-based selection
|
|
118
|
+
music-cli play -s "deep house" # By station name
|
|
119
|
+
music-cli play --mood focus # By mood
|
|
120
|
+
|
|
121
|
+
# Local
|
|
122
|
+
music-cli play -m local -s song.mp3
|
|
123
|
+
music-cli play -m local --auto # Shuffle
|
|
124
|
+
|
|
125
|
+
# AI (requires [ai] extras)
|
|
126
|
+
music-cli play -m ai --mood happy -d 60
|
|
127
|
+
|
|
128
|
+
# History
|
|
129
|
+
music-cli play -m history -i 3 # Replay item #3
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Moods
|
|
133
|
+
|
|
134
|
+
`focus` `happy` `sad` `excited` `relaxed` `energetic` `melancholic` `peaceful`
|
|
135
|
+
|
|
136
|
+
## Configuration
|
|
137
|
+
|
|
138
|
+
Files in `~/.config/music-cli/`:
|
|
139
|
+
|
|
140
|
+
| File | Purpose |
|
|
141
|
+
|------|---------|
|
|
142
|
+
| `config.toml` | Settings |
|
|
143
|
+
| `radios.txt` | Station URLs |
|
|
144
|
+
| `history.jsonl` | Play history |
|
|
145
|
+
|
|
146
|
+
Add stations to `radios.txt`:
|
|
147
|
+
```
|
|
148
|
+
ChillHop|https://streams.example.com/chillhop.mp3
|
|
149
|
+
Jazz FM|https://streams.example.com/jazz.mp3
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Documentation
|
|
153
|
+
|
|
154
|
+
| Document | Description |
|
|
155
|
+
|----------|-------------|
|
|
156
|
+
| [User Guide](docs/user-guide.md) | Complete usage instructions |
|
|
157
|
+
| [Architecture](docs/architecture.md) | System design and diagrams |
|
|
158
|
+
| [Development](docs/development.md) | Contributing guide |
|
|
159
|
+
|
|
160
|
+
## Requirements
|
|
161
|
+
|
|
162
|
+
- Python 3.9+
|
|
163
|
+
- FFmpeg
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
MIT
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# music-cli
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/coder-music-cli)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
A command-line music player for coders. Background daemon with radio streaming, local MP3s, and AI-generated music.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
music-cli play --mood focus # Start focus music
|
|
11
|
+
music-cli pause # Pause for meeting
|
|
12
|
+
music-cli resume # Back to coding
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Install from PyPI
|
|
19
|
+
pip install coder-music-cli
|
|
20
|
+
|
|
21
|
+
# Or with uv (faster)
|
|
22
|
+
uv pip install coder-music-cli
|
|
23
|
+
|
|
24
|
+
# Install FFmpeg (required)
|
|
25
|
+
brew install ffmpeg # macOS
|
|
26
|
+
sudo apt install ffmpeg # Ubuntu/Debian
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Optional: AI Music Generation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install 'coder-music-cli[ai]' # ~5GB (PyTorch + MusicGen)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- **Daemon-based** - Persistent background playback
|
|
38
|
+
- **Multiple sources** - Local files, radio streams, AI generation
|
|
39
|
+
- **Context-aware** - Selects music based on time of day and mood
|
|
40
|
+
- **Simple config** - Human-readable text files
|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Play
|
|
46
|
+
music-cli play # Context-aware radio
|
|
47
|
+
music-cli play --mood focus # Focus music
|
|
48
|
+
music-cli play -m local --auto # Shuffle local library
|
|
49
|
+
|
|
50
|
+
# Control
|
|
51
|
+
music-cli pause | resume | stop | status
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Commands
|
|
55
|
+
|
|
56
|
+
| Command | Description |
|
|
57
|
+
|---------|-------------|
|
|
58
|
+
| `play` | Start playing (radio/local/ai/history) |
|
|
59
|
+
| `stop` / `pause` / `resume` | Playback control |
|
|
60
|
+
| `status` | Current track and state |
|
|
61
|
+
| `next` | Skip track (auto-play mode) |
|
|
62
|
+
| `volume [0-100]` | Get/set volume |
|
|
63
|
+
| `radios` | List stations |
|
|
64
|
+
| `history` | Playback log |
|
|
65
|
+
| `moods` | Available mood tags |
|
|
66
|
+
| `daemon start\|stop\|status` | Daemon control |
|
|
67
|
+
|
|
68
|
+
## Play Modes
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Radio (default)
|
|
72
|
+
music-cli play # Time-based selection
|
|
73
|
+
music-cli play -s "deep house" # By station name
|
|
74
|
+
music-cli play --mood focus # By mood
|
|
75
|
+
|
|
76
|
+
# Local
|
|
77
|
+
music-cli play -m local -s song.mp3
|
|
78
|
+
music-cli play -m local --auto # Shuffle
|
|
79
|
+
|
|
80
|
+
# AI (requires [ai] extras)
|
|
81
|
+
music-cli play -m ai --mood happy -d 60
|
|
82
|
+
|
|
83
|
+
# History
|
|
84
|
+
music-cli play -m history -i 3 # Replay item #3
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Moods
|
|
88
|
+
|
|
89
|
+
`focus` `happy` `sad` `excited` `relaxed` `energetic` `melancholic` `peaceful`
|
|
90
|
+
|
|
91
|
+
## Configuration
|
|
92
|
+
|
|
93
|
+
Files in `~/.config/music-cli/`:
|
|
94
|
+
|
|
95
|
+
| File | Purpose |
|
|
96
|
+
|------|---------|
|
|
97
|
+
| `config.toml` | Settings |
|
|
98
|
+
| `radios.txt` | Station URLs |
|
|
99
|
+
| `history.jsonl` | Play history |
|
|
100
|
+
|
|
101
|
+
Add stations to `radios.txt`:
|
|
102
|
+
```
|
|
103
|
+
ChillHop|https://streams.example.com/chillhop.mp3
|
|
104
|
+
Jazz FM|https://streams.example.com/jazz.mp3
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Documentation
|
|
108
|
+
|
|
109
|
+
| Document | Description |
|
|
110
|
+
|----------|-------------|
|
|
111
|
+
| [User Guide](docs/user-guide.md) | Complete usage instructions |
|
|
112
|
+
| [Architecture](docs/architecture.md) | System design and diagrams |
|
|
113
|
+
| [Development](docs/development.md) | Contributing guide |
|
|
114
|
+
|
|
115
|
+
## Requirements
|
|
116
|
+
|
|
117
|
+
- Python 3.9+
|
|
118
|
+
- FFmpeg
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
MIT
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: coder-music-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A command-line music application for coders with daemon support, radio streaming, and AI-generated music
|
|
5
|
+
Author-email: Luong Nguyen <luongnv89@gmail.com>
|
|
6
|
+
Maintainer-email: Luong Nguyen <luongnv89@gmail.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/luongnv89/music-cli
|
|
9
|
+
Project-URL: Repository, https://github.com/luongnv89/music-cli
|
|
10
|
+
Project-URL: Documentation, https://github.com/luongnv89/music-cli#readme
|
|
11
|
+
Project-URL: Issues, https://github.com/luongnv89/music-cli/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/luongnv89/music-cli/releases
|
|
13
|
+
Keywords: music,cli,daemon,radio,ai-music,focus,coding,background-music,lofi,productivity
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
18
|
+
Classifier: Operating System :: MacOS
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Players
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: click>=8.0
|
|
29
|
+
Requires-Dist: tomli>=2.0; python_version < "3.11"
|
|
30
|
+
Requires-Dist: tomli-w>=1.0
|
|
31
|
+
Provides-Extra: ai
|
|
32
|
+
Requires-Dist: torch>=2.0; extra == "ai"
|
|
33
|
+
Requires-Dist: transformers>=4.30; extra == "ai"
|
|
34
|
+
Requires-Dist: audiocraft>=1.0; extra == "ai"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
39
|
+
Requires-Dist: black>=23.0; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
42
|
+
Requires-Dist: bandit>=1.7; extra == "dev"
|
|
43
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# music-cli
|
|
47
|
+
|
|
48
|
+
[](https://badge.fury.io/py/coder-music-cli)
|
|
49
|
+
[](https://www.python.org/downloads/)
|
|
50
|
+
[](https://opensource.org/licenses/MIT)
|
|
51
|
+
|
|
52
|
+
A command-line music player for coders. Background daemon with radio streaming, local MP3s, and AI-generated music.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
music-cli play --mood focus # Start focus music
|
|
56
|
+
music-cli pause # Pause for meeting
|
|
57
|
+
music-cli resume # Back to coding
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Install from PyPI
|
|
64
|
+
pip install coder-music-cli
|
|
65
|
+
|
|
66
|
+
# Or with uv (faster)
|
|
67
|
+
uv pip install coder-music-cli
|
|
68
|
+
|
|
69
|
+
# Install FFmpeg (required)
|
|
70
|
+
brew install ffmpeg # macOS
|
|
71
|
+
sudo apt install ffmpeg # Ubuntu/Debian
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Optional: AI Music Generation
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install 'coder-music-cli[ai]' # ~5GB (PyTorch + MusicGen)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Features
|
|
81
|
+
|
|
82
|
+
- **Daemon-based** - Persistent background playback
|
|
83
|
+
- **Multiple sources** - Local files, radio streams, AI generation
|
|
84
|
+
- **Context-aware** - Selects music based on time of day and mood
|
|
85
|
+
- **Simple config** - Human-readable text files
|
|
86
|
+
|
|
87
|
+
## Quick Start
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Play
|
|
91
|
+
music-cli play # Context-aware radio
|
|
92
|
+
music-cli play --mood focus # Focus music
|
|
93
|
+
music-cli play -m local --auto # Shuffle local library
|
|
94
|
+
|
|
95
|
+
# Control
|
|
96
|
+
music-cli pause | resume | stop | status
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Commands
|
|
100
|
+
|
|
101
|
+
| Command | Description |
|
|
102
|
+
|---------|-------------|
|
|
103
|
+
| `play` | Start playing (radio/local/ai/history) |
|
|
104
|
+
| `stop` / `pause` / `resume` | Playback control |
|
|
105
|
+
| `status` | Current track and state |
|
|
106
|
+
| `next` | Skip track (auto-play mode) |
|
|
107
|
+
| `volume [0-100]` | Get/set volume |
|
|
108
|
+
| `radios` | List stations |
|
|
109
|
+
| `history` | Playback log |
|
|
110
|
+
| `moods` | Available mood tags |
|
|
111
|
+
| `daemon start\|stop\|status` | Daemon control |
|
|
112
|
+
|
|
113
|
+
## Play Modes
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Radio (default)
|
|
117
|
+
music-cli play # Time-based selection
|
|
118
|
+
music-cli play -s "deep house" # By station name
|
|
119
|
+
music-cli play --mood focus # By mood
|
|
120
|
+
|
|
121
|
+
# Local
|
|
122
|
+
music-cli play -m local -s song.mp3
|
|
123
|
+
music-cli play -m local --auto # Shuffle
|
|
124
|
+
|
|
125
|
+
# AI (requires [ai] extras)
|
|
126
|
+
music-cli play -m ai --mood happy -d 60
|
|
127
|
+
|
|
128
|
+
# History
|
|
129
|
+
music-cli play -m history -i 3 # Replay item #3
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Moods
|
|
133
|
+
|
|
134
|
+
`focus` `happy` `sad` `excited` `relaxed` `energetic` `melancholic` `peaceful`
|
|
135
|
+
|
|
136
|
+
## Configuration
|
|
137
|
+
|
|
138
|
+
Files in `~/.config/music-cli/`:
|
|
139
|
+
|
|
140
|
+
| File | Purpose |
|
|
141
|
+
|------|---------|
|
|
142
|
+
| `config.toml` | Settings |
|
|
143
|
+
| `radios.txt` | Station URLs |
|
|
144
|
+
| `history.jsonl` | Play history |
|
|
145
|
+
|
|
146
|
+
Add stations to `radios.txt`:
|
|
147
|
+
```
|
|
148
|
+
ChillHop|https://streams.example.com/chillhop.mp3
|
|
149
|
+
Jazz FM|https://streams.example.com/jazz.mp3
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Documentation
|
|
153
|
+
|
|
154
|
+
| Document | Description |
|
|
155
|
+
|----------|-------------|
|
|
156
|
+
| [User Guide](docs/user-guide.md) | Complete usage instructions |
|
|
157
|
+
| [Architecture](docs/architecture.md) | System design and diagrams |
|
|
158
|
+
| [Development](docs/development.md) | Contributing guide |
|
|
159
|
+
|
|
160
|
+
## Requirements
|
|
161
|
+
|
|
162
|
+
- Python 3.9+
|
|
163
|
+
- FFmpeg
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
MIT
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
coder_music_cli.egg-info/PKG-INFO
|
|
5
|
+
coder_music_cli.egg-info/SOURCES.txt
|
|
6
|
+
coder_music_cli.egg-info/dependency_links.txt
|
|
7
|
+
coder_music_cli.egg-info/entry_points.txt
|
|
8
|
+
coder_music_cli.egg-info/requires.txt
|
|
9
|
+
coder_music_cli.egg-info/top_level.txt
|
|
10
|
+
music_cli/__init__.py
|
|
11
|
+
music_cli/__main__.py
|
|
12
|
+
music_cli/cli.py
|
|
13
|
+
music_cli/client.py
|
|
14
|
+
music_cli/config.py
|
|
15
|
+
music_cli/daemon.py
|
|
16
|
+
music_cli/history.py
|
|
17
|
+
music_cli/context/__init__.py
|
|
18
|
+
music_cli/context/mood.py
|
|
19
|
+
music_cli/context/temporal.py
|
|
20
|
+
music_cli/player/__init__.py
|
|
21
|
+
music_cli/player/base.py
|
|
22
|
+
music_cli/player/ffplay.py
|
|
23
|
+
music_cli/sources/__init__.py
|
|
24
|
+
music_cli/sources/ai_generator.py
|
|
25
|
+
music_cli/sources/local.py
|
|
26
|
+
music_cli/sources/radio.py
|
|
27
|
+
tests/test_config.py
|
|
28
|
+
tests/test_context.py
|
|
29
|
+
tests/test_history.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
click>=8.0
|
|
2
|
+
tomli-w>=1.0
|
|
3
|
+
|
|
4
|
+
[:python_version < "3.11"]
|
|
5
|
+
tomli>=2.0
|
|
6
|
+
|
|
7
|
+
[ai]
|
|
8
|
+
torch>=2.0
|
|
9
|
+
transformers>=4.30
|
|
10
|
+
audiocraft>=1.0
|
|
11
|
+
|
|
12
|
+
[dev]
|
|
13
|
+
pytest>=7.0
|
|
14
|
+
pytest-asyncio>=0.21
|
|
15
|
+
pytest-cov>=4.0
|
|
16
|
+
black>=23.0
|
|
17
|
+
ruff>=0.1
|
|
18
|
+
mypy>=1.0
|
|
19
|
+
bandit>=1.7
|
|
20
|
+
pre-commit>=3.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
music_cli
|