A tiny always-on-top desktop pet that reacts to Claude Code activity in real time. When Claude reads, edits, runs commands, searches, spawns subagents, or finishes a turn, the companion changes its expression and props to match. It ships as a Tauri desktop app plus a Claude Code plugin that forwards hook events to it.
brew install --cask wraithyy/tap/companionFirst time:
brew tap wraithyy/tapif the tap isn't added automatically.
Download the latest release for your platform from the Releases page:
| Platform | File |
|---|---|
| macOS Apple Silicon | Companion_x.y.z_aarch64.dmg |
| macOS Intel | Companion_x.y.z_x64.dmg |
| Windows | Companion_x.y.z_x64-setup.exe |
| Linux | Companion_x.y.z_amd64.AppImage / .deb |
Companion is not code-signed. On first launch macOS may block it:
xattr -dr com.apple.quarantine /Applications/Companion.appOr right-click the app → Open → Open in the dialog.
git clone https://github.com/wraithyy/companion
cd companion
pnpm install
pnpm tauri dev| Thinking | Working | Editing |
|---|---|---|
![]() |
![]() |
![]() |
| Thought bubble while Claude plans | Gear spins during Bash commands | Red square while writing files |
| Subagents (thinking) | Subagents (cat) | Done |
|---|---|---|
![]() |
![]() |
![]() |
| Mini companions per subagent | Cat skin with mini cats | Check on turn complete |
| Asking |
|---|
![]() |
| Question mark when Claude asks you something |
Claude Code ──hook event──▶ companion-forward.sh ──HTTP POST──▶ 127.0.0.1:4317
│
Tauri server emits "cc-event"
│
React reducer maps the
event to a companion state
│
Sprite + animation update
- The plugin declares hooks for each Claude Code event (
PreToolUse,Stop,SubagentStop, …) in.claude-plugin/plugin.json. Each runs a small forwarding script (hooks/companion-forward.sh) that POSTs the event JSON to a local HTTP server the app runs on port 4317. - The Tauri backend re-emits it to the web frontend, where a reducer maps the event to one of the companion states (see the table below).
- The active skin decides what the character looks like; states only decide the expression (open/closed eyes), the floating accessory, and the animation.
Companion is a Claude Code plugin. Installing the plugin registers its
hooks automatically — there's no install script and nothing is written to your
global ~/.claude/settings.json. The hooks live in the plugin
(.claude-plugin/plugin.json) and run from the plugin directory via
${CLAUDE_PLUGIN_ROOT}.
pnpm install
pnpm tauri build # produces a packaged app, or:
pnpm tauri dev # run in developmentLeave the app running — it listens on 127.0.0.1:4317 for events. If the port
is already taken (another instance), it logs a warning and exits.
Add this repo as a plugin marketplace, then install the companion plugin:
/plugin marketplace add wraithyy/companion
/plugin install companion
(Or /plugin marketplace add <path-to-this-repo> for a local checkout.)
That's it. Enabling the plugin activates the hooks; disabling it removes them.
Use /plugin to manage which projects it's enabled in — no manual settings
edits, no global hooks.
The hooks call
hooks/companion-forward.shinside the plugin, which POSTs each event to the running app. The app must be running to see anything.
The window is small, frameless, transparent, and always on top. Controls fade in on hover:
- Move it — drag the grip (
⠿) in the top-left, or just drag the body. - Resize it — drag the grip (
⤡) in the bottom-right corner. The companion scales with the window (min 120px, max 600px). - Switch skins — click the gear (
⚙) in the top-right and pick a character. Your choice is remembered across restarts. - Add / remove skins — see Creating your own skins.
When Claude spawns subagents (the Task/Agent tool), a row of mini
companions appears below the main one — one per in-flight subagent — and they
disappear as each subagent finishes. A skin can override what its minis look
like (e.g. the kara skin shows green beer bottles).
The reducer maps hook events to these states. closed states show the sleepy
(eyes-closed) sprite; everything else shows the open sprite.
| State | Triggered by | Expression | Accessory |
|---|---|---|---|
idle |
session start / no work in flight | closed | — |
sleeping |
session end | closed | 💤 (zzz) |
thinking |
between events while a turn is active | open | thought |
reading |
Read/Grep/Glob/search tools |
open | book |
editing |
Edit/Write/NotebookEdit |
open | pencil |
working |
Bash |
open | gear |
searching |
web/scrape tools | open | magnifier |
asking |
AskUserQuestion / notifications |
open | question |
tidying |
PreCompact |
open | broom |
done |
Stop (turn finished) |
open | check |
A skin is a small JSON object describing two pixel grids (eyes open / eyes
closed) and the colors they use. You can add one without rebuilding the app:
click the gear → + Add skin, paste the JSON, and hit Add. Custom skins
are stored in localStorage and can be removed with the × that appears on
hover.
{
"id": "my-skin",
"label": "My Skin",
"palette": {
"C": "#5b3fb0",
"S": "#cda87f",
"K": "#120c06"
},
"open": [
"..CCCC..",
".CSSSSC.",
".CSKSKS.",
".CSSSSC.",
"..CCCC.."
],
"closed": [
"..CCCC..",
".CSSSSC.",
".CSKKKS.",
".CSSSSC.",
"..CCCC.."
],
"size": 88
}| Field | Required | Meaning |
|---|---|---|
id |
yes | Unique id, lowercase letters / numbers / dashes. Can't reuse a built-in id. |
label |
yes | Display name in the picker. |
palette |
yes | Map of single-character keys → hex colors (#rgb or #rrggbb). |
open |
yes | Array of strings — the eyes-open grid. Each character is one pixel. |
closed |
yes | Array of strings — the eyes-closed / sleepy grid. |
size |
no | Rendered width in px (default 88). |
mini |
no | Override sprite for subagents — { "rows": [...], "palette": {...}, "size": 24 }. |
- Each character in
open/closed/mini.rowsmust be defined in the palette — except.(a dot), which is reserved for transparency. - Rows don't all have to be the same length; the grid is laid out left-aligned and the widest row sets the canvas width.
- Colors: palette keys are single characters, so you get one color per
distinct character. Using
A–Z,a–z,0–9, and symbols, that's ~90 color slots available in a single skin — plenty for detailed pixel art. - Keep grids small and bold. The built-in skins are ~16×16; cramming a detailed image into a tiny grid reads as mud. Use strong value contrast and a dark outline to separate regions.
- Sketch on paper or in a spreadsheet first — one cell per pixel.
- Pick a small palette with clear light/dark contrast; add a couple of highlight pixels to suggest form.
- The
openandclosedgrids usually differ only around the eyes and mouth. - For subagent minis, a simple recognizable icon works better than a shrunken copy of the main sprite.
To bake a skin into the app instead of importing it at runtime:
- Create
src/lib/sprites/<id>.tsexporting aCompanionSkin(copy an existing one likesrc/lib/sprites/cat.tsas a template). - Register it in
src/lib/sprites/index.ts(importit and add to theSKINSarray). - Rebuild.
- Bump version across all files:
node scripts/bump-version.mjs X.Y.Z
- Commit and tag:
git commit -am "chore: bump version to X.Y.Z" git tag vX.Y.Z git push && git push --tags
- GitHub Actions builds artifacts and creates a draft Release automatically.
- Review the draft on GitHub Releases, then publish.
- The Homebrew cask updates automatically after publish.
pnpm dev # Vite dev server (frontend only)
pnpm tauri dev # full desktop app in dev mode
pnpm build # typecheck + production build
pnpm test # run the test suite (vitest)Key source files:
| Path | Responsibility |
|---|---|
src/lib/eventMap.ts |
Hook event → companion state mapping |
src/state/companionReducer.ts |
State + subagent (mini) accounting |
src/lib/sprites/ |
Skins, shared accessories, sprite types |
src/lib/sprites/customSkins.ts |
Custom-skin JSON parsing/validation (zod) |
src/components/PixelSprite.tsx |
Renders a pixel grid as crisp SVG rects |
src-tauri/src/server.rs |
Local HTTP server that receives hook events |
hooks/companion-forward.sh |
Forwards Claude Code hook events to the app |






