Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Devagotchi ๐Ÿพ

A Claude Code skill โ€” your virtual pet that feeds on AI coding sessions

Devagotchi is your "Living Developer Companion" โ€” a virtual pet that lives inside Claude Code and evolves based on your coding sessions. The more tokens you consume while coding with Claude, the more your pet grows!

Features

  • ๐ŸŽฎ Virtual Pet System: Three unique species (cat, dragon, robot) with ASCII art
  • ๐Ÿ“ˆ Evolution System: Egg โ†’ Baby โ†’ Teen โ†’ Adult โ†’ Elder โ†’ Mythic (based on token XP)
  • ๐Ÿ– Token-Based Feeding: 1000 tokens = 1 food unit
  • ๐Ÿ˜Š Dynamic Moods: Happy, content, hungry, or starving based on hunger level
  • ๐ŸŽจ ASCII Art Animations: Different frames for idle, happy, hungry, sleeping, and eating states
  • ๐Ÿ’พ Local Storage: All data stored locally in ~/.devagotchi/ - ZERO telemetry
  • ๐Ÿ”Œ Adapter System: Pluggable adapters for different AI tools (currently supports Claude Code)
  • ๐ŸŽช Pet Skills: Fortune telling and tricks to interact with your companion

Installation

One-liner (paste into Claude Code)

Install devagotchi: run git clone https://github.com/antoinedc/devagotchi.git ~/.claude/skills/devagotchi && cd ~/.claude/skills/devagotchi && ./setup

Paste the above into Claude Code. It clones, installs, builds, and hatches your pet.

Manual install

git clone https://github.com/antoinedc/devagotchi.git ~/.claude/skills/devagotchi
cd ~/.claude/skills/devagotchi
./setup

Then type /devagotchi in Claude Code.

Requirements

  • Node.js 18+
  • Claude Code installed โ€” get it here

Usage

Show Your Pet

/devagotchi

or

/devagotchi:show

Displays your pet with current stats, hunger bar, and XP progress.

Feed Your Pet

/devagotchi:feed

Syncs with Claude Code to count tokens from your coding sessions since installation and feeds your pet. Your pet gains XP (cumulative) and food based on token consumption.

Important: Only tokens from sessions that happen AFTER you install Devagotchi are counted. No retroactive XP!

View Detailed Stats

/devagotchi:stats

Shows comprehensive information about your pet including:

  • Name, species, and evolution stage
  • Total XP and hunger level
  • Current mood
  • XP needed until next evolution
  • Age in days

Pet Your Companion

/devagotchi:pet

Show some love to your pet with a heart animation!

Rename Your Pet

/devagotchi:name <name>

Give your pet a custom name. Example: /devagotchi:name Sparkles

Get a Fortune

/devagotchi:fortune

Get a random fortune about your coding day from your pet!

Watch a Trick

/devagotchi:trick

Watch your pet perform a fun ASCII art trick!

Evolution Stages

Your pet evolves as you accumulate XP (tokens):

Stage XP Threshold Description
๐Ÿฅš Egg 0 Your journey begins
๐Ÿ‘ถ Baby 10,000 First evolution
๐Ÿง’ Teen 100,000 Getting stronger
๐Ÿง‘ Adult 500,000 Fully grown
๐Ÿ‘ด Elder 2,000,000 Wise and powerful
โœจ Mythic 10,000,000 Ultimate form

Pet Mechanics

  • Hunger: Depletes by 1 per hour, max 100
  • Feeding: 1000 tokens = 1 food unit
  • Mood System:
    • ๐Ÿ˜Š Happy (hunger > 70)
    • ๐Ÿ˜Œ Content (hunger 40-70)
    • ๐Ÿ˜Ÿ Hungry (hunger 20-40)
    • ๐Ÿ˜ญ Starving (hunger < 20)
  • XP: Cumulative total tokens consumed, never decreases

Species

When your pet first hatches, it randomly becomes one of three species:

  • ๐Ÿฑ Cat: Playful and adorable
  • ๐Ÿ‰ Dragon: Fierce and magical
  • ๐Ÿค– Robot: Mechanical and precise

Each species has unique ASCII art for all evolution stages!

How It Works

The Claude Code adapter automatically tracks your token usage by reading JSONL session files from ~/.claude/projects/. It counts input, output, cache creation, and cache read tokens from all your coding sessions.

No Retroactive XP: When you first install Devagotchi, it records the installation timestamp. Only tokens from sessions that happen AFTER this timestamp are counted. This ensures fair gameplay and gives everyone a fresh start!

The adapter tracks the last sync timestamp to avoid double counting, so you can safely run /devagotchi:feed multiple times.

Privacy

Devagotchi stores all data locally in ~/.devagotchi/state.json. No telemetry, no external connections (except reading local Claude Code session files). Your pet lives entirely on your machine.

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Test
npm test

Project Structure

devagotchi/
โ”œโ”€โ”€ SKILL.md                 # Claude Code skill definition
โ”œโ”€โ”€ scripts/                 # Shell scripts for each command
โ”‚   โ”œโ”€โ”€ show.sh
โ”‚   โ”œโ”€โ”€ feed.sh
โ”‚   โ”œโ”€โ”€ stats.sh
โ”‚   โ”œโ”€โ”€ pet.sh
โ”‚   โ”œโ”€โ”€ name.sh
โ”‚   โ”œโ”€โ”€ fortune.sh
โ”‚   โ””โ”€โ”€ trick.sh
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ commands/            # Command handlers
โ”‚   โ”‚   โ”œโ”€โ”€ show.ts
โ”‚   โ”‚   โ”œโ”€โ”€ feed.ts
โ”‚   โ”‚   โ”œโ”€โ”€ stats.ts
โ”‚   โ”‚   โ”œโ”€โ”€ pet.ts
โ”‚   โ”‚   โ”œโ”€โ”€ name.ts
โ”‚   โ”‚   โ”œโ”€โ”€ fortune.ts
โ”‚   โ”‚   โ””โ”€โ”€ trick.ts
โ”‚   โ”œโ”€โ”€ adapters/
โ”‚   โ”‚   โ””โ”€โ”€ claudeCode.ts    # Claude Code token adapter
โ”‚   โ”œโ”€โ”€ types.ts             # TypeScript type definitions
โ”‚   โ”œโ”€โ”€ petEngine.ts         # Core pet state machine
โ”‚   โ”œโ”€โ”€ ascii.ts             # ASCII art renderer
โ”‚   โ”œโ”€โ”€ storage.ts           # Local storage system
โ”‚   โ”œโ”€โ”€ display.ts           # Terminal display utilities
โ”‚   โ”œโ”€โ”€ skills.ts            # Pet skills (fortune, trick)
โ”‚   โ”œโ”€โ”€ index.ts             # Main Devagotchi class
โ”‚   โ””โ”€โ”€ cli.ts               # CLI entry point
โ”œโ”€โ”€ dist/                    # Compiled JavaScript
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ tsup.config.ts

License

MIT

Contributing

Contributions welcome! Feel free to open issues or submit PRs.


Roadmap

  • Codex CLI adapter
  • Aider adapter
  • Web dashboard with pet animation
  • Desktop widget (macOS menu bar / Windows tray)
  • More species and evolution branches
  • Custom user skills (~/.devagotchi/skills/)
  • Opt-in social: compare pets, leaderboards
  • Starship prompt module

Made with โ™ฅ by developers, for developers

About

๐Ÿพ Devagotchi โ€” A terminal virtual pet fed by your AI coding tool usage. Living Developer Companion.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages