Add a Desktop Pet to Claude Code for Visual Feedback on AI Activity
A developer has built a novel, open-source desktop companion that provides real-time visual feedback on Claude Code's activity. This tool hooks directly into Claude Code's event system and displays a transparent, always-on-top window with a stick figure that animates based on what Claude is doing.
What It Does — Visualizing Claude Code's Workflow
The "Code Pet" is a Tauri v2 application that creates a small, animated stick figure on your screen. It reacts to specific events from Claude Code:
- Thinking/Reasoning: The pet scratches its head
- Writing Code: It frantically types on an invisible keyboard
- Running Bash Commands: The figure runs in place with sweat drops
- Encountering Errors: It enters panic mode with explosion animations
- Task Completion: A celebratory victory jump
- Idle State: It calmly sips tea
All animations are rendered using pure SVG, meaning no external image files—everything is drawn programmatically. The window is transparent and stays on top of other applications, making it a non-intrusive companion.
Setup — How to Install and Configure
Currently, this is a Windows-only application. Here's how to get it running:
- Clone the repository:
git clone https://github.com/Xiaooolong/code-pet.git
cd code-pet
- Install dependencies: Ensure you have Rust and Node.js installed, then run:
npm install
- Build and run:
npm run tauri build
# Or for development mode:
npm run tauri dev
The application should automatically connect to Claude Code's event system. The pet window will appear on your desktop, ready to react.
When To Use It — Specific Benefits for Developers
This isn't just a novelty—it provides tangible workflow benefits:
1. Immediate State Awareness: Instead of checking the Claude Code interface or terminal output, you get peripheral visual cues about what Claude is doing. The "thinking" animation tells you Claude is processing complex reasoning, while the "typing" animation confirms code generation is happening.
2. Error Detection: The panic animation serves as an immediate, attention-grabbing alert when something goes wrong, potentially faster than scanning terminal output.
3. Workflow Rhythm: The animations create a visual rhythm to your AI-assisted coding sessions. The transition from "thinking" to "typing" to "running commands" provides a satisfying feedback loop.
4. Teaching Tool: If you're demonstrating Claude Code to others, the pet makes the AI's internal processes more tangible and understandable.
Technical Details and Limitations
The tool works by monitoring Claude Code's event stream. Since it's open source, developers can:
- Extend the animations: Add custom SVG animations for specific events
- Modify triggers: Adjust what events trigger which animations
- Port to other platforms: The Tauri framework supports macOS and Linux, though the current implementation is Windows-only
Current limitations:
- Windows-only (but the codebase is cross-platform capable)
- Requires Claude Code to be running with its event system active
- Transparent windows might have performance implications on some systems
The Bigger Picture — MCP and Ecosystem Integration
This project demonstrates the potential of Claude Code's extensible architecture. While not a formal MCP server, it shows how developers can build complementary tools that enhance the Claude Code experience. The event monitoring approach could inspire:
- Productivity dashboards that track Claude Code usage patterns
- Team collaboration tools that show when colleagues are using AI assistance
- Educational tools that visualize AI reasoning processes
For developers who spend hours with Claude Code, this small addition creates a more engaging, informative coding environment that turns abstract AI processes into visible, understandable actions.


