| .github/ISSUE_TEMPLATE | ||
| .slim | ||
| apps | ||
| assets | ||
| docs | ||
| packages | ||
| plugins/official | ||
| scripts | ||
| skills/openpets | ||
| .gitignore | ||
| .ignore | ||
| AGENTS.md | ||
| codemap.md | ||
| DESIGN.md | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| tsconfig.base.json | ||
A tiny desktop pet for coding agents.
See agent progress, tool use, test runs, and coding state as a playful desktop companion.
2-minute Quick Start
Install the OpenPets Agent Skill with skills.sh:
npx skills add alvinunreal/openpets --skill openpets
Then open Claude Code, OpenCode, Codex, or another skill-aware agent and say:
Use the OpenPets skill. Install OpenPets for me, connect this agent, and verify the integration works.
For project setup, open your agent inside the repo and say:
Use the OpenPets skill. Help me choose or install a pet, configure it for this project, and verify the project integration.
Useful prompts:
Use the OpenPets skill. Configure this project for Claude Code with a pet.
Use the OpenPets skill. Configure this project for OpenCode with a pet.
Use the OpenPets skill. Debug why openpets_status is unavailable.
Star OpenPets
Here is an extra GIF of me starring my own repo to encourage you to do the same. If OpenPets makes your coding setup a little more fun, please give the repo a star.
What is OpenPets?
OpenPets is a tray-first desktop companion app for AI coding agents.
- Desktop companion - a small pet that reacts while agents think, edit, test, wait for approval, finish, or hit an error.
- Agent integrations - first-class setup for Claude Code and OpenCode, including MCP tools, instructions, and automatic hooks/plugins.
- MCP ready - any MCP-capable agent can send short safe speech bubbles and reactions through the OpenPets MCP server.
- Pet-pack friendly - loads installed animated pet packs and can route a selected agent/project to its own pet window.
- Privacy-conscious by design - automatic hook speech is static and local; prompts, code, logs, command output, URLs, paths, and secrets are not shown in bubbles.
Manage your pets
Browse installed pets, preview their animations, and choose which companion should follow each coding agent from the OpenPets desktop app.
Quick start
Install the desktop app, then connect your coding agent.
1. Install OpenPets Desktop
Download the latest app from OpenPets Releases:
- macOS Apple Silicon:
OpenPets-*-mac-arm64.dmg - macOS Intel:
OpenPets-*-mac-x64.dmg - Windows:
OpenPets-*-win-x64-setup.exe - Linux:
OpenPets-*-linux-x86_64.AppImage
Launch OpenPets. You should see the desktop pet and the OpenPets tray/menu-bar icon.
Current builds may be unsigned. macOS or Windows may show a security warning the first time you open the app.
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
2. Connect your agent
Use the desktop Integrations screen for global setup when available:
- Claude Code - installs OpenPets MCP, Claude memory instructions, and optional Claude hooks.
- OpenCode - installs OpenPets MCP, an OpenCode instruction file, and the
@open-pets/opencodeplugin.
For project-local setup, run the CLI from the project you want to configure:
npx -y @open-pets/cli@latest configure --agent claude --pet <petId>
npx -y @open-pets/cli@latest configure --agent opencode --pet <petId>
If you prefer a permanent openpets shell command, install the CLI once with npm install -g @open-pets/cli and replace npx -y @open-pets/cli@latest with openpets.
Project-local setup can create project files such as .claude/settings.local.json or .opencode/opencode.jsonc. Review them before committing because they may include the selected pet id.
Agent integrations
OpenPets integrations have three layers:
- MCP tools for explicit agent actions.
- Agent instructions so agents know when to use those tools.
- Hooks/plugins for automatic decorative reactions during normal agent work.
Claude Code
Claude Code integration supports:
openpetsMCP setup via Claude Code.- Managed Claude memory instructions in
~/.claude/CLAUDE.mdand~/.claude/openpets.md. - Managed Claude hooks in
~/.claude/settings.json. - Project-local setup through
npx -y @open-pets/cli@latest configure --agent claude --pet <petId>or the optional globalopenpetsCLI.
Typical global MCP command shape:
claude mcp add --scope user openpets -- npx -y @open-pets/mcp@latest
With a selected pet:
claude mcp add --scope user openpets -- npx -y @open-pets/mcp@latest --pet <petId>
See docs/claude-integration.md for the full file layout, hook mapping, project-local behavior, and safety rules.
OpenCode
OpenCode integration supports:
- An MCP entry using
@open-pets/cli mcp. - A managed
openpets.mdinstruction file. - The
@open-pets/opencodeplugin for automatic reactions. - Global desktop setup and project-local
.opencodesetup.
Project-local setup:
npx -y @open-pets/cli@latest configure --agent opencode --pet <petId>
See docs/opencode.md for global config selection, plugin behavior, project-local setup, and safety rules.
Generic MCP clients
Any MCP-capable editor or coding agent can talk to OpenPets through the MCP server while the desktop app is running.
{
"mcpServers": {
"openpets": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@open-pets/mcp@latest"]
}
}
}
To target a specific installed non-default pet:
{
"mcpServers": {
"openpets": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@open-pets/mcp@latest", "--pet", "<petId>"]
}
}
}
Available MCP tools:
openpets_status- check whether OpenPets is reachable and which pet is targeted.openpets_react- set a short reaction on the target pet.openpets_say- show a short safe speech bubble, optionally with a reaction.
openpets_say messages must be short, single-line, and must not look like code, logs, secrets, URLs, or file paths.
How it works
Claude Code / OpenCode / Pi / MCP client
-> @open-pets/mcp, @open-pets/cli mcp, @open-pets/claude hook, @open-pets/opencode plugin, or @open-pets/pi extension
-> @open-pets/client
-> OpenPets desktop local IPC discovery file
-> OpenPets desktop IPC socket/pipe
-> default pet or selected agent pet window
The desktop app writes a local discovery file containing an IPC endpoint and a per-run token. Clients must send that token with every request.
For Windows desktop + WSL agent setups, see docs/wsl-ipc.md for the opt-in TCP transport.
When an integration is configured with --pet <petId>, OpenPets asks the desktop app for a short-lived lease. Valid installed non-default pets open as explicit agent pet windows. Missing, invalid, broken, built-in, or default pet requests fall back to the desktop default pet.
Reactions and speech
Automatic hooks are decorative and best-effort. They do not approve, deny, block, or change agent behavior.
Common reaction mapping:
| Agent activity | Reaction |
|---|---|
| Prompt/chat starts | thinking |
| File edit/write/patch | editing |
| Test-like shell command | testing |
| Permission request | waiting |
| Successful idle/stop | success |
| Session/error stop | error |
Generic shell activity is intentionally quiet by default. Hook/plugin speech is throttled and selected from local static message pools such as Approval needed or Something failed.
Pi extension package
OpenPets includes an experimental Pi extension package at @open-pets/pi. Pi support is extension-first rather than MCP-first: the extension listens to Pi lifecycle/tool events and sends local best-effort reactions through @open-pets/client.
pi install npm:@open-pets/pi
pi install -l npm:@open-pets/pi
Inside Pi, the extension registers /openpets status, /openpets test, /openpets react <reaction>, and /openpets say <message>. Automatic events do not forward prompts, assistant text, tool output, file contents, paths, URLs, or secrets. Real Pi CLI install validation is still required before marking the integration fully supported.
Development
Requirements
- Node.js 20+
- pnpm 11+
- TypeScript
No Bun runtime is required for development.
Install
pnpm install
Run the desktop app
pnpm dev:desktop
Equivalent package command:
pnpm --filter @open-pets/desktop dev
Checks
pnpm check
pnpm typecheck
pnpm build
pnpm test
OpenPets currently uses lightweight Node contract checks instead of a full test framework. See docs/testing.md.
Package desktop builds
pnpm package:desktop:dir
pnpm package:desktop
Release process details live in docs/release.md.
Workspace layout
apps/desktop Electron desktop app
packages/client @open-pets/client, local IPC client
packages/mcp @open-pets/mcp, MCP stdio server
packages/claude @open-pets/claude, Claude command and hook helpers
packages/opencode @open-pets/opencode, OpenCode config and plugin integration
packages/pi @open-pets/pi, Pi extension package
packages/agent-events Shared safe agent event speech helpers
packages/cli @open-pets/cli, user-run CLI and MCP/hook entrypoints
packages/pet-format @open-pets/pet-format, pet/catalog format types
docs/ Documentation
Documentation
docs/claude-integration.md- Claude Code setup, MCP, memory, hooks, and safety.docs/opencode.md- OpenCode global/project setup, plugin behavior, and safety.docs/wsl-ipc.md- Windows desktop + WSL MCP transport setup.docs/testing.md- test/check strategy.docs/release.md- desktop release process.docs/workflow.md- project workflow notes.
Safety and privacy notes
- OpenPets local IPC is local-only and protected by a per-run token.
- Hook/plugin errors are swallowed unless debug logging is enabled.
- Automatic speech is static and local; it does not include model-generated prompt text.
- Tool inputs and command text are used only for coarse reaction classification.
- Managed setup preserves unrelated user config and removes only OpenPets-managed entries.
- Speech validation rejects code-like, secret-like, URL-like, path-like, or multiline messages.