claude-music 1.0.0
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.
- package/README.md +83 -0
- package/daemon/CMakeLists.txt +26 -0
- package/daemon/include/audio_output.h +36 -0
- package/daemon/include/command.h +24 -0
- package/daemon/include/socket_server.h +30 -0
- package/daemon/src/audio_output.cpp +68 -0
- package/daemon/src/command.cpp +35 -0
- package/daemon/src/main.cpp +126 -0
- package/daemon/src/socket_server.cpp +78 -0
- package/daemon/tests/test_command.cpp +74 -0
- package/daemon/tests/test_socket.cpp +89 -0
- package/dist/__tests__/download.test.js +25 -0
- package/dist/__tests__/vibe.test.js +15 -0
- package/dist/cli.js +66 -0
- package/dist/download.js +154 -0
- package/dist/install.js +232 -0
- package/dist/paths.js +26 -0
- package/dist/server.js +128 -0
- package/dist/vibe.js +3 -0
- package/package.json +56 -0
- package/templates/music.md +28 -0
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-music",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Live AI background music for Claude Code, scored in real time by Claude itself (Magenta RealTime 2 on Apple Silicon).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"claude-music": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/server.js",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"templates",
|
|
13
|
+
"daemon"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=18"
|
|
17
|
+
},
|
|
18
|
+
"os": [
|
|
19
|
+
"darwin"
|
|
20
|
+
],
|
|
21
|
+
"cpu": [
|
|
22
|
+
"arm64"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"prepublishOnly": "npm run build",
|
|
27
|
+
"mcp": "node dist/cli.js mcp",
|
|
28
|
+
"test": "vitest run"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"claude",
|
|
32
|
+
"claude-code",
|
|
33
|
+
"mcp",
|
|
34
|
+
"music",
|
|
35
|
+
"magenta",
|
|
36
|
+
"mrt2"
|
|
37
|
+
],
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/noo-bass/claude-music.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/noo-bass/claude-music#readme",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/noo-bass/claude-music/issues"
|
|
45
|
+
},
|
|
46
|
+
"license": "Apache-2.0",
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
49
|
+
"zod": "^3.23.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@types/node": "^22.0.0",
|
|
53
|
+
"typescript": "^5.5.0",
|
|
54
|
+
"vitest": "^2.0.0"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start/stop/check AI background music (MRT2) that syncs to your coding
|
|
3
|
+
argument-hint: "[start|stop|status]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Action: **$ARGUMENTS** (default `start`). No preamble, no bash narration — one short line of output.
|
|
7
|
+
|
|
8
|
+
## start (or empty)
|
|
9
|
+
Set an opening vibe of YOUR choosing — something that fits *this* project and where we are right now (take a beat to consider what we're building and what we're about to do). Don't default to a canned prompt; have taste.
|
|
10
|
+
|
|
11
|
+
- Preferred: call the `set_music_vibe` tool with your chosen prompt (energy lives in the words).
|
|
12
|
+
- If that tool isn't available (the MCP server only loads at launch, so it's missing the first time after install), fall back quietly: start the daemon and send your vibe over the socket —
|
|
13
|
+
```
|
|
14
|
+
claude-music start
|
|
15
|
+
printf '%s\n' '{"prompt":"<YOUR VIBE>"}' | nc -U ~/.mrt2d.sock
|
|
16
|
+
```
|
|
17
|
+
— then add one line noting that a one-time restart of Claude Code unlocks silent auto-steering as you work.
|
|
18
|
+
|
|
19
|
+
Output one line naming the vibe you set, e.g. `♪ <your vibe> — I'll keep scoring as we go.`
|
|
20
|
+
|
|
21
|
+
## stop
|
|
22
|
+
Call `stop_music` if available, else `claude-music stop`. Output `♪ Music stopped.`
|
|
23
|
+
|
|
24
|
+
## status
|
|
25
|
+
Run `claude-music status` and report the current prompt in one line.
|
|
26
|
+
|
|
27
|
+
## You are scoring this session
|
|
28
|
+
While the music plays you are the DJ — keep the soundtrack in step with the real work, silently (never announce a change). No fixed playlist: decide what fits, with personality. React to **the project's character** (a playful game, gnarly infra, a slick frontend, a research script all want different sounds), **what you're actually doing** (careful exploration, a flow-state grind, hunting a nasty bug, mechanical cleanup, a victory lap on green tests), and **how it feels** (stuck and tense, cruising, triumphant). Be specific and inventive with prompts (genre, instruments, era, tempo, mood) — and put the **energy right in the words** ("slow and sparse" vs "frantic, high-BPM, pounding"). Vary them; don't loop one vibe. Re-vibe whenever the feel of the work shifts.
|