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

@fredruss/claude-code-companion

v0.8.0

Published

Desktop pet that shows Claude Code's real-time status

Readme

Claude Code Companion

A desktop companion that lets you monitor Claude Code. See when it's done, when it needs input, and how much context you've used without having to stare at your terminal. Also, it's cute.

Installation

Prerequisites

  • Node.js 18+
  • Claude Code CLI

Option 1: npm (recommended)

npm install -g @fredruss/claude-code-companion

After installing, configure the Claude Code hooks:

claude-companion setup

Then launch the app:

claude-companion

Option 2: From source

  1. Clone and install:

    git clone https://github.com/fredruss/claude-companion
    cd claude-companion
    npm install

    This installs dependencies and prompts to configure Claude Code hooks. Type y to allow.

  2. Run the app:

    npm run dev

Usage

The pet window will appear and float on top of other windows. It automatically updates based on what Claude Code is doing:

  • Reading - Claude is reading files or searching code
  • Working - Claude is writing, editing, or running commands
  • Waiting - Claude needs your permission or has a question
  • Idle - Claude is waiting for input
  • Done - Claude finished a task
  • Error - Something went wrong

The pet also displays the context window usage (input + cache tokens from the latest API call).

Controls

  • Drag - Click and drag the pet to move it around your screen
  • Right-click - Change sticker pack (2 packs currently available + basic SVG pack)
  • Stop - Run claude-companion stop, use Cmd+Q, or quit from the dock

How It Works

Claude Code Companion uses Claude Code's hook system to receive real-time events:

Claude Code (Terminal) --[hooks]--> status.json <--[watching]-- Desktop Pet (Electron)
  1. When you use Claude Code, hooks send events to a status reporter script
  2. The script writes status updates to ~/.claude-companion/status.json
  3. The Electron app watches this file and updates the pet's expression

Privacy

The companion displays status information in ~/.claude-companion/status.json.

What IS captured in status.json:

  • Tool names - Read, Write, Bash, Grep, etc.
  • Filenames - Names of files being read, written, or edited (e.g., Reading index.ts...)
  • Command names - First word of bash commands (e.g., Running npm...)
  • Search patterns - Grep patterns, truncated to 20 characters (e.g., Searching for "pattern"...)
  • Thinking snippets - Brief excerpts of Claude's internal reasoning, truncated to ~40 characters
  • Token counts - Current context window usage

What is NOT captured:

  • Claude's responses to you (only internal "thinking" blocks are read)
  • Your prompts or questions
  • File contents or code
  • Full bash commands (only the first word)

All data stays local on your machine and is never sent anywhere.

Transcript Data

Token counts and thinking snippets are extracted from Claude's transcript file (~/.claude/projects/.../session.jsonl), not from hook events. Thinking snippets only appear when using models with extended thinking enabled (like Opus).

Building from Source

To build distributable installers for your platform:

cd app
npm run dist        # Build for current platform
npm run dist:mac    # macOS .dmg
npm run dist:win    # Windows .exe
npm run dist:linux  # Linux .AppImage

Output goes to app/dist/.

Note: macOS builds will show a security warning unless code-signed with an Apple Developer certificate.

Troubleshooting

Pet doesn't update when using Claude Code

Check that the hooks are configured in ~/.claude/settings.json:

cat ~/.claude/settings.json | grep claude-companion

If hooks are missing, run claude-companion setup to configure them.

Pet window doesn't appear

On macOS, you may need to allow the app in System Preferences > Security & Privacy.

License

MIT