DIYPets

Gives AI coding agents a visual desktop mascot that reacts to tasks with speech bubbles, emotions, and physics herds.

문서

diypets

smresponsibilities/diypets MCP server

Cross-platform desktop mascot engine written in Rust (~7.8 MB idle RAM), with multi-pet herds, a built-in 2D/SVG sprite studio, and an MCP server for coding agents.

Live sandbox: shivammahajan.com/diypets · Package: crates.io/crates/diypets

DIYPets built-in mascots

Install

Windows x64 (PowerShell; download and review the script before running it):

$installer = Join-Path $env:TEMP "diypets-install.ps1"
Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/smresponsibilities/diypets/main/install.ps1 -OutFile $installer
& $installer

Linux x86-64 / macOS Apple Silicon:

curl -fsSL https://raw.githubusercontent.com/smresponsibilities/diypets/main/install.sh -o diypets-install.sh
bash diypets-install.sh

Both installers verify the published SHA-256 checksum and retain bundled assets. You can also download and extract a matching archive from GitHub Releases. Start a new terminal or follow the PATH instructions. Other architectures must build from source.

From source via Cargo:

cargo install diypets

Usage

diypets                       # start desktop pet runner
diypets say "Build passed"    # trigger a speech bubble on the active pet
diypets mcp                   # run stdio MCP server for Claude / Cursor / Codex
diypets hooks install all     # auto-wire Claude Code & Cursor lifecycle hooks
diypets export-gif pet.xml    # export a lossless transparent looping GIF
diypets doctor                # print config path, logs, herd state, and build info
diypets --version             # print version, git commit, and target triple
diypets-settings              # open herd & behavior settings UI
diypets-creator               # open 2D/SVG pet studio

Right-click any pet or the system tray icon to drop a bouncy ball, toggle Follow Cursor, headpat, sleep, or clone up to 8 pets. Settings live in %APPDATA%\diypets\settings.toml (Windows) or ~/.config/diypets/settings.toml (macOS/Linux); rotating logs auto-prune after 7 days in the sibling logs/ directory.

What's included

ComponentDetails
Runner (diypets)Per-pixel layered transparency (Win32 UpdateLayeredWindow, Cocoa, X11/Wayland), window-ledge walking, squash-and-stretch physics, fullscreen auto-hide, multi-pet herds (up to 8).
Packs5 built-in pixel mascots (Highland Cow, Dog, Polar Bear, Goat, Stegosaurus) plus on-demand eSheep XML pack catalog (27+ community packs).
Studio (diypets-creator)128x128 layered pixel editor, Marquee Select, Mirror X, Onion Skinning, 1-click Auto-Outline, SVG auto-rigging, 4x EPX RotSprite rotation, live sandbox, and XML export.
Agent MCP (diypets mcp)Stdio & local HTTP MCP server for agent-driven reactions, custom SVG mascots, and herd management.

MCP configuration

Add to Claude Desktop, Cursor, or Claude Code (mcp.json):

{
  "mcpServers": {
    "diypets": {
      "command": "diypets",
      "args": ["mcp"]
    }
  }
}

MCP tools

ToolPurpose
launch_appLaunch the desktop app from the stdio bridge if not running.
sayDisplay a speech bubble (up to 160 characters).
react_petTrigger a mascot reaction and optional speech bubble.
create_pet_from_svgAuto-rig, install and optionally spawn a mascot from inline SVG (up to 64 KiB) or a local SVG path.
spawn_petAdd a mascot to the herd (up to eight pets).
drop_ballDrop a physics toy for the herd.
set_follow_cursorToggle cursor-following play mode.
list_herdReturn active mascot count and pack IDs.

The headless stdio bridge can initialize and list tools without a display. Desktop reactions require the running desktop app. The local HTTP endpoint accepts non-browser loopback clients and rejects unrelated browser origins (including other localhost ports); use the stdio transport for browser-based MCP inspectors via their local proxy. Close running DIYPets executables before upgrading on Windows.

Building & testing

cargo test --all-targets
cargo clippy --all-targets -- -D warnings
python scripts/validate_sprites.py   # checks sprite transparency, foot baselines, and generates walk GIFs

See CONTRIBUTING.md and TICKETS.md for open starter issues and roadmap items.

License

Dual-licensed under MIT or Apache-2.0.