|
1 | | -# MiniCPM-Desk-Pet |
| 1 | +<p align="center"> |
| 2 | + <img src="assets/readme%20logo.png" alt="MiniCPM Desk Pet" width="760"> |
| 3 | +</p> |
2 | 4 |
|
3 | | -[](./LICENSE) |
4 | | -[](https://github.com/rullerzhou-afk/clawd-on-desk) |
5 | | -[](https://github.com/OpenBMB/MiniCPM) |
| 5 | +<p align="center"> |
| 6 | + <a href="./LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0--only-blue.svg" alt="License"></a> |
| 7 | + <a href="https://huggingface.co/openbmb/MiniCPM5-1B-GGUF"><img src="https://img.shields.io/badge/Model-MiniCPM5--1B-green" alt="MiniCPM5-1B"></a> |
| 8 | + <img src="https://img.shields.io/badge/Platform-macOS%20Apple%20Silicon-lightgrey" alt="Platform"> |
| 9 | +</p> |
6 | 10 |
|
7 | | -**English** | [中文说明](#中文说明) |
| 11 | +<p align="center"> |
| 12 | + <strong>English</strong> | <a href="README.zh-CN.md">简体中文</a> |
| 13 | +</p> |
8 | 14 |
|
9 | | -MiniCPM-Desk-Pet is a local-first desktop pet powered by |
10 | | -[MiniCPM5-0.9B](https://github.com/OpenBMB/MiniCPM). It combines an |
11 | | -Electron desktop companion with a lightweight `llama.cpp` inference sidecar, |
12 | | -so users can chat with MiniCPM locally and let the pet react to coding-agent |
13 | | -events from Cursor, Claude Code, Codex, and related tools. |
| 15 | +<p align="center"> |
| 16 | + A local-first desktop pet powered by MiniCPM. Download, complete the guided setup, and chat with a tiny companion that lives on your desktop. |
| 17 | +</p> |
14 | 18 |
|
15 | | -> **Attribution.** The desktop pet UI in [`clawd-on-desk/`](clawd-on-desk/) |
16 | | -> is a vendored fork of |
17 | | -> [rullerzhou-afk/clawd-on-desk](https://github.com/rullerzhou-afk/clawd-on-desk) |
18 | | -> at upstream commit `5b1f003`. MiniCPM-Desk-Pet adds local MiniCPM5 |
19 | | -> inference, onboarding, GGUF model management, LoRA persona switching, and |
20 | | -> MiniCPM-powered narration on top of that work. See [`NOTICE.md`](./NOTICE.md) |
21 | | -> for the full attribution chain. |
| 19 | +--- |
22 | 20 |
|
23 | 21 | ## Highlights |
24 | 22 |
|
25 | | -- **Local MiniCPM chat**: GGUF inference through `llama-server`, with Metal on |
26 | | - Apple Silicon, CUDA on NVIDIA, and CPU fallback. |
27 | | -- **Desktop pet UI**: an Electron companion that can stay on your desktop and |
28 | | - surface chat, task-completion, and agent-status cues. |
29 | | -- **Coding-agent narration**: Cursor / Claude Code / Codex events can trigger |
30 | | - short MiniCPM-powered summaries and reactions. |
31 | | -- **First-run onboarding**: environment check, accelerator detection, model |
32 | | - download, sidecar warmup, and ready state are handled in-app. |
33 | | -- **Persona LoRA support**: switch or import GGUF LoRA adapters from |
34 | | - **Settings -> MiniCPM**; bundled adapters are loaded per request to avoid |
35 | | - cross-session contamination. |
36 | | -- **Small app package**: the app ships a thin gateway and `llama-server`; |
37 | | - model weights are downloaded separately on first launch. |
38 | | - |
39 | | -## Status |
40 | | - |
41 | | -The primary release target is **macOS Apple Silicon (M1+)**. The macOS MVP |
42 | | -path is working end to end: download the DMG, complete onboarding, download a |
43 | | -GGUF model, warm up the sidecar, and start chatting with the pet. |
44 | | - |
45 | | -Windows and Linux builds share the same sidecar architecture, but they may lag |
46 | | -behind macOS in QA coverage. The DMG is not notarized yet; see the install |
47 | | -notes below if macOS Gatekeeper blocks the first launch. |
48 | | - |
49 | | -## Install |
50 | | - |
51 | | -1. Download the latest macOS Apple Silicon `.dmg` from |
52 | | - [Releases](https://github.com/OpenBMB/MiniCPM-Desk-Pet/releases). |
53 | | -2. Open the DMG and drag the app into `Applications`. |
54 | | -3. If macOS says the developer cannot be verified, either: |
55 | | - - right-click the app icon, choose **Open**, then confirm **Open**; or |
56 | | - - run `xattr -cr /Applications/MiniCPM\ Desk\ Pet.app` and open it again. |
57 | | -4. Follow the five-step onboarding flow: |
58 | | - - environment check |
59 | | - - accelerator detection |
60 | | - - GGUF model download from Hugging Face |
61 | | - - sidecar launch and warmup |
62 | | - - ready state |
63 | | - |
64 | | -No Python, conda, uv, PyTorch, or terminal setup is required for normal use. |
65 | | - |
66 | | -## Daily Use |
67 | | - |
68 | | -- `Cmd+Shift+M`: toggle the MiniCPM chat bubble. |
69 | | -- `Cmd+Shift+T`: toggle thinking-mode display. |
70 | | -- `Esc`: close the bubble when it has focus. |
71 | | -- Right-click the pet, then open **Settings -> MiniCPM** to change the GGUF |
72 | | - path, accelerator, chat-bubble position, narration toggle, onboarding state, |
73 | | - or active LoRA persona. |
74 | | - |
75 | | -## Persona Adapter |
76 | | - |
77 | | -The bundled neko-style LoRA adapter is fine-tuned from MiniCPM5-0.9B using |
78 | | -[liumindmind/NekoQA-30K](https://huggingface.co/datasets/liumindmind/NekoQA-30K), |
79 | | -a Hugging Face dataset with 30,834 cat-girl QA samples across categories such |
80 | | -as ACG, emotional support, creative writing, safety, math, code, and workplace |
81 | | -scenarios. The Hugging Face dataset card lists the dataset license as |
82 | | -Apache-2.0. |
83 | | - |
84 | | -The adapter is provided as both PEFT source artifacts and a GGUF LoRA file for |
85 | | -`llama-server`. See [`adapters/README.md`](adapters/README.md) and |
86 | | -[`adapters/lora_nekoqa_adapter_20260515_0738/USAGE.md`](adapters/lora_nekoqa_adapter_20260515_0738/USAGE.md) |
87 | | -for conversion details, smoke-test prompts, and known limitations. |
88 | | - |
89 | | -## Developer Quickstart |
90 | | - |
91 | | -See [`docs/development.md`](docs/development.md) for the full development |
92 | | -guide. The short path is: |
| 23 | +- **Local by default** — after the model is downloaded, everyday chat runs on your machine. |
| 24 | +- **Zero manual setup** — first launch guides you through environment check, model download, and warm-up. |
| 25 | +- **Desktop companion** — open a floating chat bubble, talk with MiniCPM, and keep the pet on screen while you work. |
| 26 | +- **Agent-aware reactions** — the pet can react to coding activity from tools such as Cursor, Claude Code, and Codex. |
| 27 | +- **Smart model download** — the app can download from Hugging Face or ModelScope and choose the better source for your network. |
| 28 | +- **Persona support** — switch or import character adapters from **Settings -> MiniCPM**. |
93 | 29 |
|
94 | | -```bash |
95 | | -git clone git@github.com:OpenBMB/MiniCPM-Desk-Pet.git |
96 | | -cd MiniCPM-Desk-Pet |
| 30 | +## Getting Started |
| 31 | + |
| 32 | +### System Requirements |
| 33 | + |
| 34 | +| Item | Recommended | |
| 35 | +| --- | --- | |
| 36 | +| OS | macOS 14.0 or later | |
| 37 | +| Chip | Apple Silicon (M1/M2/M3/M4) | |
| 38 | +| Disk Space | About 2 GB for the app and default model | |
| 39 | +| Network | Required on first launch unless you already have a local model file | |
| 40 | + |
| 41 | +### Installation |
97 | 42 |
|
98 | | -mkdir -p models |
99 | | -# Drop a GGUF you already have, or let onboarding download one on first launch. |
100 | | -cp /path/to/your/minicpm5-0.9b.Q4_K_M.gguf models/ |
| 43 | +1. Go to [Releases](https://github.com/OpenBMB/MiniCPM-Desk-Pet/releases) and download the latest macOS `.dmg`. |
| 44 | +2. Open the DMG and drag **MiniCPM Desk Pet** into `Applications`. |
| 45 | +3. Launch the app and follow the setup guide. |
101 | 46 |
|
102 | | -./go.sh # dev mode: build llama-server if needed, sync gateway, launch app |
103 | | -./go.sh build # package a macOS arm64 DMG |
| 47 | +If macOS blocks the first launch, right-click the app and choose **Open**. If needed, remove the quarantine flag: |
| 48 | + |
| 49 | +```bash |
| 50 | +xattr -cr /Applications/MiniCPM\ Desk\ Pet.app |
104 | 51 | ``` |
105 | 52 |
|
106 | | -The inference sidecar lives in [`minicpm-sidecar/`](minicpm-sidecar/) and wraps |
107 | | -`llama.cpp` with a thin FastAPI gateway. The Electron desktop app lives in |
108 | | -[`clawd-on-desk/`](clawd-on-desk/). |
109 | | - |
110 | | -## Documentation |
111 | | - |
112 | | -- [`minicpm-sidecar/README.md`](minicpm-sidecar/README.md): sidecar overview, |
113 | | - API, build flow, and vendored `llama.cpp` branch. |
114 | | -- [`docs/development.md`](docs/development.md): developer setup and repository |
115 | | - layout. |
116 | | -- [`docs/llama-cpp-migration.md`](docs/llama-cpp-migration.md): migration from |
117 | | - the older PyTorch sidecar to `llama.cpp`. |
118 | | -- [`adapters/README.md`](adapters/README.md): LoRA adapter format, conversion, |
119 | | - loading, and packaging notes. |
120 | | -- [`CONTRIBUTING.md`](CONTRIBUTING.md): contribution workflow and test |
121 | | - expectations. |
122 | | -- [`CHANGELOG.md`](CHANGELOG.md): version history. |
123 | | -- [`docs/archive/`](docs/archive/): archived v0.7 design and architecture docs. |
124 | | - |
125 | | -## 中文说明 |
126 | | - |
127 | | -MiniCPM-Desk-Pet 是一个本地优先的 MiniCPM5-0.9B 桌宠实验项目:Electron 桌宠负责 |
128 | | -交互和事件展示,`minicpm-sidecar/` 通过 `llama.cpp` 的 `llama-server` 加载 GGUF |
129 | | -模型,在 Apple Silicon 上走 Metal,在 NVIDIA 上走 CUDA,并保留 CPU fallback。 |
130 | | - |
131 | | -普通用户只需要从 |
132 | | -[Releases](https://github.com/OpenBMB/MiniCPM-Desk-Pet/releases) 下载 macOS DMG, |
133 | | -双击安装后跟随 Onboarding 完成环境检查、加速器探测、模型下载、sidecar warmup 和 |
134 | | -就绪流程。日常可用 `Cmd+Shift+M` 打开聊天气泡,或在右键菜单的 |
135 | | -**Settings -> MiniCPM** 中切换模型路径、旁白、加速器和 LoRA 人格。 |
136 | | - |
137 | | -本项目的桌宠 UI 层 fork 自 |
138 | | -[rullerzhou-afk/clawd-on-desk](https://github.com/rullerzhou-afk/clawd-on-desk) |
139 | | -(upstream commit `5b1f003`),并在此基础上加入 MiniCPM5 本地推理、模型下载、 |
140 | | -Onboarding、LoRA 人格切换和 coding-agent 旁白。完整归属信息请见 |
141 | | -[`NOTICE.md`](./NOTICE.md)。 |
142 | | - |
143 | | -内置猫娘风格 LoRA 使用 Hugging Face 上的 |
144 | | -[liumindmind/NekoQA-30K](https://huggingface.co/datasets/liumindmind/NekoQA-30K) |
145 | | -数据集微调,该数据集包含 30,834 条猫娘问答样本,覆盖 ACG、心理疗愈、创意写作、 |
146 | | -安全、数学、代码、职场等类别;Hugging Face 数据集卡片标注其许可证为 Apache-2.0。 |
| 53 | +### First Launch |
| 54 | + |
| 55 | +MiniCPM Desk Pet includes a complete first-launch guide: |
| 56 | + |
| 57 | +**Environment Check** -> **Model Download** -> **Model Warm-up** -> **Ready to Use** |
| 58 | + |
| 59 | +The default model is [MiniCPM5-1B-GGUF](https://huggingface.co/openbmb/MiniCPM5-1B-GGUF). You can let the app download it automatically, or choose an existing local `.gguf` file. |
| 60 | + |
| 61 | +## Features |
| 62 | + |
| 63 | +### Chat With a Local Pet |
| 64 | + |
| 65 | +Use the floating chat bubble to talk with MiniCPM from your desktop. Once setup is complete, your normal conversations do not need a remote inference service. |
| 66 | + |
| 67 | +Useful shortcuts: |
| 68 | + |
| 69 | +- `Cmd+Shift+M` — open or close the MiniCPM chat bubble |
| 70 | +- `Cmd+Shift+T` — show or hide thinking mode |
| 71 | +- `Esc` — close the bubble when input is focused |
| 72 | + |
| 73 | +### Reactions While You Work |
| 74 | + |
| 75 | +MiniCPM Desk Pet can stay beside your workspace and react to coding-agent activity: thinking, working, finishing tasks, waiting for attention, or going idle. |
| 76 | + |
| 77 | +### Model Management |
| 78 | + |
| 79 | +The MiniCPM settings page lets you: |
| 80 | + |
| 81 | +- download the default model or choose a local model file |
| 82 | +- rerun onboarding |
| 83 | +- manage character/persona adapters |
| 84 | +- restart the local model runtime when needed |
| 85 | + |
| 86 | +### Persona Adapters |
| 87 | + |
| 88 | +The app includes a neko-style persona adapter. You can switch adapters or import your own from **Settings -> MiniCPM**. |
| 89 | + |
| 90 | +## Roadmap |
| 91 | + |
| 92 | +- Broader Windows and Linux validation. |
| 93 | +- More persona presets. |
| 94 | +- Clearer model download diagnostics and retry guidance. |
| 95 | +- Faster first launch and smaller app footprint. |
| 96 | +- Richer desktop-pet narration for long-running coding sessions. |
| 97 | + |
| 98 | +## Known Limitations |
| 99 | + |
| 100 | +- The primary tested release target is macOS Apple Silicon. |
| 101 | +- First launch requires an internet connection unless you provide a local model file. |
| 102 | +- Response speed depends on your chip, memory pressure, and selected model. |
| 103 | +- Coding-agent reactions depend on each tool's integration behavior and may vary by version. |
| 104 | + |
| 105 | +## Developer Notes |
| 106 | + |
| 107 | +For development setup, packaging, and repository layout, see [`docs/development.md`](docs/development.md). |
147 | 108 |
|
148 | 109 | ## Acknowledgments |
149 | 110 |
|
150 | | -- **Desktop pet UI**: forked from |
151 | | - [rullerzhou-afk/clawd-on-desk](https://github.com/rullerzhou-afk/clawd-on-desk) |
152 | | - at upstream commit `5b1f003`. Thanks to |
153 | | - [@rullerzhou-afk](https://github.com/rullerzhou-afk) and all upstream |
154 | | - contributors. |
155 | | -- **Inference backend**: built on |
156 | | - [llama.cpp](https://github.com/ggml-org/llama.cpp) (MIT, © Georgi Gerganov |
157 | | - and contributors). MiniCPM5 tokenizer support is currently vendored from |
158 | | - [zhangtao2-1/llama.cpp@c5ede29](https://github.com/zhangtao2-1/llama.cpp). |
159 | | -- **Model weights**: loaded from |
160 | | - [OpenBMB/MiniCPM](https://github.com/OpenBMB/MiniCPM); weights are not bundled |
161 | | - in this repository. |
162 | | -- **Persona data**: the bundled neko LoRA uses |
163 | | - [liumindmind/NekoQA-30K](https://huggingface.co/datasets/liumindmind/NekoQA-30K) |
164 | | - for fine-tuning. |
165 | | -- See [`NOTICE.md`](./NOTICE.md) and |
166 | | - [`clawd-on-desk/NOTICE.md`](clawd-on-desk/NOTICE.md) for the authoritative |
167 | | - third-party attribution list. |
| 111 | +- Desktop pet UI is based on [rullerzhou-afk/clawd-on-desk](https://github.com/rullerzhou-afk/clawd-on-desk). Full attribution is listed in [`NOTICE.md`](./NOTICE.md). |
| 112 | +- Model weights come from the OpenBMB MiniCPM model family and are downloaded separately. |
| 113 | +- The bundled neko persona uses [liumindmind/NekoQA-30K](https://huggingface.co/datasets/liumindmind/NekoQA-30K) for fine-tuning data. |
168 | 114 |
|
169 | 115 | ## License |
170 | 116 |
|
171 | | -This repository is distributed under |
172 | | -[GNU AGPL-3.0-only](./LICENSE), matching the upstream `clawd-on-desk` license. |
173 | | - |
174 | | -- **Source code** in this repository, including `clawd-on-desk/`, |
175 | | - `minicpm-sidecar/`, and adapter tooling, is distributed under AGPL-3.0-only. |
176 | | -- **MiniCPM model weights** are downloaded separately and are governed by the |
177 | | - [OpenBMB MiniCPM Model License](https://github.com/OpenBMB/MiniCPM/blob/main/MiniCPM%20Model%20License.md), |
178 | | - not by AGPL. |
179 | | -- **Fine-tuning datasets** keep their own licenses; NekoQA-30K is cited above |
180 | | - with its Hugging Face dataset page. |
181 | | -- **Artwork and theme assets** follow the rights and notices listed in the |
182 | | - upstream `clawd-on-desk/NOTICE.md`. |
183 | | - |
184 | | -Under AGPL-3.0 section 13, if you run a modified version of this project as a |
185 | | -network service, you must provide users with access to the complete |
186 | | -corresponding source code. The public source for this project is |
187 | | -https://github.com/OpenBMB/MiniCPM-Desk-Pet. |
| 117 | +This repository is distributed under [GNU AGPL-3.0-only](./LICENSE). |
| 118 | + |
| 119 | +MiniCPM model weights are downloaded separately and governed by the [OpenBMB MiniCPM Model License](https://github.com/OpenBMB/MiniCPM/blob/main/MiniCPM%20Model%20License.md). Artwork, third-party code, and datasets keep their own notices; see [`NOTICE.md`](./NOTICE.md) and [`clawd-on-desk/NOTICE.md`](clawd-on-desk/NOTICE.md). |
0 commit comments