《魔兽争霸III 农民语音提示,用于Claude代码》
Warcraft III Peon Voice Notifications for Claude Code

原始链接: https://github.com/tonyyont/peon-ping

## peon-ping: 专注伴侣,Claude 代码助手 在使用 Claude 代码完成任务或需要输入时是否容易分心?**peon-ping** 通过使用标志性的《魔兽争霸III》农民(Peon)语音线(以及更多!)来提醒你,帮助你保持专注。 此工具拦截 Claude 代码事件——任务完成、权限请求和会话开始——并播放相应的声音。它还会更新你的终端标签标题,并在终端未处于活动状态时提供桌面通知。 **安装非常简单:** macOS 和 WSL2 只需要一条命令 (`curl -fsSL https://raw.githubusercontent.com/tonyyont/peon-ping/main/install.sh | bash`)。 **主要特点:** * **可定制:** 调整音量,切换声音类别,并从各种声音包中选择(包括法语和波兰语农民声音、红色警戒2工程师和星际争霸角色)。 * **控制:** 通过 CLI 或斜杠命令暂停/恢复通知。 * **可配置:** 编辑 `config.json` 以进行高级设置,例如包轮换。 了解更多并开始使用:[peon-ping.vercel.app](peon-ping.vercel.app)

一位开发者在Hacker News分享了一个项目([github.com/tonyyont](https://github.com/tonyyont)),它使用《魔兽争霸III》的声音效果——特别是“农民”单位的声音——为Claude,一个AI编程助手,提供通知。该项目采用MIT许可,引发了关于在开源AI工具中使用暴雪版权资产的伦理问题的一段简短讨论。 评论者们争论了任务完成时合适的音效,建议范围从“完成!”到准确反映游戏中农民回应的声音。对单位类型进行了一处小小的修正,明确声音来源于人类单位的“农夫”而非“农民”。整体基调轻松幽默,一位评论者戏谑地指出,版权问题在AI领域很常见。
相关文章

原文

macOS WSL2 License Claude Code

Your Peon pings you when Claude Code needs attention.

Claude Code doesn't notify you when it finishes or needs permission. You tab away, lose focus, and waste 15 minutes getting back into flow. peon-ping fixes this with Warcraft III Peon voice lines — so you never miss a beat, and your terminal sounds like Orgrimmar.

See it in actionpeon-ping.vercel.app

curl -fsSL https://raw.githubusercontent.com/tonyyont/peon-ping/main/install.sh | bash

One command. Takes 10 seconds. macOS and WSL2 (Windows). Re-run to update (sounds and config preserved).

Event Sound Examples
Session starts Greeting "Ready to work?", "Yes?", "What you want?"
Task finishes Acknowledgment "Work, work.", "I can do that.", "Okie dokie."
Permission needed Alert "Something need doing?", "Hmm?", "What you want?"
Rapid prompts (3+ in 10s) Easter egg "Me busy, leave me alone!"

Plus Terminal tab titles (● project: done) and desktop notifications when your terminal isn't focused.

Need to mute sounds and notifications during a meeting or pairing session? Two options:

Method Command When
Slash command /peon-ping-toggle While working in Claude Code
CLI peon --toggle From any terminal tab

Other CLI commands:

peon --pause          # Mute sounds
peon --resume         # Unmute sounds
peon --status         # Check if paused or active
peon --packs          # List available sound packs
peon --pack <name>    # Switch to a specific pack
peon --pack           # Cycle to the next pack

Tab completion is supported — type peon --pack <TAB> to see available pack names.

Pausing mutes sounds and desktop notifications instantly. Persists across sessions until you resume. Tab titles remain active when paused.

Edit ~/.claude/hooks/peon-ping/config.json:

{
  "volume": 0.5,
  "categories": {
    "greeting": true,
    "acknowledge": true,
    "complete": true,
    "error": true,
    "permission": true,
    "annoyed": true
  }
}
  • volume: 0.0–1.0 (quiet enough for the office)
  • categories: Toggle individual sound types on/off
  • annoyed_threshold / annoyed_window_seconds: How many prompts in N seconds triggers the easter egg
  • pack_rotation: Array of pack names (e.g. ["peon", "sc_kerrigan", "peasant"]). Each Claude Code session randomly gets one pack from the list and keeps it for the whole session. Leave empty [] to use active_pack instead.
Pack Character Sounds By
peon (default) Orc Peon (Warcraft III) "Ready to work?", "Work, work.", "Okie dokie." @tonyyont
peon_fr Orc Peon (Warcraft III, French) "Prêt à travailler?", "Travail, travail.", "D'accord." @thomasKn
peon_pl Orc Peon (Warcraft III, Polish) Polish voice lines @askowronski
peasant Human Peasant (Warcraft III) "Yes, milord?", "Job's done!", "Ready, sir." @thomasKn
peasant_fr Human Peasant (Warcraft III, French) "Oui, monseigneur?", "C'est fait!", "Prêt, monsieur." @thomasKn
ra2_soviet_engineer Soviet Engineer (Red Alert 2) "Tools ready", "Yes, commander", "Engineering" @msukkari
sc_battlecruiser Battlecruiser (StarCraft) "Battlecruiser operational", "Make it happen", "Engage" @garysheng
sc_kerrigan Sarah Kerrigan (StarCraft) "I gotcha", "What now?", "Easily amused, huh?" @garysheng

Switch packs from the CLI:

peon --pack ra2_soviet_engineer   # switch to a specific pack
peon --pack                       # cycle to the next pack
peon --packs                      # list all packs

Or edit ~/.claude/hooks/peon-ping/config.json directly:

{ "active_pack": "ra2_soviet_engineer" }

Want to add your own pack? See CONTRIBUTING.md.

bash ~/.claude/hooks/peon-ping/uninstall.sh
  • macOS (uses afplay and AppleScript) or WSL2 (uses PowerShell MediaPlayer and WinForms)
  • Claude Code with hooks support
  • python3

peon.sh is a Claude Code hook registered for SessionStart, UserPromptSubmit, Stop, and Notification events. On each event it maps to a sound category, picks a random voice line (avoiding repeats), plays it via afplay (macOS) or PowerShell MediaPlayer (WSL2), and updates your Terminal tab title.

Sound files are property of their respective publishers (Blizzard Entertainment, EA) and are included in the repo for convenience.

联系我们 contact @ memedata.com