{"id":50726032,"url":"https://github.com/anzy-renlab-ai/mypet","last_synced_at":"2026-06-10T04:02:13.742Z","repository":{"id":358383877,"uuid":"1241139128","full_name":"anzy-renlab-ai/mypet","owner":"anzy-renlab-ai","description":"Fluffy desktop cat that eats your Claude Code tokens. macOS 13+, SwiftUI, zero deps.","archived":false,"fork":false,"pushed_at":"2026-05-24T06:50:57.000Z","size":349683,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-24T07:19:16.979Z","etag":null,"topics":["anthropic","claude","claude-code","desktop-companion","desktop-pet","llm","macos","menubar-app","swiftui","tamagotchi"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anzy-renlab-ai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T02:18:16.000Z","updated_at":"2026-05-24T06:51:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/anzy-renlab-ai/mypet","commit_stats":null,"previous_names":["anzy-renlab-ai/mypet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anzy-renlab-ai/mypet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzy-renlab-ai%2Fmypet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzy-renlab-ai%2Fmypet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzy-renlab-ai%2Fmypet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzy-renlab-ai%2Fmypet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anzy-renlab-ai","download_url":"https://codeload.github.com/anzy-renlab-ai/mypet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzy-renlab-ai%2Fmypet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34136112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","claude-code","desktop-companion","desktop-pet","llm","macos","menubar-app","swiftui","tamagotchi"],"created_at":"2026-06-10T04:02:13.232Z","updated_at":"2026-06-10T04:02:13.736Z","avatar_url":"https://github.com/anzy-renlab-ai.png","language":"Swift","funding_links":["https://ko-fi.com/alvinanziyan"],"categories":[],"sub_categories":[],"readme":"# mypet 🐱\n\n\u003e A fluffy desktop cat that eats your Claude Code tokens.\n\u003e\n\u003e Move your mouse near the cat — a wobbly little Claude-cookie follows your cursor. **Double-click**\n\u003e the cat to feed it. It chomps one `claude -p` call and bubbles back a Claude\n\u003e Code tip, a prompt to try, a 打油诗 (Chinese quatrain), or a tech-news headline.\n\u003e Then goes back to sleep.\n\n[![CI](https://github.com/anzy-renlab-ai/mypet/actions/workflows/ci.yml/badge.svg)](https://github.com/anzy-renlab-ai/mypet/actions/workflows/ci.yml)\n[![macOS 13+](https://img.shields.io/badge/macOS-13%2B-blue)](https://www.apple.com/macos)\n[![SwiftUI](https://img.shields.io/badge/SwiftUI-AppKit-orange)](https://developer.apple.com/swiftui)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n[![Tests](https://img.shields.io/badge/tests-151%20passing-success)](Tests)\n[![Site](https://img.shields.io/badge/site-mypet.renlab.ai-cc785c)](https://mypet.renlab.ai)\n[![Ko-fi](https://img.shields.io/badge/donate-ko--fi-FF5E5B)](https://ko-fi.com/alvinanziyan)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshots/feed-demo.gif\" width=\"240\" alt=\"double-click the cat, she eats a Claude-cookie, a tip pops up\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003e👉 \u003ca href=\"https://mypet.renlab.ai\"\u003emypet.renlab.ai\u003c/a\u003e\u003c/strong\u003e\n\u003c/p\u003e\n\n## Why\n\nYou pay for Claude Code anyway. The little cat spends *your* subscription\nquota — no separate Anthropic API key, no server, no telemetry. When you're\nnot feeding it, it costs **zero CPU** and **zero network**. When you do feed\nit, you get one cute interruption and one tiny morsel of useful information.\n\nIt's a screensaver that pays rent.\n\n## How it works\n\n```\n mouse near + double-click  ─►  chomp animation  ─►  claude -p \"\u003cprompt\u003e\"  ─►  💬 tip bubble\n                                                                                    │\n                                           click bubble copies tip + dismisses  ◄──┘\n```\n\n1. Move mouse close to the cat — a wobbly little cookie sticks to your cursor.\n2. A **single click** earns a soft kitten meow (one of three, picked at random).\n3. **Double-click** the cat to trigger a feed; it plays a chomp animation and\n   immediately shows a \"let me think…\" bubble while it works.\n4. `mypet` shells out to your local `claude` CLI — same login, same quota.\n5. The reply replaces the thinking bubble (with theme badge + token count).\n6. Click the bubble to copy the tip; it auto-dismisses after a few seconds.\n\nCooldown: one feed per minute (the cat tells you when it's still digesting).\nNo interaction for 10 min → the cat gets quietly hungry. All visual — still\nzero background work.\n\n## States\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshots/states-grid.png\" width=\"720\" alt=\"10 cat states: idle, eating, purring, hungry, sleepy, dozing, sleeping, clingTop, peekRight, petting\"\u003e\n\u003c/p\u003e\n\nEach state plays its own bundled APNG (3D Pixar-style kitten, generated via\nKling and cleaned through BiRefNet). The Mac app overlays subtle procedural\nmicro-motion only when it adds something — most of the time the APNG carries\nthe entire performance.\n\n### Feedback cycle (user-triggered)\n| State | When | Looks like |\n|---|---|---|\n| `idle` | default | sitting, slow breath + tail-tip twitch |\n| `eating` | feeding | nibbling a Claude-cookie held in both paws |\n| `excited` | feed succeeded | sparkly eyes, tail vibrating high |\n| `purring` | tip showing | eyes closed in crescent smile, head tilted |\n\n### Sleep progression (passive — silent, never grabs attention)\n| State | When | Looks like |\n|---|---|---|\n| `sleepy` | 1min idle | heavy eyelids, slow blink, one droop-and-recover |\n| `dozing` | 2.5min idle | sitting upright, head dropped to chest, eyes closed |\n| `sleeping` | 5min idle | curled into a fluffy ball on its side, deep breath |\n\n### Mood / engagement\n| State | When | Looks like |\n|---|---|---|\n| `hungry` | 10min no feed | quiet sad sit, glistening eyes, no demand |\n| `petting` | hover ≥1s on cat | head leans into invisible hand, eyes squint happy |\n\n### Spatial (drag the window to a screen edge)\n| State | When | Looks like |\n|---|---|---|\n| `clingTop` | window near top | kitten hangs upside-down by both front paws |\n| `peekRight` | window near right edge | half body peeks out from the right, looking back curiously |\n| `peekLeft` | window near left edge | mirrored peekRight |\n\n### Personality moments (rare, idle-only, gated to recent activity)\n| State | When | Looks like |\n|---|---|---|\n| `licking` | rare ambient | kitten licks its right paw (~5 slow licks) |\n| `washing` | rare ambient | kitten wipes face with the licked paw |\n\n## Tip themes\n\nEvery feed picks one of six themes (weighted toward the Claude Code niche)\nso you don't get the same vibe twice in a row:\n\n| Badge | Theme | Weight | What you get |\n|---|---|---|---|\n| ☕ | `claudeTip` | 30% | Non-obvious Claude Code tip |\n| 💡 | `promptIdea` | 20% | A specific prompt to type into Claude Code now |\n| 📰 | `techNews` | 18% | One-line tech-news headline |\n| 🤓 | `til` | 14% | \"Today I learned\" fact a senior eng would still find surprising |\n| 😆 | `devJoke` | 10% | Programmer one-liner |\n| 🥟 | `dayouShi` | 8% | 程序员打油诗 (Chinese punny quatrain) |\n\nClick the bubble to copy the tip to your clipboard. The menubar 🐾 dropdown\nkeeps the last 10 tips under **Recent tips** — click any to copy.\n\n## Requirements\n\n- macOS 13 or later\n- [Claude Code CLI](https://docs.anthropic.com/claude-code) on your `PATH`\n  (`claude --version` works)\n\n## Install\n\nmypet is built for Claude Code users (it feeds on your CC tokens), so the\nnatural way in is to let Claude Code install it.\n\n### Option A — paste a prompt into Claude Code (recommended)\n\n\u003e Install mypet — a cute 3D desktop kitten that lives in my screen corner and\n\u003e feeds on Claude Code tokens. Run `brew install --cask anzy-renlab-ai/tap/mypet`,\n\u003e then launch the mypet app.\n\nClaude Code runs the install and opens the app for you.\n\n\u003e **No Claude Code yet?** mypet needs it — the feed shells out to your local\n\u003e `claude` CLI. Get it first at [claude.com/code](https://docs.anthropic.com/claude-code).\n\n### Option B — Homebrew yourself\n\n```bash\nbrew install --cask anzy-renlab-ai/tap/mypet\n```\n\nUpdates later with `brew upgrade --cask mypet`.\n\n### Option C — pre-built `.app` (manual)\n\n1. Grab the latest `mypet-x.y.z-macos.zip` from\n   [**Releases**](https://github.com/anzy-renlab-ai/mypet/releases/latest).\n2. Unzip → drag `mypet.app` to `/Applications`.\n3. **First launch only:** macOS Gatekeeper will say *\"developer cannot\n   be verified\"* because the app is ad-hoc signed (no Apple Developer ID).\n   Right-click `mypet.app` → **Open** → **Open** in the dialog. Or:\n   ```bash\n   xattr -d com.apple.quarantine /Applications/mypet.app\n   ```\n4. Look for the 🐾 paw in your menubar.\n\n### Option C — build from source\n\n```bash\ngit clone https://github.com/anzy-renlab-ai/mypet\ncd mypet\nswift run mypet\n```\n\n### After install\n\nFirst launch shows a tiny onboarding wizard (detects `claude`, asks about\nlaunch-at-login, plays a demo feed).\n\nThe cat sits in the bottom-right of your **primary** display. The menubar\n🐾 gives you `Feed now`, `Recent tips`, `Bring cat to this screen`,\n`Snap to edge`, `Launch at login`, and `Quit`.\n\n## Tests\n\n```bash\nswift test\n```\n\n95 tests cover the `claude` subprocess wrapper (binary discovery, timeout,\ncancellation, output normalization including multi-line tips, error\nclassification, concurrency guard, FD-leak check, JSON envelope parsing for\ntoken capture), the feed log (corruption recovery, cooldown, hungry\ndetection, max-entries cap), the pet state machine, the feed coordinator\n(theme rotation + locale-aware prompts + token reporting), and the window\nconfiguration (snap-to-edge, expanded/compact sizes).\n\n## Layout\n\n```\nSources/MyPet/\n  App/        MyPetApp, AppDelegate, MenubarController\n  Window/     PetWindow (borderless, transparent, status-bar level, draggable)\n  Scene/      TurtleView + CuteCatFace (all-vector cat, no SF Symbol)\n  UI/         OnboardingView, TipBubble, FeedButton\n  Domain/     ClaudeSubprocess, FeedCoordinator, PetState, LoginItem\n  Storage/    FeedLog (JSON in Application Support)\n```\n\nSee [CLAUDE.md](CLAUDE.md) for the architecture cheat-sheet and invariants\nthat exist to keep mypet stable + cheap (zero-CPU-when-idle, hover-via-Task,\nsingle-in-flight feed, etc.).\n\n## License\n\nDual-tracked:\n\n- **Source code** ([LICENSE](LICENSE)) — MIT. Fork it, ship it, sell it.\n- **Cat artwork \u0026 audio** ([Sources/MyPet/Resources/sprites/LICENSE](Sources/MyPet/Resources/sprites/LICENSE))\n  — All Rights Reserved. The fluffy kitten is © alvin. Personal use of\n  mypet is fine; re-packaging the cat in another product / training AI on\n  the sprites / commercial redistribution requires written permission.\n\nSee [NOTICE.md](NOTICE.md) for the full attribution.\n\nPRs welcome on the code — especially new tip prompts. Skin contributions\nwelcome but submitted skins are dual-licensed (code MIT, artwork CC-BY-NC\nby default unless you specify otherwise).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanzy-renlab-ai%2Fmypet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanzy-renlab-ai%2Fmypet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanzy-renlab-ai%2Fmypet/lists"}