[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-83062":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":14,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":16,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":21,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":13,"starSnapshotCount":13,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},83062,"openbuddy","lennonkc\u002Fopenbuddy","lennonkc","A funny and easy AI desk pet — bring the most powerful tools to the most curious minds",null,"C",105,8,0,42,53,1,68.16,"MIT License",false,"main",true,[],"2026-06-12 04:01:40","\u003Cp align=\"center\">\n  \u003Ca href=\".github\u002FREADME.zh.md\">中文\u003C\u002Fa> ·\n  \u003Ca href=\".github\u002FREADME.ja.md\">日本語\u003C\u002Fa> ·\n  \u003Ca href=\".github\u002FREADME.es.md\">Español\u003C\u002Fa> ·\n  \u003Ca href=\".github\u002FREADME.fr.md\">Français\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".github\u002Fassets\u002Fopenbuddy-logo.svg\" alt=\"OpenBuddy Logo\" width=\"120\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">OpenBuddy\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cem>A funny and easy AI — bring the most powerful tools to the most curious minds\u003C\u002Fem>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fopenbuddy.fun\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F🌐_Website-openbuddy.fun-4CD5C3?style=flat-square\" alt=\"Website\">\u003C\u002Fa>\n  \u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-blue?style=flat-square\" alt=\"MIT License\">\u003C\u002Fa>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.11+-3776AB?style=flat-square&logo=python&logoColor=white\" alt=\"Python 3.11+\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FESP--IDF-5.4%2F5.5-E7352C?style=flat-square&logo=espressif&logoColor=white\" alt=\"ESP-IDF\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FReact-19-61DAFB?style=flat-square&logo=react&logoColor=black\" alt=\"React 19\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPlatform-macOS-999?style=flat-square&logo=apple&logoColor=white\" alt=\"macOS\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FPxPKkh4E9-Y\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.youtube.com\u002Fvi\u002FPxPKkh4E9-Y\u002Fmaxresdefault.jpg\" alt=\"OpenBuddy Demo Video\" width=\"640\">\n  \u003C\u002Fa>\n  \u003Cbr>\n  \u003Cem>▶ \u003Ca href=\"https:\u002F\u002Fyoutu.be\u002FPxPKkh4E9-Y\">Watch the demo on YouTube\u003C\u002Fa>\u003C\u002Fem>\n\u003C\u002Fp>\n\n---\n\n## What is OpenBuddy?\n\nOpenBuddy is a Claude Code desk pet system built on **M5Stack ESP32-S3** devices. It brings AI-powered voice interaction to your desktop through a cute animated companion that listens, thinks, and speaks — all driven by Claude Code under the hood.\n\nTwo hardware variants are supported: **Cardputer** (rectangular LCD) and **StopWatch** (circular AMOLED). A three-layer architecture — ESP32 firmware ↔ Python backend ↔ React WebUI — connects everything in real time via WebSocket.\n\n## Features\n\n- 🗣️ **Voice-First Interaction** — press a button, speak naturally, get a spoken response. Full STT → Agent → TTS pipeline\n- 🐾 **Desk Pet Animation** — 6 animated states: idle, listening, thinking, speaking, error, disconnected\n- 🔌 **Claude Code Integration** — hooks into Claude Code lifecycle events (Stop, PreToolUse, PostToolUse, Notification) in real time\n- 🌐 **Web Dashboard** — configure settings, view live chat transcripts, explore files, manage prompts\n- 📡 **Auto-Discovery** — mDNS service discovery via `openbuddy.local`, zero manual IP configuration\n- 🎯 **Dual Device Support** — one server powers both Cardputer and StopWatch simultaneously\n- 🔊 **Bilingual Voice** — auto-selects Chinese or English voice based on text content\n\n## Architecture\n\n```\n┌─────────────┐       WebSocket        ┌─────────────────┐       WebSocket       ┌─────────────┐\n│  ESP32       │◄──── \u002Fws\u002Fopenbuddy ───►│  Python Server   │◄──── \u002Fws\u002Fwebui ──────►│  React       │\n│  Device      │      (binary+JSON)     │  (FastAPI)       │      (JSON events)    │  WebUI       │\n└─────────────┘                         └────────┬────────┘                        └─────────────┘\n                                                 │\n                                          Voice Pipeline\n                                                 │\n                             ┌───────────────────┼───────────────────┐\n                             ▼                   ▼                   ▼\n                     ┌──────────────┐   ┌──────────────┐   ┌──────────────┐\n                     │ STT          │   │ Agent        │   │ TTS          │\n                     │ ElevenLabs   │──►│ LLM via      │──►│ ElevenLabs   │\n                     │ Scribe v2   │   │ claude-agent  │   │ Eleven v3    │\n                     └──────────────┘   │ -sdk         │   │ PCM16\u002F16kHz  │\n                                        └──────────────┘   └──────────────┘\n```\n\n**Voice Pipeline (F3 Chain):**\n\n```\n🎤 Mic → STT (ElevenLabs Scribe v2) → Qwen Cleanup → Agent → Qwen Cleanup → TTS (ElevenLabs v3) → 🔊 Speaker\n```\n\n## Supported Devices\n\n| Feature | Cardputer | StopWatch |\n|---------|-----------|-----------|\n| Display | 1.14\" ST7789 LCD 320×240 | Circular AMOLED |\n| Flash | 8 MB | 16 MB |\n| PSRAM | — | External OCT 80 MHz |\n| UI Framework | smooth_ui_toolkit | LVGL v9 |\n| Audio Codec | ES8311 (I²S) | ES8311 (I²S) |\n| ESP-IDF | 5.4.2 | 5.5.4 |\n\n## Quick Start\n\n### 1. Clone the repository\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Flennonkc\u002Fopenbuddy.git\ncd openbuddy\n```\n\n### 2. Start the server and WebUI\n\n```bash\nmake dev\n# Server on :8000 · WebUI on :5173\n```\n\n### 3. Configure API keys\n\nOpen http:\u002F\u002Flocalhost:5173 → **Settings** panel, or use the CLI:\n\n```bash\nkeyring set openbuddy elevenlabs \u003Ckey>   # STT + TTS\nkeyring set openbuddy dashscope \u003Ckey>    # Qwen text cleanup\nkeyring set openbuddy llm \u003Ckey>          # Agent LLM\n```\n\n### 4. Set up Claude Code hooks\n\nAdd the following to `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"Stop\": [{ \"matcher\": \"\", \"hooks\": [{\n      \"type\": \"command\",\n      \"command\": \"curl -m 1 -X POST -H 'Content-Type: application\u002Fjson' -d @- http:\u002F\u002F127.0.0.1:8000\u002Fhooks\u002FStop &\"\n    }]}]\n  }\n}\n```\n\nApply the same pattern for `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `Notification`, and `SessionStart`. The `Stop` hook must be fire-and-forget (short timeout + `&` background) to avoid blocking.\n\n### 5. Flash firmware (optional)\n\n```bash\nsource ~\u002Fesp\u002Fesp-idf\u002Fexport.sh\nmake fw-stopwatch    # StopWatch\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `make dev` | Start server (:8000) + WebUI (:5173) |\n| `make server` | Start server only |\n| `make webui` | Start WebUI only |\n| `make test` | Run all tests |\n| `make lint` | Run Python ruff linter |\n| `make fw-stopwatch` | Build, flash, and monitor StopWatch firmware |\n\n## Configuration\n\n| Item | Location |\n|------|----------|\n| API Keys | macOS Keychain via `keyring` (service = `openbuddy`) |\n| App Config | `~\u002F.config\u002Fopenbuddy\u002Fconfig.json` |\n| Custom Prompts | `~\u002F.config\u002Fopenbuddy\u002Fprompts.json` |\n| Logs | `~\u002F.cache\u002Fopenbuddy\u002F` |\n\n## Project Structure\n\n```\nopenbuddy\u002F\n├── openbuddy_server\u002F    # Python FastAPI backend\n│   ├── voice\u002F           #   Voice pipeline (STT, TTS, Qwen)\n│   ├── agent\u002F           #   Agent lifecycle & scrubbing\n│   ├── ws\u002F              #   WebSocket endpoints\n│   └── api\u002F             #   REST API routes\n├── openbuddy_webui\u002F     # React WebUI (Vite + TypeScript + Tailwind)\n├── stopwatch\u002F           # StopWatch ESP32-S3 firmware\n└── openbuddy_fun\u002F       # Landing page (openbuddy.fun)\n```\n\n## Contributing\n\n```bash\nmake lint    # Python: ruff check + format\nmake test    # pytest + vitest\n```\n\n- Python: ruff (line-length=100)\n- TypeScript: ESLint with `@\u002F` path alias\n- Firmware: ESP-IDF CMake, C++ namespaced by app\n\n## License\n\n[MIT](LICENSE)\n\n## Links\n\n- 🌐 Website: [openbuddy.fun](https:\u002F\u002Fopenbuddy.fun)\n- 📦 GitHub: [lennonkc\u002Fopenbuddy](https:\u002F\u002Fgithub.com\u002Flennonkc\u002Fopenbuddy)\n","OpenBuddy 是一个基于 M5Stack ESP32-S3 设备构建的AI桌面宠物系统，通过可爱的动画伴侣实现语音互动。其核心功能包括自然语言处理、实时语音识别与合成以及丰富的动画表情反馈。技术上，它采用了ESP32固件、Python后端和React前端组成的三层架构，并通过WebSocket实现实时通信。此外，OpenBuddy还支持Claude Code集成、自动服务发现、双设备同步运行及中英文双语切换等功能。适用于需要增添趣味性的人机交互场景，如个人办公桌装饰或教育娱乐领域的小型智能助手。",2,"2026-06-11 04:10:03","CREATED_QUERY"]