Skip to main content

A pixel-art virtual pet plugin for Claude Code

Project description

Claude Code Pet Companion

A beautiful animated desktop pet that lives on your screen while you code with Claude Code.

Version Python License

โœจ What's New in v2.1

Productivity & Workflow Enhancement:

  • ๐Ÿ“Š Real-time Productivity Score - Track your coding efficiency (0-100)
  • ๐Ÿง  Focus Time Monitoring - Detect flow states automatically
  • ๐Ÿ”ฅ Combo System - Chain actions for bonus XP rewards
  • โ˜• Smart Break Reminders - Health-conscious 50-minute work alerts
  • โšก Inline Commands - /pet-status, /pet-stats directly in Claude Code
  • ๐Ÿ“ˆ Productivity Dashboard - Standalone stats viewer
  • โฐ Peak Hour Analysis - Learn your most productive time
  • ๐Ÿ’ป Language Tracking - See which languages you use most

Features

๐ŸŽจ Theme System

Switch between 5 beautiful color schemes via right-click menu:

Theme Description
Blue (Default) Classic Claude blue tones
Pink Warm rose and magenta
Green Fresh nature greens
Dark Sleek monochrome
Purple Mystical violet vibes

๐Ÿ“Š Productivity Tracking (NEW)

The pet monitors your Claude Code activity in real-time:

Metric Description
Productivity Score Based on success rate and activity frequency
Focus Score Measures continuous work time vs breaks
Combo/Streak Bonus XP for rapid consecutive actions
Flow State Special effects when focus โ‰ฅ 80%

๐ŸŽญ Dynamic Expressions

State Expression
Idle ๐Ÿ˜Š Happy with smile
Thinking ๐Ÿค” Eyes shift with question mark
Working โšก Focused with sweat drop
Error ๐Ÿ˜ต X eyes with worry
Success โœจ Sparkling star eyes
Surprised ๐Ÿ˜ฒ Wide eyes, open mouth
Excited ๐ŸŽ‰ Shining eyes with sparkles
Proud ๐Ÿ˜ Confident smirk
Confused ๐Ÿคท Uneven eyes, question mark

๐ŸŽช Particle Effects

  • Hearts (โ™ฅ) - Love and interaction
  • Stars (โ˜…) - Success and celebration
  • Sparkles (โœฆ) - Special moments
  • Notes (โ™ช) - Musical feedback
  • Circles (โ—) - Visual pops
  • Code ({} ) - Programming actions
  • Plus (+) - XP gains

๐Ÿ’ฌ Inline Commands (NEW)

Use directly in Claude Code conversation:

/pet-status    # Show detailed pet status
/pet-stats     # Show productivity statistics
/pet-focus     # Toggle focus mode
/pet-break     # Enter break mode
/pet-feed      # Feed the pet
/pet-play      # Play with pet

Features

๐ŸŽจ Theme System

Switch between 5 beautiful color schemes via right-click menu:

Theme Description
Blue (Default) Classic Claude blue tones
Pink Warm rose and magenta
Green Fresh nature greens
Dark Sleek monochrome
Purple Mystical violet vibes

๐Ÿ‘๏ธ Mouse Eye Tracking

The pet's eyes follow your mouse cursor, creating an engaging interactive experience.

๐ŸŽญ Dynamic Expressions

State Expression
Idle ๐Ÿ˜Š Happy with smile
Thinking ๐Ÿค” Eyes shift with question mark
Working โšก Focused with sweat drop
Error ๐Ÿ˜ต X eyes with worry
Success โœจ Sparkling star eyes
Surprised ๐Ÿ˜ฒ Wide eyes, open mouth
Excited ๐ŸŽ‰ Shining eyes with sparkles
Proud ๐Ÿ˜ Confident smirk
Confused ๐Ÿคท Uneven eyes, question mark

๐ŸŽช Particle Effects

  • Hearts (โ™ฅ) - Love and interaction
  • Stars (โ˜…) - Success and celebration
  • Sparkles (โœฆ) - Special moments
  • Notes (โ™ช) - Musical feedback
  • Circles (โ—) - Visual pops
  • Code ({} ) - Programming actions
  • Plus (+) - XP gains

๐ŸŽฎ Interactions

Action Effect
Drag Move pet (with edge protection)
Double-click Pet jumps + hearts
Right-click Full menu
Hover Show controls

๐Ÿ“Š Gamification

  • XP System - Gain experience from coding
  • Leveling - Progress through levels with celebrations
  • Combo Multiplier - Chain actions for bonus XP
  • Visual Feedback - Floating XP numbers

Installation

Via pip

pip install claude-pet-companion

Run

claude-pet
# or
pet-companion

From Source

git clone https://github.com/your-repo/claude-pet-companion.git
cd claude-pet-companion
pip install -e .
claude-pet

Configuration

Theme Selection

Right-click pet โ†’ ๐ŸŽจ Theme โ†’ Select theme

Config File

Edit ~/.claude-pet-companion/config.json:

{
  "theme": "pink",
  "animation_speed": 1.0,
  "float_amplitude": 3.0,
  "pet_name": "Buddy",
  "target_fps": 40,
  "hunger_decay": 0.5,
  "happiness_decay": 0.3
}

Settings

Setting Default Description
theme "default" Color theme name
animation_speed 1.0 Animation multiplier
float_amplitude 3.0 Floating movement range
pet_name "Claude" Pet's name
target_fps 40 Target frame rate
hunger_decay 0.5 Hunger loss per second
happiness_decay 0.3 Happiness loss per second

