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

observeos

v0.1.0

Published

TypeScript-native LLM observability. Trace OpenAI, Anthropic, Ollama, Hugging Face with zero config.

Readme

observeos

Zero-config LLM observability SDK. Automatically trace your OpenAI, Anthropic, Ollama, and Hugging Face API calls. Calculate costs, measure latency, detect errors.

Features

  • Zero-config drop-in wrappers for OpenAI, Anthropic, Ollama, Hugging Face
  • Automatic token cost calculation
  • Batch trace export (non-blocking)
  • Optional OpenTelemetry export
  • PII scrubbing (optional)
  • TypeScript-first (strict mode)
  • Minimal overhead (< 1ms per call)

Installation

npm install observeos

Quick Start

import OpenAI from 'openai'
import { createObserveOS } from 'observeos'

// Initialize once at app startup
const obs = createObserveOS({
  apiKey: process.env.OBSERVEOS_API_KEY!,
  baseUrl: process.env.OBSERVEOS_BASE_URL!,
  tenantId: 'my_org',
})

// Wrap your clients — drop-in replacements
const openai = obs.wrapOpenAI(new OpenAI())

// Use exactly as before — tracing is automatic
const response = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Every call is now traced and sent to your observability backend automatically.

Configuration

createObserveOS({
  apiKey: string,                  // required: your API key
  baseUrl: string,                 // optional: worker URL (default: http://localhost:8787)
  tenantId: string,                // optional: tenant identifier (default: 'default')
  environment: 'production',       // optional: environment name
  enabled: true,                   // optional: disable tracing without code changes
  sampleRate: 1,                   // optional: trace 100% of calls (0-1)
  capturePromptPreview: true,      // optional: capture first 200 chars of prompt
  captureResponsePreview: true,    // optional: capture first 200 chars of response
  piiScrubbing: false,             // optional: mask PII before sending
  flushInterval: 5000,             // optional: ms between batch flushes
  maxBatchSize: 50,                // optional: traces per batch
  otelEndpoint: undefined,         // optional: OTEL collector endpoint
  debug: false,                    // optional: log SDK activity
})

Supported Providers

OpenAI

import OpenAI from 'openai'
const openai = obs.wrapOpenAI(new OpenAI())

Anthropic

import Anthropic from '@anthropic-ai/sdk'
const anthropic = obs.wrapAnthropic(new Anthropic())

Ollama

const fetchWithTracing = obs.wrapOllama(fetch)
const response = await fetchWithTracing('http://localhost:11434/api/chat', {
  method: 'POST',
  body: JSON.stringify({ model: 'llama3', messages: [] }),
})

Hugging Face

import { HfInference } from '@huggingface/inference'
const hf = obs.wrapHuggingFace(new HfInference())

Graceful Shutdown

Flush pending traces before exiting:

process.on('SIGTERM', async () => {
  await obs.tracer.shutdown()
  process.exit(0)
})

Pricing

Cost is calculated automatically using current provider pricing. See MODEL_PRICING for details.

License

MIT