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

claude-util

v1.1.2

Published

CLI utility for logging and analyzing Claude Code sessions

Downloads

685

Readme

claude-util

CLI utility for logging and analyzing Claude Code sessions for analytics and team visibility.

Installation

npm install -g claude-util

Quick Start

# Full install (prompts for email + API key, installs hooks)
claude-util install

This will:

  1. Prompt for your email and API key
  2. Save configuration to ~/.claude-util/config.json
  3. Install hooks in ~/.claude/settings.json

Commands

| Command | Description | |---------|-------------| | claude-util install | Full install (setup + hooks in one command) | | claude-util setup | Configure credentials only | | claude-util install-hooks | Install Claude Code hooks | | claude-util uninstall-hooks | Remove Claude Code hooks | | claude-util uninstall | Complete removal | | claude-util config | View current configuration | | claude-util config set <key> [value] | Set a config value | | claude-util version | Print version info | | claude-util log | Log an interaction (called by hooks) |

Configuration

Config is stored in ~/.claude-util/config.json:

{
  "username": "[email protected]",
  "api_key": "sk-xxx",
  "server_url": "https://your-server.com"
}

Config Keys

  • username / email - Your email address
  • api-key / apikey - API key for authentication
  • server-url / server_url - Server URL (optional)

Server URL Priority

  1. CLAUDE_UTIL_SERVER_URL environment variable
  2. server_url in config file
  3. Default: http://localhost:3000

How It Works

The tool installs a hook in Claude Code's ~/.claude/settings.json:

{
  "hooks": {
    "Stop": [{
      "matcher": "",
      "hooks": [{
        "type": "command",
        "command": "npx --yes claude-util log"
      }]
    }]
  }
}

When a Claude Code session ends, the hook runs and:

  1. Reads the session transcript (JSONL file)
  2. Extracts metrics (tokens, tools, files, bash commands, etc.)
  3. Sends data to the configured server via POST /api/log

Metrics Tracked

  • Tokens: Input, output, cache read/write
  • Tools: Which tools were used and how many times
  • Files: Files read and modified
  • Bash: Commands run, including test/build/git analysis
  • Session: Duration, turn count, thinking characters
  • Skills: Which skills were invoked

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Link for local testing
npm link

# Test
npm test