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

@unturf/unfirehose

v1.0.6

Published

Core data layer for unfirehose — Claude Code session ingestion, SQLite schema, types, PII detection, and formatters

Readme

@unturf/unfirehose

Core data layer for unfirehose — a local-first observability dashboard for Claude Code.

Reads JSONL session logs from ~/.claude/, ~/.fetch/, and ~/.uncloseai/, normalizes them into SQLite, and provides types and utilities for building tools on top.

Install

npm install @unturf/unfirehose

Requires better-sqlite3 (included as dependency).

What's in the box

Database

import { initDb, runMigrations } from '@unturf/unfirehose/db/schema'
import { ingestAll } from '@unturf/unfirehose/db/ingest'

const db = initDb('~/.unfirehose/unfirehose.db')
runMigrations(db)
await ingestAll(db) // scans all harness directories, deduplicates, inserts

The schema normalizes three harness formats (Claude Code, Fetch, uncloseai) into a canonical structure:

projects -> sessions -> messages -> content_blocks
                                 -> usage_minutes (pre-aggregated)
                                 -> todos / todo_events
                                 -> alerts / alert_thresholds

Types

import type {
  SessionEntry, UserEntry, AssistantEntry,
  ContentBlock, TextBlock, ThinkingBlock, ToolUseBlock,
  TokenUsage, ProjectInfo, ProjectMetadata,
  StatsCache, DailyActivity, ModelUsageStats
} from '@unturf/unfirehose/types'

Path helpers

import { getProjectDirs, getSessionFiles } from '@unturf/unfirehose/claude-paths'
import { getFetchSessionDirs } from '@unturf/unfirehose/fetch-paths'
import { getUncloseaiSessionDirs } from '@unturf/unfirehose/uncloseai-paths'

JSONL streaming

import { streamJsonl, readJsonlLines } from '@unturf/unfirehose/jsonl-reader'

Formatting

import {
  formatTokens, formatBytes, formatCost,
  formatRelativeTime, formatDuration,
  gitRemoteToWebUrl
} from '@unturf/unfirehose/format'

PII detection

import { sanitizePII } from '@unturf/unfirehose/pii'

sanitizePII('Call me at 555-123-4567')
// "Call me at [PHONE:sha256...]"

Detects and hashes: credit cards, SSNs, phone numbers, emails, public IPv4 addresses.

UUIDv7

import { uuidv7 } from '@unturf/unfirehose/uuidv7'

uuidv7() // time-ordered, sortable UUID

Multi-tenant & auth

import { authenticateRequest } from '@unturf/unfirehose/auth'
import { TIERS } from '@unturf/unfirehose/tiers'

Exports

| Import path | Purpose | |---|---| | ./db/schema | Database initialization and migrations | | ./db/ingest | Full ingestion pipeline | | ./db/watcher | File system watcher for real-time ingestion | | ./db/control | Agent deployment control (tmux) | | ./db/api-keys | API key management | | ./db/tenant | Multi-tenant database support | | ./db/triage | Todo triage logic | | ./claude-paths | Path helpers for ~/.claude/ | | ./claude-paths-client | Client-safe path helpers | | ./fetch-paths | Path helpers for ~/.fetch/ | | ./uncloseai-paths | Path helpers for ~/.uncloseai/ | | ./uncloseai-adapter | Normalize uncloseai entries | | ./jsonl-reader | JSONL streaming utilities | | ./format | Token, byte, cost, time formatters | | ./types | TypeScript type definitions | | ./pii | PII detection and anonymization | | ./session-name | Human-readable session name generator | | ./uuidv7 | Time-ordered UUID generator | | ./mesh | Permacomputer mesh integration | | ./tiers | Subscription tier definitions | | ./auth | Request authentication | | ./rate-limit | Rate limiting | | ./apmonitor-adapter | Agent performance monitoring adapter |

Architecture

~/.claude/projects/**/*.jsonl ─┐
~/.fetch/sessions/**/*.jsonl ──┼─> ingestAll() ─> SQLite (WAL mode)
~/.uncloseai/sessions/*.jsonl ─┘        │
                                        ├─ projects
                                        ├─ sessions
                                        ├─ messages
                                        ├─ content_blocks
                                        ├─ usage_minutes
                                        ├─ todos
                                        └─ alerts

Part of the unfirehose monorepo

| Package | Description | |---|---| | @unturf/unfirehose | Core data layer (this package) | | @unturf/unfirehose-schema | unfirehose/1.0 spec — JSON Schema, TypeScript types, harness docs | | @unturf/unfirehose-router | CLI daemon — forwards JSONL to cloud | | @unturf/unfirehose-ui | Shared React components |

License

AGPL-3.0-only