MacPet: Desktop Companion & AI Assistant
A native macOS desktop companion that doubles as an AI assistant, chatting through local models or cloud AI APIs with a simple setup.

- Client & domain
- Personal project
- Native macOS application
- My role
- Creator
- Year
- 2026
- Status
- Personal use
01 / Overview
What it is
MacPet puts Mochi, an animated little robot, on the macOS desktop. It walks along the Dock, hops onto windows, naps, and reacts when you pet or throw it. Press ⌃⌥C and it becomes a chat assistant that can talk to a local model through Ollama or to cloud models through their APIs, with replies streamed into the chat as they arrive. I built it for my own use.
Demo
In action
- 0:00Mochi idles and walks along the Dock
- 0:05Hops onto a window and reacts to a click
- 0:10Opens chat with ⌃⌥C and streams a Swift explanation
- 0:27Assistant menu shows model choices; switches to gemma3:4b
- 0:34Take a Nap puts Mochi to sleep on the window
- (opens full size in a new tab)MacPet

On the Dock: Mochi shares the desktop with native macOS apps. - (opens full size in a new tab)MacPet

Window perching: the pet sits on a window’s edge as part of the desktop. - (opens full size in a new tab)MacPet

Native chat: a sample reply streams into the conversation with formatted code and a Stop control. - (opens full size in a new tab)MacPet

Assistant menu: local model selection and cloud-provider setup alongside the pet’s actions. - (opens full size in a new tab)MacPet

Click reaction: Mochi waves and responds with a speech bubble. - (opens full size in a new tab)MacPet

Super Size: the app renders the character larger, with animated reactions and sparkle particles.
02 / Purpose
A friendlier way to reach an AI model
I wanted an assistant that is always one shortcut away and not tied to a single provider:
- Switch between a free local model and cloud models without changing apps
- Keep API keys stored securely on the machine
- Stay light enough to run all day in the background
03 / My role
Role and contributions
- Scope
- Design and development
- Designed and built the app end to end, including the robot character, the chat, and the provider integrations.
04 / Technical approach
Native, lightweight, provider-agnostic
- Any model, one interface
- Streaming clients cover Ollama for local models, OpenAI-compatible cloud APIs (such as Groq, Gemini, OpenRouter, and Cerebras), and Claude, selectable from a menu.
- Keys in the Keychain
- API keys are stored in the macOS login Keychain, and cloud model lists are fetched live from each provider.
- Drawn in code
- The robot is drawn with Core Graphics in Swift and AppKit, with no web view and no special macOS permissions needed.
- Adaptive frame rate
- The main loop moves between 15, 30, and 60 Hz depending on activity to keep background resource use low.
05 / Technologies
Stack
- Swift
- AppKit
- Core Graphics
- LLM APIs (Claude, OpenAI-compatible)
- Ollama
06 / Challenges
Engineering considerations
- Supporting several AI providers with different APIs behind one streaming chat interface.
- Animating the robot smoothly while keeping background CPU use low.
- Integrating with the Dock, windows, and the macOS event loop without special permissions.
07 / Outcome
Where it stands
- In daily personal use.
08 / Related work
Keep exploring

Product2025 / Present
BinaryCloud
An isolated VPN per organization, with remote desktop in the browser
- OpenVPN
- Linux networking (iptables)
- WebSockets
In productionCase study
Industrial Software2025 / Present
Zydus UMS
3,000+ cleanroom filters tracked across 30 facilities
- Python
- Django
- Django Channels
In productionCase study