peon-ping
CLAUDE.md5.1k starsChanged 8 months agoMITView on GitHub
Developer guide for AI coding agents working on this codebase. For user-facing docs (install, configuration, CLI usage, sound packs, remote dev, mobile notifications), see README.md. There is no build step, linter, or formatter configured for the shell codebase. See RELEASING.md for the full release process (version bumps, tagging, Homebrew tap updates). peon-ping is part of the PeonPing org: IDE triggers hook → peon.sh reads JSON stdin → single Python call maps events to CESP categories (session.start, task.complete, input.required, user.spam, etc.)
- Pipes a download into a shell
- Installs packages
- Commits and pushes
Trending
More talk lately.about the whole repository
Who's talking about PeonPing/peon-ping
- pingdotgg/t3code“Feature request: local lifecycle hooks / notification integration for tools like peon-ping”GitHub · Mar 7, 2026 · 11 reactions
- @lunamothryu.bsky.social“PeonPing - Warcraft III 일꾼 음성으로 Claude Code 작업 상태 알려주기 | GeekNews news.hada.io/topic?id=26645 …”Bluesky · Feb 13, 2026 · 3 likes
- A Hacker News story“Warcraft III Peon Voice Notifications for Claude Code, Codex, and Other IDEs”Hacker News · Feb 13, 2026 · 3 points
- A Hacker News story“Peon-Ping”Hacker News · May 7, 2026 · 2 points
- @aminesaboni.bsky.social“Si tu souhaites y ajouter du son : github.com/PeonPing/peo...”Bluesky · Jun 25, 2026 · 1 likes
The biggest 5 of 21 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 21
Talked about on GitHub, Hacker News and Bluesky (21 times).
On GitHub · 15
- Mar 7, 2026Feature request: local lifecycle hooks / notification integration for tools like peon-ping — pingdotgg/t3code11 reactions · 1 comment
- Mar 31, 2026Peon Ping for Raycast: Manage Peon Ping via Raycast UI — raycast/extensions1 reaction · 5 comments
- Feb 20, 2026Feature request: Peon / Peasant from Warcraft 3 — UHHHHHHHHHHHHHH/claude-personalities1 reaction · 1 comment
- Oct 2, 2026feat(opencode): add Windows adapter and fix headless audio playback — rafaelsnv/peon-ping0 reactions · 1 comment
- Oct 1, 2026agent-skills.github.peonping.peon-ping: init at 2.37.0 — sudosubin/agents.nix0 reactions
10 more on GitHub
- May 10, 2026peon-ping ビジュアル解説ページの追加 — 53able/docs-site0 reactions
- May 4, 2026Vol.46 Claude Code 入門 — hst1189/hst1189.github.io0 reactions
- Apr 25, 2026Audit candidate: PeonPing/peon-ping — xiaolai/nlpm0 reactions · 31 comments
- Apr 18, 2026Audit candidate: PeonPing/peon-ping — xiaolai/nlpm0 reactions · 3 comments
- Mar 16, 2026Add PeonPing sound notification integration for OpenCode — darellchua2/civiltekk-skills0 reactions · 1 comment
- Mar 11, 2026Delegate RD CLI to use Peon-Ping's Install Script — PeonPing/homebrew-tap0 reactions · 3 comments
- Mar 8, 2026Improve Peon sound labels and remove cross-category duplicates — PeonPing/og-packs0 reactions · 1 comment
- Feb 26, 2026feat: Add icons for glados, acolytes and peasants packs — PeonPing/og-packs0 reactions
- Feb 18, 2026[Tool] peon-ping — shanselman/TinyToolTown0 reactions · 4 comments
- Feb 18, 2026[BUG] SessionStart hook spawning powershell.exe permanently disables keyboard input in Claude Code TUI on Windows — anthropics/claude-code0 reactions · 3 comments
On Hacker News · 3
- Feb 13, 2026Warcraft III Peon Voice Notifications for Claude Code, Codex, and Other IDEs3 points · 1 comment
- May 7, 2026Peon-Ping2 points
- Feb 16, 2026Peon Training feature piggybacks on AI coding session1 point
On Bluesky · 3
- Feb 13, 2026PeonPing - Warcraft III 일꾼 음성으로 Claude Code 작업 상태 알려주기 | GeekNews news.hada.io/topic?id=26645 PeonPing/peon-ping: Warcraft III Peon voice… — @lunamothryu.bsky.social3 likes and reposts · 1 reply
- Jun 25, 2026Si tu souhaites y ajouter du son : github.com/PeonPing/peo... — @aminesaboni.bsky.social1 likes and repost · 1 reply
- Feb 13, 2026PeonPing - Warcraft III 일꾼 음성으로 Claude Code 작업 상태 알려주기 | GeekNews news.hada.io/topic?id=26645 PeonPing/peon-ping: Warcraft III Peon voice… — @lunamoth.bsky.social1 likes and repost · 1 reply
In this repository7 other files it gives its agents.
- peon-ping-configSkill
- peon-ping-create-packSkill
- peon-ping-logSkill
- peon-ping-remixSkill
- peon-ping-renameSkill
- peon-ping-toggleSkill
- peon-ping-useSkill
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 91
All adapters have native Windows PowerShell (.ps1) counterparts alongside the bash originals.
- Very specific: line 93
All adapters translate IDE-specific events into the standardized CESP JSON format that peon.sh/peon.ps1 expects.
- Distinctive: line 121
After merging PRs that add features, fix bugs, or make notable changes, proactively suggest a version bump.
- Very specific: line 129
Run bats tests/ — all tests must pass
- Very specific: line 130
Update CHANGELOG.md — add new section at top with version, date, and categorized changes (Added/Fixed/Breaking)
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
Developer guide for AI coding agents working on this codebase. For user-facing docs (install, configuration, CLI usage, sound packs, remote dev, mobile notifications), see README.md.
Commands
# Run all tests (requires bats-core: brew install bats-core)
bats tests/
# Run a single test file
bats tests/peon.bats
bats tests/install.bats
# Run a specific test by name
bats tests/peon.bats -f "SessionStart plays a greeting sound"
# Install locally for development (Unix/WSL2)
bash install.sh --local
# Install only specific packs (Unix/WSL2)
bash install.sh --packs=peon,glados,peasant
# Install locally for development (native Windows)
powershell -File install.ps1
# Install specific packs (native Windows)
powershell -File install.ps1 -Packs peon,glados,peasant
# Install all packs (native Windows)
powershell -File install.ps1 -All
# Run Pester tests (native Windows)
Invoke-Pester -Path tests/adapters-windows.Tests.ps1There is no build step, linter, or formatter configured for the shell codebase.
See RELEASING.md for the full release process (version bumps, tagging, Homebrew tap updates).
Related Repos
peon-ping is part of the PeonPing org:
| Repo | Purpose |
| peon-ping (this repo) | CLI tool, installer, hook runtime, IDE adapters |
| registry | Pack registry (index.json served via GitHub Pages at peonping.github.io/registry/index.json) |
| og-packs | Official sound packs (40 packs, tagged releases) |
| homebrew-tap | Homebrew formula (brew install PeonPing/tap/peon-ping) |
| openpeon | CESP spec + openpeon.com website (Next.js in site/) |
| peon-pet | macOS desktop pet — orc sprite that reacts to hook events (Electron + Three.js) |
Architecture
Core Files
peon.sh— Main hook script (Unix/WSL2). Receives JSON event data on stdin, routes events via an embedded Python block that handles config loading, event parsing, sound selection, and state management in a single invocation. Shell code then handles async audio playback (nohup+ background processes), desktop notifications, and mobile push notifications.peon.ps1— Main hook script (native Windows). Pure PowerShell implementation with same event flow aspeon.shbut without Python dependency. Handles JSON parsing, config/state management, CESP category mapping, sound selection (no-repeat logic), and async audio playback viawin-play.ps1.relay.sh— HTTP relay server for SSH/devcontainer/Codespaces. Runs on the local machine, receives audio and notification requests from remote sessions.install.sh— Installer (Unix/WSL2). Fetches pack registry from GitHub Pages, registers hooks in~/.claude/settings.json, and delegates pack downloads topack-download.sh. Falls back to a hardcoded pack list if registry is unreachable.install.ps1— Installer (native Windows). PowerShell version with registry fetching, pack downloads, hook registration, CLI shortcut creation (peon.cmdin~/.local/bin), and skills installation. Supports-Packsparam for selective installs and-Allfor full registry.scripts/pack-download.sh— Shared pack download engine used by bothinstall.shandpeon packs install. Handles registry fetching, pack validation, tarball downloads, and extraction.scripts/win-play.ps1— Windows audio playback backend. Async MP3/WAV player usingMediaPlayerclass with volume control.config.json— Default configuration template.
Event Flow
IDE triggers hook → peon.sh reads JSON stdin → single Python call maps events to CESP categories (session.start, task.complete, input.required, user.spam, etc.) → picks a sound (no-repeat logic) → shell plays audio async and optionally sends desktop/mobile notification.
Platform Detection
peon.sh detects the runtime environment and routes audio accordingly:
- mac / linux / wsl2 — Direct audio playback via native backends
- ssh — Detected via
SSH_CONNECTION/SSH_CLIENTenv vars → relay atlocalhost:19998 - devcontainer — Detected via
REMOTE_CONTAINERS/CODESPACESenv vars → relay athost.docker.internal:19998
Multi-IDE Adapters
adapters/codex.sh— Translates OpenAI Codex events to CESP JSONadapters/cursor.sh— Translates Cursor events to CESP JSONadapters/opencode.sh— Installer for OpenCode adapteradapters/opencode/peon-ping.ts— Full TypeScript CESP plugin for OpenCode IDEadapters/kilo.sh— Installer for Kilo CLI adapter (downloads and patches the OpenCode plugin)adapters/kiro.sh— Translates Kiro CLI (Amazon) events to CESP JSONadapters/windsurf.sh— Translates Windsurf Cascade hook events to CESP JSONadapters/antigravity.sh— Filesystem watcher for Google Antigravity agent eventsadapters/grok.sh— Translates Grok Build camelCase hook events to CESP JSON
All adapters have native Windows PowerShell (.ps1) counterparts alongside the bash originals. Windows adapters pipe CESP JSON to peon.ps1 instead of peon.sh. Filesystem watchers (amp, antigravity, kimi) use .NET FileSystemWatcher instead of fswatch/inotifywait.
All adapters translate IDE-specific events into the standardized CESP JSON format that peon.sh/peon.ps1 expects.
Platform Audio Backends
- macOS:
afplay - WSL2: PowerShell
MediaPlayer(viapeon.shcross-platform detection) - Native Windows: PowerShell
MediaPlayer(viascripts/win-play.ps1) - Linux: priority chain:
pw-play→paplay→ffplay→mpv→play(SoX) →aplay(each with different volume scaling) - SSH/devcontainer: HTTP relay to local machine (see
relay.sh)
State Management
.state.json persists across invocations: agent session tracking (suppresses sounds in delegate mode), pack rotation index, prompt timestamps (for annoyed easter egg), last-played sounds (no-repeat), and stop debouncing.
Pack System
Packs use openpeon.json (CESP v1.0) manifests with dotted categories mapping to arrays of { "file": "sound.wav", "label": "text" } entries. Packs are downloaded at install time from the OpenPeon registry into ~/.claude/hooks/peon-ping/packs/. The registry index.json contains source_repo, source_ref, and source_path fields pointing to each pack's source (official packs in og-packs, community packs in contributor repos).
Testing
Tests use BATS (Bash Automated Testing System). Test setup (tests/setup.bash) creates isolated temp directories with mock audio backends, manifests, and config so tests never touch real state. Key mock: afplay is replaced with a script that logs calls instead of playing audio.
Windows adapter tests use Pester (tests/adapters-windows.Tests.ps1). These validate PowerShell syntax, event mapping, daemon flags, FileSystemWatcher usage, and the absence of ExecutionPolicy Bypass across all .ps1 adapters.
CI runs two jobs via GitHub Actions: BATS on macOS (macos-latest) and Pester on Windows (windows-latest).
Releasing
After merging PRs that add features, fix bugs, or make notable changes, proactively suggest a version bump. Don't wait to be asked.
When to bump:
- Patch (1.8.1): bug fixes, small tweaks, test-only changes
- Minor (1.9.0): new features, new adapters, new platform support
- Major (2.0.0): breaking changes to config, hooks, or CLI
Release checklist:
- Run
bats tests/— all tests must pass - Update
CHANGELOG.md— add new section at top with version, date, and categorized changes (Added/Fixed/Breaking) - Bump
VERSIONfile - Commit:
git commit -m "chore: bump version to X.Y.Z" - Tag:
git tag vX.Y.Z - Push:
git push && git push --tags
The tag push triggers CI to create a GitHub Release and auto-update the Homebrew tap.
See RELEASING.md for full details.
Skills
Seven Claude Code skills live in skills/:
/peon-ping-toggle— Mute/unmute sounds/peon-ping-config— Modify any peon-ping setting (volume, packs, categories, etc.)/peon-ping-use <pack>— Assign a specific pack to the current agent session (agentskill mode)/peon-ping-log <n> <exercise>— Log exercise reps to the Peon Trainer (e.g./peon-ping-log 25 pushups)/peon-ping-rename [name]— Rename the current session for notifications and terminal tab title; no arg resets to auto-detectpeon-ping-create-pack— Internal, invoked headlessly bypeon createto author and render a brand-new draft pack; not meant to be run directlypeon-ping-remix— Internal, invoked headlessly by thepeon evalserver to execute reroll jobs; not meant to be run directly
Change Enforcement Rules
These are hard rules. When you make a change of type X, you MUST also do Y.
If you add/change a CESP category (e.g., task.error, resource.limit)
→ Update ../openpeon/site/scripts/generate-pack-data.ts FRANCHISE_MAP if any pack manifests reference new packs
→ Update the spec at ../openpeon/site/src/app/spec/page.tsx if the category is new to the spec
→ Update ../openpeon/site/public/llms.txt (openpeon.com LLM context)
If you add/change a hook event (e.g., SubagentStart, PreCompact)
→ Update ../homebrew-tap/Formula/peon-ping.rb — the hook registration list in Phase 4
→ Update README.md — the "Supported events" section
→ Bump version (patch or minor depending on significance)
If you add a new IDE adapter (e.g., a new adapters/foo.sh)
→ Update README.md — supported IDEs section
→ Update ../homebrew-tap/Formula/peon-ping.rb — add detection/setup phase if needed
→ Update workspace/SOUL.md in peonping-x-bot repo (supported tools count)
→ Update docs/public/llms.txt
→ Bump version (minor)
If you add/change a config key in config.json
→ Ensure peon.sh backfills the new key on update (the config merge logic in peon update)
→ Add a test covering the new config behavior in tests/peon.bats
→ Update README.md configuration docs
If you add/change a CLI command (peon <cmd>)
→ Update completions.bash and completions.fish
→ Update README.md CLI reference section
→ Add BATS test in tests/peon.bats
If you update README.md (any feature doc change)
→ Apply the same change to README_zh.md (Chinese translation)
→ Update docs/public/llms.txt — peonping.com LLM context file
→ Update ../openpeon/site/public/llms.txt if the change relates to CESP/MCP/packs
If you bump the VERSION
→ Update CHANGELOG.md — add a new section at the top
→ Tag: git tag vX.Y.Z
→ Push tags: git push --tags
→ Update ../homebrew-tap/Formula/peon-ping.rb URL and SHA256 if releasing
Documentation rules
Whenever README.md is updated, also update all language variants:
README_zh.md— Chinese translation (currently the only language variant)
Apply the same changes in the appropriate language. If a section is added to README.md, add the translated equivalent to each language README in the same location.
Whenever the website or README is updated for a new feature, also update:
docs/public/llms.txt— peonping.com LLM context file../openpeon/site/public/llms.txt— openpeon.com LLM context file (if the feature relates to CESP/MCP/packs)
Website
docs/ contains the static landing page (peonping.com), deployed via Vercel. A vercel.json in docs/ provides the /install redirect so curl -fsSL peonping.com/install | bash works. video/ is a separate Remotion project for promotional videos (React + TypeScript, independent from the main codebase).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

