npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-clippy

v0.1.4

Published

OpenCode plugin — Clippy event gateway with proactive tips

Readme

OpenCode Clippy

A nostalgic Microsoft Office Clippy desktop widget that hooks into OpenCode and reacts to your coding events with classic animations, proactive tips, and Lottie effects.

"It looks like you're writing some code. Can I help?"

Platform Electron License

Features

  • 43 Clippy animations from the original sprite sheet — Greeting, Thinking, Writing, Searching, Alert, Congratulate, and more
  • Proactive tips in classic "It looks like you're trying to..." style — pattern-matches your coding activity and offers contextual suggestions
  • Lottie effects — sparkles on success, confetti on congratulate, alert pulses, thinking dots, wave lines
  • Classic Windows 98 tooltip — authentic #FFFFE1 yellow speech bubble with sharp corners, #808080 drop shadow, Tahoma font, and triangular tail
  • Task completion detection — Clippy celebrates when OpenCode finishes a task (session.idle)
  • 20 idle animations — Clippy looks around, waves, gets artsy, checks things, and fidgets while you think
  • Cross-platform — macOS, Windows, and Linux (Unix sockets on macOS/Linux, named pipes on Windows)
  • System tray — tray icon with show/hide toggle, runs in background
  • Single instance — only one Clippy widget runs at a time
  • Resilient IPC — heartbeat, auto-reconnect, launch-order independent (start either side first)

How It Works

The project has two parts:

  1. Desktop Widget — an Electron app that renders Clippy with sprite animations, speech bubbles, and Lottie effects
  2. OpenCode Plugin — a gateway that listens to OpenCode events and forwards them to the widget via IPC (Unix socket / named pipe)

They communicate over a local socket — no network, no ports, no firewall issues. Start them in any order; they auto-reconnect.

                    Unix Socket / Named Pipe
                    ~/.opencode-clippy/clippy.sock
                              
OpenCode ──► Plugin (clippy.ts) ──────────────► Electron Widget
             events + tips engine               sprite canvas + speech bubble + lottie

Installation

Plugin (OpenCode integration)

Add to your ~/.config/opencode/opencode.json:

{
  "plugin": [
    "opencode-clippy"
  ]
}

That's it — the plugin is installed from npm. Restart OpenCode to activate.

Desktop Widget

Download the latest release for your platform from GitHub Releases:

| Platform | Architecture | Download | |---|---|---| | macOS | Apple Silicon (arm64) | .dmg | | Windows | x86-64 | .exe | | Linux | arm64 | .AppImage / .deb |

Or build from source:

git clone https://github.com/huangcheng/opencode-clippy.git
cd opencode-clippy
pnpm install
pnpm build
pnpm start

Usage

  1. Start the Clippy desktop widget (from the downloaded app or pnpm start)
  2. Start OpenCode in any project directory
  3. Clippy reacts to your coding — they auto-connect in any launch order

Development

# Watch mode (rebuild on changes)
pnpm dev

# Run the widget standalone
pnpm start

# Run the test harness (visual animation tester)
pnpm --filter @opencode-clippy/desktop exec vite dev
# then open http://localhost:5173/test-harness.html

# Package for distribution
pnpm package          # current platform
pnpm package:mac      # macOS .dmg
pnpm package:win      # Windows .exe
pnpm package:linux    # Linux .AppImage/.deb

Event Mappings

| OpenCode Event | Clippy Animation | Speech Bubble | |---|---|---| | Task complete (session.idle) | Congratulate | "All done! Ready for more." | | AI responding (message.updated) | Thinking | "Working on it..." | | AI streaming (message.part.updated) | Thinking | "Thinking..." | | Code changed (session.diff) | Writing | "Changes detected!" | | Reading files (tool.execute.before read) | Searching | "Reading files..." | | Editing files (tool.execute.before edit) | Writing | "Making changes..." | | Running commands (tool.execute.before bash) | GetTechy | "Running command..." | | Tool success (tool.execute.after) | Congratulate | "Done!" | | Tool error (tool.execute.after error) | Alert | "Oops, something went wrong!" | | Permission needed (permission.asked) | GetAttention | "I need your permission!" | | Permission granted (permission.replied) | Congratulate | "Thanks!" | | Permission denied (permission.replied denied) | LookDown | "Okay, I won't do that." | | Session start (session.created) | Greeting | "Hey! Let's write some code!" | | Session end (session.deleted) | GoodBye | "See you next time!" | | File saved (file.edited) | Save | "File saved!" |

Proactive Tips

Clippy watches your coding patterns and offers help, just like the original:

| Pattern | Clippy Says | |---|---| | 3+ errors in 60 seconds | "It looks like you're running into errors!" | | Reading test files | "It looks like you're working on tests!" | | Editing config files (.env, .json, .yaml) | "It looks like you're editing configuration!" | | First edit in a session | "It looks like you're about to make your first change!" |

Tips have a 5-minute cooldown per pattern to avoid nagging.

Architecture

opencode-clippy/
├── packages/
│   ├── plugin/
│   │   └── src/clippy.ts         # OpenCode plugin — event gateway
│   ├── desktop/
│   │   ├── src/widget/
│   │   │   ├── main/main.ts      # Electron main — window, tray, IPC server
│   │   │   ├── preload/preload.ts# Context bridge for IPC → renderer
│   │   │   └── renderer/
│   │   │       ├── index.html     # Widget layout (transparent, frameless)
│   │   │       ├── renderer.ts    # Main renderer — wires everything together
│   │   │       ├── animation-engine.ts # Canvas sprite renderer with priority queue
│   │   │       ├── event-mapping.ts    # OpenCode event → animation/tip mapping
│   │   │       ├── speech-bubble.ts    # Windows 98 tooltip (classic yellow)
│   │   │       └── lottie-effects.ts   # Lottie overlay (sparkles, confetti, etc.)
│   │   ├── assets/               # Sprite sheet, lottie effects, tray icon
│   │   └── vite.config.ts
│   └── shared/
│       └── src/tips-engine.ts    # Proactive tips pattern matching
└── pnpm-workspace.yaml

IPC Protocol

Plugin → Widget communication uses newline-delimited JSON over Unix socket (~/.opencode-clippy/clippy.sock) or named pipe (\\.\pipe\opencode-clippy on Windows).

Event message:

{"type": "event", "event": "message.part.updated"}

Tip message:

{"type": "tip", "title": "It looks like you're running into errors!", "body": "Would you like me to suggest checking the error logs?", "animation": "GetAttention"}

Heartbeat:

{"type": "ping"}

Credits

  • Original Clippy character designed by Kevan Atteberry for Microsoft Office 97
  • felixrieseberg/clippy — Clippy sprite sheet assets (map.png, animations.json) and animation frame data
  • panta82/opencode-notificator — Reference implementation for OpenCode plugin event handling (session.idle detection, session ID tracking)
  • OpenCode — AI coding assistant whose plugin system makes this possible (docs)
  • Lottie animations rendered with lottie-web by Airbnb
  • Desktop widget built with Electron
  • Built with the assistance of Claude Code by Anthropic

License

MIT