klaudio 0.1.0 → 0.3.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 +67 -65
- package/package.json +44 -40
- package/src/cache.js +262 -262
- package/src/cli.js +1205 -999
- package/src/extractor.js +203 -203
- package/src/installer.js +161 -128
- package/src/player.js +359 -359
- package/src/presets.js +5 -5
- package/src/scanner.js +41 -6
- package/src/unity.js +241 -0
package/README.md
CHANGED
|
@@ -1,65 +1,67 @@
|
|
|
1
|
-
# klaudio
|
|
2
|
-
|
|
3
|
-
Add sound effects to your [Claude Code](https://docs.anthropic.com/en/docs/claude-code) sessions. Plays sounds when Claude finishes a task, sends a notification, and more.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx klaudio
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
The interactive installer walks you through:
|
|
12
|
-
|
|
13
|
-
1. **Choose scope** — install globally (`~/.claude`) or per-project (`.claude/`)
|
|
14
|
-
2. **Pick a source** — use a built-in preset, scan your local games for sounds, or provide custom files
|
|
15
|
-
3. **Preview & assign** — listen to sounds and assign them to events
|
|
16
|
-
4. **Install** — writes Claude Code hooks to your `settings.json`
|
|
17
|
-
|
|
18
|
-
## Sound Sources
|
|
19
|
-
|
|
20
|
-
### Built-in Presets
|
|
21
|
-
|
|
22
|
-
Ready-made sound packs (Retro 8-bit, Minimal Zen, Sci-Fi Terminal, Victory Fanfare) that work out of the box.
|
|
23
|
-
|
|
24
|
-
### Game Sound Scanner
|
|
25
|
-
|
|
26
|
-
Scans your Steam and Epic Games libraries for audio files:
|
|
27
|
-
|
|
28
|
-
- Finds loose audio files (`.wav`, `.mp3`, `.ogg`, `.flac`, `.aac`)
|
|
29
|
-
- Extracts packed audio (Wwise `.wem`, FMOD `.bank`, `.fsb`) using [vgmstream](https://vgmstream.org/) (downloaded automatically)
|
|
30
|
-
- Parses Wwise metadata (`SoundbanksInfo.json`) for descriptive filenames
|
|
31
|
-
- Categorizes sounds (voice, ambient, music, SFX, UI, creature) for easy browsing
|
|
32
|
-
- Caches extracted sounds in `~/.klonk/cache/` for instant reuse
|
|
33
|
-
|
|
34
|
-
### Custom Files
|
|
35
|
-
|
|
36
|
-
Point to your own `.wav`/`.mp3` files.
|
|
37
|
-
|
|
38
|
-
## Features
|
|
39
|
-
|
|
40
|
-
- **Auto-preview** — sounds play automatically as you browse the list (toggle with `p`)
|
|
41
|
-
- **Category filtering** — drill into voice, ambient, SFX, etc. when a game has enough variety
|
|
42
|
-
- **Type-to-filter** — start typing to narrow down long lists
|
|
43
|
-
- **10-second clamp** — long sounds are processed with ffmpeg: silence stripped, fade out baked in
|
|
44
|
-
- **Background scanning** — game list updates live as directories are scanned
|
|
45
|
-
- **Cross-platform** — Windows (PowerShell/ffplay), macOS (afplay/ffplay), Linux (aplay/ffplay)
|
|
46
|
-
|
|
47
|
-
## Events
|
|
48
|
-
|
|
49
|
-
| Event | Triggers when |
|
|
50
|
-
|---|---|
|
|
51
|
-
| Task Complete | Claude finishes a response |
|
|
52
|
-
| Notification | Claude needs your attention |
|
|
53
|
-
|
|
54
|
-
## Uninstall
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
npx klaudio --uninstall
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Requirements
|
|
61
|
-
|
|
62
|
-
- Node.js 18+ (Claude Code already requires this)
|
|
63
|
-
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed
|
|
64
|
-
- For packed audio extraction: internet connection (vgmstream-cli is downloaded automatically)
|
|
65
|
-
- For best playback with fade effects: [ffmpeg/ffplay](https://ffmpeg.org/) on PATH (falls back to native players)
|
|
1
|
+
# klaudio
|
|
2
|
+
|
|
3
|
+
Add sound effects to your [Claude Code](https://docs.anthropic.com/en/docs/claude-code) sessions. Plays sounds when Claude finishes a task, sends a notification, and more.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx klaudio
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The interactive installer walks you through:
|
|
12
|
+
|
|
13
|
+
1. **Choose scope** — install globally (`~/.claude`) or per-project (`.claude/`)
|
|
14
|
+
2. **Pick a source** — use a built-in preset, scan your local games for sounds, or provide custom files
|
|
15
|
+
3. **Preview & assign** — listen to sounds and assign them to events
|
|
16
|
+
4. **Install** — writes Claude Code hooks to your `settings.json`
|
|
17
|
+
|
|
18
|
+
## Sound Sources
|
|
19
|
+
|
|
20
|
+
### Built-in Presets
|
|
21
|
+
|
|
22
|
+
Ready-made sound packs (Retro 8-bit, Minimal Zen, Sci-Fi Terminal, Victory Fanfare) that work out of the box.
|
|
23
|
+
|
|
24
|
+
### Game Sound Scanner
|
|
25
|
+
|
|
26
|
+
Scans your Steam and Epic Games libraries for audio files:
|
|
27
|
+
|
|
28
|
+
- Finds loose audio files (`.wav`, `.mp3`, `.ogg`, `.flac`, `.aac`)
|
|
29
|
+
- Extracts packed audio (Wwise `.wem`, FMOD `.bank`, `.fsb`) using [vgmstream](https://vgmstream.org/) (downloaded automatically)
|
|
30
|
+
- Parses Wwise metadata (`SoundbanksInfo.json`) for descriptive filenames
|
|
31
|
+
- Categorizes sounds (voice, ambient, music, SFX, UI, creature) for easy browsing
|
|
32
|
+
- Caches extracted sounds in `~/.klonk/cache/` for instant reuse
|
|
33
|
+
|
|
34
|
+
### Custom Files
|
|
35
|
+
|
|
36
|
+
Point to your own `.wav`/`.mp3` files.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- **Auto-preview** — sounds play automatically as you browse the list (toggle with `p`)
|
|
41
|
+
- **Category filtering** — drill into voice, ambient, SFX, etc. when a game has enough variety
|
|
42
|
+
- **Type-to-filter** — start typing to narrow down long lists
|
|
43
|
+
- **10-second clamp** — long sounds are processed with ffmpeg: silence stripped, fade out baked in
|
|
44
|
+
- **Background scanning** — game list updates live as directories are scanned
|
|
45
|
+
- **Cross-platform** — Windows (PowerShell/ffplay), macOS (afplay/ffplay), Linux (aplay/ffplay)
|
|
46
|
+
|
|
47
|
+
## Events
|
|
48
|
+
|
|
49
|
+
| Event | Triggers when |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Task Complete | Claude finishes a response |
|
|
52
|
+
| Notification | Claude needs your attention |
|
|
53
|
+
|
|
54
|
+
## Uninstall
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx klaudio --uninstall
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Requirements
|
|
61
|
+
|
|
62
|
+
- Node.js 18+ (Claude Code already requires this)
|
|
63
|
+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed
|
|
64
|
+
- For packed audio extraction: internet connection (vgmstream-cli is downloaded automatically)
|
|
65
|
+
- For best playback with fade effects: [ffmpeg/ffplay](https://ffmpeg.org/) on PATH (falls back to native players)
|
|
66
|
+
|
|
67
|
+
> **Note:** Currently only tested on Windows. macOS and Linux support is planned but not yet verified.
|
package/package.json
CHANGED
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "klaudio",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Add sound effects to your coding sessions — play sounds when tasks complete, notifications arrive, and more",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"klaudio": "./bin/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"bin/",
|
|
11
|
-
"src/",
|
|
12
|
-
"sounds/"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"generate-sounds": "node scripts/generate-sounds.js",
|
|
16
|
-
"start": "node bin/cli.js",
|
|
17
|
-
"build": "bun run build.js",
|
|
18
|
-
"build:all": "bun run build.js --all"
|
|
19
|
-
},
|
|
20
|
-
"keywords": [
|
|
21
|
-
"klonk",
|
|
22
|
-
"sounds",
|
|
23
|
-
"sfx",
|
|
24
|
-
"hooks",
|
|
25
|
-
"notifications",
|
|
26
|
-
"audio",
|
|
27
|
-
"claude-code",
|
|
28
|
-
"coding-tools"
|
|
29
|
-
],
|
|
30
|
-
"license": "MIT",
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"ink": "^6.8.0",
|
|
33
|
-
"ink-select-input": "^6.2.0",
|
|
34
|
-
"ink-spinner": "^5.0.0",
|
|
35
|
-
"react": "^19.2.4"
|
|
36
|
-
},
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">=18"
|
|
39
|
-
}
|
|
40
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "klaudio",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Add sound effects to your coding sessions — play sounds when tasks complete, notifications arrive, and more",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"klaudio": "./bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"src/",
|
|
12
|
+
"sounds/"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"generate-sounds": "node scripts/generate-sounds.js",
|
|
16
|
+
"start": "node bin/cli.js",
|
|
17
|
+
"build": "bun run build.js",
|
|
18
|
+
"build:all": "bun run build.js --all"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"klonk",
|
|
22
|
+
"sounds",
|
|
23
|
+
"sfx",
|
|
24
|
+
"hooks",
|
|
25
|
+
"notifications",
|
|
26
|
+
"audio",
|
|
27
|
+
"claude-code",
|
|
28
|
+
"coding-tools"
|
|
29
|
+
],
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"ink": "^6.8.0",
|
|
33
|
+
"ink-select-input": "^6.2.0",
|
|
34
|
+
"ink-spinner": "^5.0.0",
|
|
35
|
+
"react": "^19.2.4"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=18"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/needle-tools/klaudio.git"
|
|
43
|
+
}
|
|
44
|
+
}
|