Petty.
A desktop pet you can program in JavaScript — a floating animated blob that hosts a sandboxed plugin runtime.
A pet that’s also a platform.
Petty started as a joke — a little blob that lives on my desktop and reacts to what I’m doing. Then I gave it a plugin API, and the joke became the point.
Each plugin is a sandboxed chunk of JavaScript running inside JavaScriptCore, with a tiny capability-scoped bridge to the host. A pomodoro timer, a git status watcher, a weather widget, even Claude Code hooks — all just plugins, none of them able to crash the dock.
The hard part was never the animation. It was making an extension surface that’s fun enough to play with and locked-down enough to trust.
“What if a desktop pet was a runtime, not a toy? Something you could extend instead of just watch.”
how it
works.The host
A native Swift + SpriteKit app draws the blob, handles animation states, and owns the window. It exposes a narrow, capability-scoped API.
The sandbox
Each plugin runs in its own JavaScriptCore context. No filesystem, no network, no dock access unless the manifest asks and the user grants.
The plugins
Pomodoro, weather, git, calendar, Claude Code hooks. Each is ~100 lines of JS. The pet reacts to all of them through a shared event bus.