explaingit

ppxd/petpet

17RustAudience · vibe coderComplexity · 3/5ActiveLicenseSetup · easy

TLDR

Local desktop pet that watches AI coding session logs from Claude Code, Codex, OpenCode, and Aider, turning your prompts and token usage into XP that hatches and levels up a sprite based pet.

Mindmap

mindmap
  root((petpet))
    Inputs
      AI session logs
      Token counts
      Template JSON
    Outputs
      Animated desktop pet
      Trainer card stats
      Per provider breakdown
    Use Cases
      Gamify AI coding usage
      Track token spend
      Share custom pet templates
    Tech Stack
      Rust
      Tauri
      macOS
      Windows
      Linux

Things people build with this

USE CASE 1

Gamify daily AI coding by feeding Claude Code and Codex session logs into a desktop pet that levels up

USE CASE 2

Track personal token spend across multiple AI providers in one trainer card view

USE CASE 3

Pick a difficulty template (Unicorn, Sun, KingKong) to match light, medium, or heavy usage habits

USE CASE 4

Design and share a custom pet by editing the sprite PNGs, level curve, and XP weights in plain JSON

Tech stack

RustTauriJSONmacOSWindowsLinux

Getting it running

Difficulty · easy Time to first run · 5min

Auto discovers AI session logs on launch so no hook configuration is needed; everything stays on the local machine.

MIT license allowing free use, modification, and distribution with attribution.

In plain English

petpet is a desktop pet app for people who use AI coding assistants like Claude Code, Codex, OpenCode, and Aider. The pet sits on your screen and quietly watches your AI session logs. Every prompt you send and every token your AI uses becomes experience points for the pet, which then levels up and changes form. Heavy users grow their pet quickly. Idle users find their pet sleeping. Everything runs locally on the machine. There is no cloud account, no telemetry, and no data leaves the computer. The app is open source under MIT, and it auto-discovers existing session logs on launch with no hook configuration needed. One pet can collect experience from every supported AI tool at once, and you can keep several pets and switch between them while the inactive ones hold their state. Three built-in templates set the pace. Unicorn is easy mode and hatches after roughly 5 to 10 conversations on Opus 4.7, with level 99 reached in about 30 days of heavy use. Sun (called Wukong) is medium pace at 15 to 20 conversations to hatch and 60 days to L99. KingKong is hard mode at 30 or more conversations to hatch and around 150 days to L99, and it ignores idle chat, only counting real token usage and completed work. Each pet has 10 evolution stages. Experience comes from a formula that weighs input tokens, output tokens, reasoning tokens, and cache reads and writes, then multiplies by a tier value (frontier models like Opus 4.7 give 1.5x, mid models 1.0x, mini models 0.7x). A growth curve slows the gain as the pet levels up, so there is no fast path to L99 in one weekend. You can also build your own pet with a template creator that takes sprites, level curves, XP weights, and a color theme. Templates and pet archives are plain JSON plus PNGs, so they can be shared as files. A trainer card view shows token spend, XP gained, and a per-provider breakdown. The desktop app is built in Rust with Tauri and ships for macOS, Windows, and Linux.

Copy-paste prompts

Prompt 1
Install petpet on a Mac and point it at my Claude Code session logs so it auto discovers and starts earning XP.
Prompt 2
Explain how petpet calculates experience from input, output, reasoning, and cache tokens and how the tier multiplier works.
Prompt 3
Help me build a custom petpet template with my own sprites, a slow level curve, and a green color theme.
Prompt 4
Compare the Unicorn, Sun, and KingKong templates in petpet and tell me which one fits about ten Codex conversations a day.
Prompt 5
Show me how petpet stores pet archives as JSON plus PNG so I can share a pet with a friend.
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.