Claude Codeのタスク完了時に「ブヒ」音を鳴らすジョークリポジトリです。
このリポジトリは、Claude Codeのhooks機能を使用してタスク完了時に音声ファイルを再生する設定を提供します。 タスクが完了するたびに「ブヒ」という可愛い音が鳴ります。
Claudeがこのリポジトリを設定する場合の完全な手順:
git clone https://github.com/guchey/buhi.git
cd buhi# Claude Code設定ディレクトリを作成
mkdir -p ~/.claude# buhi.m4aファイルをClaude設定ディレクトリにコピー
cp buhi.m4a ~/.claude/~/.claude/settings.jsonファイルを作成または更新します:
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "afplay ~/.claude/buhi.m4a"
}
]
}
]
}
}重要: 既存のsettings.jsonがある場合は、hooksセクションを適切にマージしてください。
# 音声ファイルが正しくコピーされているか確認
ls -la ~/.claude/buhi.m4a
# 音声が再生されるかテスト
afplay ~/.claude/buhi.m4a設定を有効にするためにClaude Codeを再起動してください。
- 上記のセットアップを完了
- Claude Codeでタスクを実行
- タスク完了時に自動的に「ブヒ」音が再生される
- macOSの
afplayコマンドを使用しているため、macOS環境でのみ動作します - 他のOSを使用している場合は、適切な音声再生コマンドに変更してください:
- Windows:
powershell -c (New-Object Media.SoundPlayer "path/to/buhi.wav").PlaySync() - Linux:
aplay buhi.wavまたはpaplay buhi.wav
- Windows:
- 他の音声ファイルに変更したい場合は、
buhi.m4aを別のファイルに置き換えてください - 音量を調整したい場合は、
afplayコマンドに-vオプションを追加できます:"command": "afplay -v 0.5 ~/.claude/buhi.m4a"
既存の~/.claude/settings.jsonがある場合の適切なマージ方法:
- 既存ファイルの確認:
cat ~/.claude/settings.json- hooksセクションの追加:
既存の設定に
hooksセクションを追加します。例:
{
"existing_setting": "value",
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "afplay ~/.claude/buhi.m4a"
}
]
}
]
}
}- macOS:
afplay ~/.claude/buhi.m4a - Windows:
powershell -c "(New-Object Media.SoundPlayer '~/.claude/buhi.wav').PlaySync()" - Linux:
aplay ~/.claude/buhi.wavまたはpaplay ~/.claude/buhi.wav
-
音声が鳴らない場合:
- ファイルパスの確認:
ls -la ~/.claude/buhi.m4a - 音声テスト:
afplay ~/.claude/buhi.m4a - Claude Code再起動
- ファイルパスの確認:
-
設定が反映されない場合:
- JSONシンタックスの確認
- settings.jsonの権限確認
- Claude Codeの完全再起動
これはジョークリポジトリです。職場や静かな環境での使用は十分にご注意ください!