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

opencheese-session-uuid

v1.0.0

Published

OpenCode plugin for OpenCheese — automatically injects OpenCheese-Session-UUID header for session tracking

Readme

opencheese-session-uuid

OpenCode plugin for OpenCheese — automatically injects the OpenCheese-Session-UUID header into LLM requests so OpenCheese can track session billing, cache accounting, and analytics.

Setup

1. Add to your opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencheese-session-uuid"]
}

2. Restart OpenCode.

That's it. OpenCode will auto-install the plugin from npm on startup.

What it does

  • Listens for the active OpenCode session ID.
  • Derives a deterministic UUID from the session ID using SHA-256.
  • Injects it as the OpenCheese-Session-UUID HTTP header on every LLM request.
  • OpenCheese uses this header for per-session billing, token accounting, and usage analytics.

Backend Integration

When OpenCode sends a prompt, it makes a standard HTTP POST request to the baseURL configured for the provider. The request looks like a standard OpenAI, Anthropic, or Google Gemini chat completions payload, but with your custom header attached.

Here is an example of what the raw HTTP request looks like arriving at your gateway:

POST /v1/chat/completions HTTP/1.1
Host: localhost:8787
Authorization: Bearer <your-api-key>
Content-Type: application/json
OpenCheese-Session-UUID: 25ab54ac-944e-4103-97cb-48f82ef8c7c9

{
  "model": "opencode-go/deepseek-v4-pro",
  "messages": [
    {"role": "system", "content": "You are a coding assistant..."},
    {"role": "user", "content": "Write a python script..."}
  ],
  "temperature": 0.2
}

Reading the header in Node.js (Fastify/Express)

Because HTTP headers are case-insensitive, most web frameworks automatically convert them to lowercase. You can read the injected header like this:

Fastify / Express:

const sessionUuid = request.headers["opencheese-session-uuid"];
if (!sessionUuid) {
    throw new Error("Missing OpenCheese session tracking UUID");
}
console.log("Tracking session:", sessionUuid);

Standard Node http or Next.js API Routes:

const sessionUuid = req.headers.get("opencheese-session-uuid");

Requirements

License

MIT