by alvinunreal
Claude Code integration for OpenPets: automatic desktop pet status updates with one-command setup.
# Add to your Claude Code skills
git clone https://github.com/alvinunreal/claude-petshttps://github.com/user-attachments/assets/a10edb8a-d13a-4b99-96bc-ea5c7cade741
Claude Pets connects Claude Code activity to OpenPets, a local desktop pet.
>= 1.3.0Download the latest OpenPets app:
https://github.com/alvinunreal/openpets/releases/latest
Pick the file for your OS:
OpenPets-*-arm64.dmg or OpenPets-*-arm64.zipOpenPets-Setup-*-x64.exeOpenPets-*-x86_64.AppImage or OpenPets-*-amd64.debOpen the app once. You should see the pet on your desktop and an OpenPets tray/menu-bar icon.
Preview builds are unsigned, so macOS or Windows may show a warning on first launch.
If macOS says the app is damaged or should be moved to Trash, remove the quarantine flag and open it again:
xattr -dr com.apple.quarantine /Applications/OpenPets.app
open /Applications/OpenPets.app
This gives Claude Code tools for talking to and controlling the pet:
claude mcp add -s user openpets -- bunx @open-pets/mcp
Restart Claude Code, then check:
No comments yet. Be the first to share your thoughts!
claude mcp list
You should see openpets.
Install Claude Pets hooks globally:
bunx @open-pets/claude-pets install
This updates your user-wide Claude Code settings:
~/.claude/settings.json
The installer preserves unrelated settings and creates a backup before writing.
Restart Claude Code after installing, then run /hooks in Claude Code. The Claude Pets commands should appear under user settings. If they do not appear there, Claude Code has not loaded the hooks yet.
With OpenPets running:
bunx @open-pets/claude-pets test-event thinking
Your pet should animate briefly, then return to idle.
You can also try:
bunx @open-pets/claude-pets test-event testing
bunx @open-pets/claude-pets test-event success
Remove the global hooks:
bunx @open-pets/claude-pets uninstall
This only removes Claude Pets managed hook commands from ~/.claude/settings.json.
bunx @open-pets/claude-pets test-event thinking
bunx @open-pets/claude-pets install
/hooks and confirm the Claude Pets command appears under user settings. Treat /hooks as the source of truth: if Claude Pets is not listed there, Claude Code has not loaded the hooks.~/.claude/settings.json contains @open-pets/claude-pets.bunx @open-pets/claude-pets test-event thinking works but normal Claude Code prompts do not update the pet, the desktop app is working and the issue is hook loading.On Windows, you can also test the hook command directly from PowerShell while OpenPets is running:
'{"hook_event_name":"UserPromptSubmit"}' | bunx --bun @open-pets/claude-pets hook
If this makes the pet think, the hook command works and Claude Code still needs to load the hook config.
Install Bun first:
https://bun.com
Every write creates a backup next to the settings file:
~/.claude/settings.json.bak-<timestamp>
Quit Claude Code, copy the backup over ~/.claude/settings.json, then restart Claude Code.
Global install is recommended. Project-only hooks are written to .claude/settings.local.json, but Claude Code must load that project settings file for the hooks to run. Always verify project-only installs with /hooks.
If you only want Claude Pets hooks in one project, run this from that project root:
bunx @open-pets/claude-pets install --project
This writes project-local settings instead:
.claude/settings.local.json
Uninstall project-local hooks with:
bunx @open-pets/claude-pets uninstall --project
bunx @open-pets/claude-pets install --dry-run
bunx @open-pets/claude-pets print
Production hooks use this command:
bunx --bun @open-pets/claude-pets@<package-version> hook
The installer derives <package-version> from the installed package so hook commands stay in sync with the published release.
bunx @open-pets/claude-pets doctor
Use --project to inspect project-local hooks:
bunx @open-pets/claude-pets doctor --project
If you launch Claude Code with CLAUDE_CONFIG_DIR, run doctor with the same environment variable so it inspects the same profile:
CLAUDE_CONFIG_DIR=/path/to/claude-profile bunx @open-pets/claude-pets doctor
claude-pets install [--dry-run] [--project] [--local-command]
claude-pets uninstall [--dry-run] [--project]
claude-pets print [--local-command]
claude-pets hook
claude-pets test-event <state>
claude-pets doctor [--project]
git clone https://github.com/alvinunreal/claude-pets.git
cd claude-pets
bun install
bun test
bun run typecheck
bun run build
Install hooks pointing at your local checkout:
bun src/cli.ts install --local-command
Use both OpenPets integrations for the best experience: