Back to projects
experimental

CCrab

A desktop companion for Claude Code that costs zero idle CPU.

A native macOS desktop companion for Claude Code: a pixel crab on a floating panel that reacts to what your agent sessions are doing, plus a menu bar item with your 5-hour and weekly usage bars, every live session, and recent projects. Written in Swift against AppKit and Core Animation — no Electron, no WebView.

Problem

Ambient status for a coding agent normally means either a browser tab or an Electron app, and both burn CPU permanently for a widget you only glance at.

What I built

Every animation is a Core Animation keyframe over layer contents, so the render server owns the timeline and the process gets no per-frame wakeups. The resting pose is parsed from vector rects into CALayers instead of decoded bitmaps, and animations are removed — not paused — the moment the panel is occluded, the display sleeps, or the screen locks.

Result

0.0% CPU whether idle or playing a 60-frame sprite loop, with a bounded three-animation decode cache that is purged entirely whenever the renderer parks.

Audience

For developers running Claude Code all day who want ambient session state and usage limits without another Electron window.

Developer setup

source without GitHub CLIgit clone https://github.com/jx-grxf/CCrab.git && cd CCrab
source with GitHub CLIgh repo clone jx-grxf/CCrab && cd CCrab
latest releaseopen https://github.com/jx-grxf/CCrab

Highlights

  • 0.0% CPU idle and while animating — Core Animation owns the timeline, so there is no timer and no draw loop.
  • Menu bar with 5-hour and weekly usage bars, reset countdowns, and every live session.
  • State arrives over Claude Code hooks on a loopback endpoint — nothing polls, no extra API calls, no token is read.
  • Connecting backs up your settings.json first and leaves other tools' hook entries alone.