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

@logspine/sdk-ts

v0.2.0

Published

Drop-in observability SDK for AI agents (TypeScript / Node / Edge). The Helicone replacement built for solo devs and small teams.

Downloads

83

Readme

@logspine/sdk-ts

Drop-in observability SDK for AI agents. TypeScript / Node / Edge. Auto-instruments OpenAI and Anthropic.

Python SDK: pip install logspinesee Python docs

npm MIT License

The Helicone replacement built for solo devs and small teams. One line of code, zero infrastructure, pricing that doesn't punish growth — start at $19/mo for 100k spans.

logspine.dev · Full docs · Quickstart · Data model

Install

pnpm add @logspine/sdk-ts
# or: npm install @logspine/sdk-ts
# or: yarn add @logspine/sdk-ts

Quick start

import { Logspine } from '@logspine/sdk-ts';

Logspine.init({
  apiKey: process.env.LOGSPINE_API_KEY!,
});

const trace_id = Logspine.trace({
  name: 'support-bot',
  input: { user_question: 'How do refunds work?' },
});

Logspine.span({
  trace_id,
  name: 'retrieve-docs',
  output: { hits: 4 },
});

// Before process exit:
await Logspine.shutdown();

Get your API key at logspine.dev → Settings → API Keys.

Auto-instrumentation

Wrap your existing client and every call is tracked automatically — with real latency, token counts, and cost in USD (computed from per-model pricing tables, updated quarterly).

OpenAI

import OpenAI from 'openai';
import { Logspine } from '@logspine/sdk-ts';
import { instrumentOpenAI } from '@logspine/sdk-ts/openai';

Logspine.init({ apiKey: process.env.LOGSPINE_API_KEY! });
const openai = instrumentOpenAI(new OpenAI());

// Now every call emits a trace:
const res = await openai.chat.completions.create({
  model: 'gpt-4o-mini',
  messages: [{ role: 'user', content: 'hi' }],
});

Supports:

  • chat.completions.create (sync + streaming)
  • embeddings.create
  • Prompt caching (cached tokens billed at the cached rate automatically)

Anthropic

import Anthropic from '@anthropic-ai/sdk';
import { Logspine } from '@logspine/sdk-ts';
import { instrumentAnthropic } from '@logspine/sdk-ts/anthropic';

Logspine.init({ apiKey: process.env.LOGSPINE_API_KEY! });
const anthropic = instrumentAnthropic(new Anthropic());

Supports:

  • messages.create (sync + streaming)
  • Cache reads (cache_read_input_tokens billed at 10% of input rate)

API

| Method | Description | | --- | --- | | Logspine.init(opts) | Initialize. Required: apiKey. Optional: endpoint, flushIntervalMs (default 2000), maxBatch (default 100), projectId, disabled, onError. | | Logspine.trace({ name, input, output, model, prompt_tokens, completion_tokens, cost_usd, start_ts, end_ts, status, error, metadata }) | Create top-level trace. Returns trace_id. | | Logspine.span({ trace_id, name, ... }) | Child span inside a trace. | | Logspine.flush() | Force-flush the queue. | | Logspine.shutdown() | Stop timer + flush. Call before process exit. |

Spans are batched automatically: every 2 seconds, or when the queue hits 100 spans.

Full method reference, options table, and runtime support matrix: /docs/sdk/typescript.

Pricing table

@logspine/sdk-ts ships a model→price table covering:

  • OpenAI: GPT-4o, GPT-4o-mini, GPT-4.1, GPT-4, GPT-3.5, o1, o1-mini, o3, o3-mini, text-embedding-3 (small/large), text-embedding-ada-002
  • Anthropic: Claude 4 (opus/sonnet/haiku), Claude 3.5 (sonnet/haiku), Claude 3 (opus/sonnet/haiku), Claude 2

If a model isn't recognized (new release, fine-tuned variant), cost_usd will be 0 and a warning is not logged — the trace still goes through.

Prices are updated each quarter. Source: pricing.ts.

Edge / serverless runtimes

Works on:

  • Node 18+
  • Cloudflare Workers (nodejs_compat not required)
  • Vercel Edge Functions
  • Deno (via npm: specifier)
  • Bun

The SDK uses fetch() and crypto.subtle — no native Node dependencies.

License

MIT © Adam Kallen — see LICENSE.