|
// Minecraft Sound Effects for Claude Code Hooks (macOS) |
|
// |
|
// Each Claude Code hook event plays a thematic Minecraft sound. |
|
// Sounds are .ogg files in ~/Documents/minecraft-claude-code-sounds/<HookName>/ |
|
// A random variation is picked each time via `sort -R | head -1`. |
|
// |
|
// Hook -> Sound mapping: |
|
// SessionStart -> Chest open (opening a session) |
|
// SessionEnd -> Chest close (closing up) |
|
// UserPromptSubmit -> Note block bell (ding! you rang?) |
|
// PreToolUse -> Door open (stepping through) |
|
// PostToolUse -> Levelup/click/pop (XP gained) |
|
// PostToolUseFailure -> Creeper fuse + boom (ssss... that failed) |
|
// PermissionRequest -> Villager "hmm?" (waiting for your decision) |
|
// PermissionDenied -> Villager "no" (hrmph!) |
|
// SubagentStart -> Enderman teleport (vwoop! agent in) |
|
// SubagentStop -> Enderman teleport (vwoop! agent out) |
|
// TaskCompleted -> Levelup fanfare (task done!) |
|
// Stop -> Villager "yes" (done talking) |
|
// StopFailure -> Explosion (boom) |
|
// PreCompact -> Piston extend + composter fill (squishing context) |
|
// PostCompact -> Piston contract + composter ready (compaction done) |
|
// Notification -> Note block harp (gentle chime) |
|
// WorktreeCreate -> Grass place (planting a tree) |
|
// WorktreeRemove -> Wood break (chopping it down) |
|
// FileChanged -> Snare/hat (percussive alert) |
|
// CwdChanged -> Fox sniff (sniffing around new dir) |
|
// InstructionsLoaded -> Page turn (opening the book) |
|
// |
|
// To use: download Minecraft .ogg sounds from the wiki into the folder structure, |
|
// then paste the "hooks" block below into ~/.claude/settings.json. |
|
// |
|
// Tip: PreToolUse fires A LOT. Remove it if it gets noisy. |
|
|
|
{ |
|
"hooks": { |
|
"SessionStart": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SessionStart/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"SessionEnd": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SessionEnd/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"UserPromptSubmit": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/UserPromptSubmit/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"PreToolUse": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PreToolUse/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"PostToolUse": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PostToolUse/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"PostToolUseFailure": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PostToolUseFailure/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"PermissionRequest": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PermissionRequest/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"PermissionDenied": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PermissionDenied/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"SubagentStart": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SubagentStart/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"SubagentStop": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/SubagentStop/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"TaskCompleted": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/TaskCompleted/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"Stop": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/Stop/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"StopFailure": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/StopFailure/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"PreCompact": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PreCompact/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"PostCompact": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/PostCompact/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"Notification": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/Notification/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"WorktreeCreate": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/WorktreeCreate/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"WorktreeRemove": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/WorktreeRemove/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"FileChanged": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/FileChanged/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"CwdChanged": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/CwdChanged/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
], |
|
"InstructionsLoaded": [ |
|
{ |
|
"hooks": [ |
|
{ |
|
"type": "command", |
|
"command": "afplay \"$(ls ~/Documents/minecraft-claude-code-sounds/InstructionsLoaded/*.ogg | sort -R | head -1)\" &" |
|
} |
|
] |
|
} |
|
] |
|
} |
|
} |