Claude Code Integration

The pet automatically responds to your coding activities:

Activity XP Pet Reaction
Write file +15 Excited + stars
Edit file +10 Happy + sparkles
Run command +5 Focused
Error detected - Worried
Chain actions +Bonus Combo multiplier!

Visual Effects

Background

  • 50-step gradient - Smooth color transition
  • 20 twinkling stars - Animated night sky
  • Glowing grid - Subtle tech aesthetic
  • Frosted glass bar - Status panel blur

Pet Animations

  • Floating - Gentle bobbing motion
  • Breathing - Subtle scale pulsing
  • Ear twitching - Random ear movements
  • Tail swaying - Sinusoidal tail motion
  • Shadow changes - Dynamic with floating

UI Feedback

  • Status bar colors:
    • ๐ŸŸข Green (โ‰ฅ60%) - Healthy
    • ๐ŸŸก Yellow (30-60%) - Warning
    • ๐Ÿ”ด Red (<30%) - Critical

Data Storage

~/.claude-pet-companion/
โ”œโ”€โ”€ config.json              # User settings
โ”œโ”€โ”€ pet_state.json           # Pet stats & level
โ”œโ”€โ”€ activity.json            # Real-time activity
โ””โ”€โ”€ pet_window_state.json    # Window position

Controls

Right-Click Menu

๐Ÿ– Feed        - Restore hunger (+30)
๐ŸŽพ Play        - Increase happiness (+25)
โค๏ธ Interact    - Quick happiness (+10)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ˜ด Sleep/Wake  - Toggle sleep mode
๐Ÿ“Š Status      - View detailed stats
๐ŸŽจ Theme       - Change colors
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โŒ Exit        - Close pet

Mouse Actions

  • Single click - Select/focus
  • Double click - Jump celebration
  • Right click - Open menu
  • Drag - Reposition
  • Scroll wheel - (Reserved for future)

Development

Project Structure

claude-pet-companion/
โ”œโ”€โ”€ claude_pet_companion/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ claude_pet_hd.py   # Main pet with animations
โ”‚   โ”œโ”€โ”€ cli.py             # Entry point
โ”‚   โ”œโ”€โ”€ config.py          # Configuration system
โ”‚   โ””โ”€โ”€ themes.py          # Theme definitions
โ”œโ”€โ”€ scripts/               # Hook scripts
โ”œโ”€โ”€ skills/                # Claude Code skills
โ”œโ”€โ”€ data/                  # Default data
โ””โ”€โ”€ hooks/                 # Hook definitions

Adding Custom Themes

Edit claude_pet_companion/themes.py:

'custom': ColorScheme(
    bg_top='#1a1a2e',
    bg_bottom='#16213e',
    pet_primary='#e94560',
    # ... more colors
)

Changelog

v2.1.0 (2024) - Productivity & Workflow Update

  • Added: Real-time productivity score tracking
  • Added: Focus time monitoring and flow state detection
  • Added: 50-minute work break reminders (health-focused)
  • Added: Work streak/combo system with bonus XP
  • Added: Productivity dashboard (/pet-stats command)
  • Added: Peak performance hour analysis
  • Added: Language usage tracking
  • Enhanced: Session statistics with summary
  • Enhanced: Pet status panel with more info
  • Improved: Claude Code integration hooks

v2.0.2 (2024-02)

  • Updated: README with full feature documentation
  • Improved: Project description on PyPI

v2.0.1 (2024-02)

  • Added: Theme system with 5 color schemes
  • Added: Configuration file support
  • Added: Mouse eye tracking
  • Added: 4 new expressions (surprised, excited, proud, confused)
  • Added: Floating XP numbers
  • Added: Level-up celebration animation
  • Added: Combo system for chained actions
  • Added: Smart edge detection for dragging
  • Added: Elastic drag with bounce effect
  • Added: Animated ears and tail
  • Added: Breathing animation
  • Enhanced: Particle system with 5 new types
  • Enhanced: Background with twinkling stars
  • Improved: Status bar color thresholds

v2.0.0

  • New: High-resolution compact UI (240x280)
  • New: Real-time Claude Code integration
  • New: Dynamic expressions based on activity
  • New: XP and leveling system

Requirements

  • Python 3.8+
  • tkinter (usually included with Python)

License

MIT License - see LICENSE file for details


Credits

Made with โค๏ธ for the Claude Code community

Contributors welcome! Feel free to open issues and PRs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_pet_companion-2.1.1.tar.gz (74.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_pet_companion-2.1.1-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file claude_pet_companion-2.1.1.tar.gz.

File metadata

  • Download URL: claude_pet_companion-2.1.1.tar.gz
  • Upload date:
  • Size: 74.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for claude_pet_companion-2.1.1.tar.gz
Algorithm Hash digest
SHA256 e2735c996a62c93fdb6fba9e2d4d9c273c800bd98328161d8a5cf364a9a998be
MD5 6dbb42bc11a13beddd32458fa63863f0
BLAKE2b-256 51e90c0ed422f81660a36f91b8ac5785d3f5d3f78b5207b6137b58e6a60510fb

See more details on using hashes here.

File details

Details for the file claude_pet_companion-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_pet_companion-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 540dace05a3ea62c5986f1e81fb74aa306fe2e7ed539f4d9034008bf5b69a19d
MD5 604c5f162dcb2e7b66624f00a4d9391f
BLAKE2b-256 7a167aac6a49d15fe5a1b1fd082fbc2f504992c1a99bef7775181153a81fc145

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page