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

@logsesh/core

v0.2.1

Published

Parse and normalize AI coding agent session logs

Readme

@logsesh/core

Parser, normalization, search, export-safety, and cost-estimation library behind logsesh.

Use it when you want to build your own local workflows on top of Claude Code, Codex, or Gemini CLI session logs.

Install

npm install @logsesh/core

Requires Node.js >=22.

Use

import { runPipeline, sanitizeForExport } from "@logsesh/core";

for await (const { session, warnings } of runPipeline({ toolFilter: ["codex"] })) {
  for (const warning of warnings) console.warn(warning.message);
  if (!session) continue;

  const safeSession = sanitizeForExport(session);
  console.log(safeSession);
}

Main Exports

| export | purpose | | --- | --- | | runPipeline | discover and parse sessions | | parseFile | parse one known log file | | sanitizeForExport | remove raw paths and reasoning by default | | searchSession | search a normalized session | | StatsAggregator | aggregate session stats | | estimateSessionCost | add labeled pricing estimates with confidence | | runDoctor | inspect adapter, discovery, export defaults, and pricing data |

Published Data

import sessionSchema from "@logsesh/core/schemas/session.json" with { type: "json" };
import models from "@logsesh/core/pricing/models.json" with { type: "json" };

Schemas are available under @logsesh/core/schemas/*. Pricing data is available under @logsesh/core/pricing/*.

Cost estimates are exact only when a parsed session includes a known priced model. Historical and uncertain model rows are preserved with confidence metadata so callers can explain where estimates came from.

Safety Defaults

sanitizeForExport removes reasoning blocks and raw source paths unless you explicitly request them.

const safe = sanitizeForExport(session);
const withReasoning = sanitizeForExport(session, { includeReasoning: true });
const withRawPaths = sanitizeForExport(session, { rawPaths: true });

Compatibility

Normalized sessions use the logsesh.session.v1 schema version.

logsesh.stats.v1 gained additive fields in v0.2.0:

  • dailyBurn — chronological per-day session/turn/token totals (no gap-filling)
  • tokenBreakdown — per-category token sums with observed field-presence flags and observedSessionCount

Existing JSON fields and semantics are unchanged.

License

MIT