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

@khanacademy/format-claude-stream

v0.1.2

Published

Formats output from `claude --output-format stream-json` as human-readable text

Downloads

564

Readme

format-claude-stream

[!NOTE] format-claude-stream is not accepting contributions. We’re releasing the code for others to refer to and learn from, but we are not open to pull requests or issues at this time.

Khan Academy is a non-profit organization with a mission to provide a free, world-class education to anyone, anywhere. You can help us in that mission by donating or looking at career opportunities.

Summary

A CLI filter to turn Claude's streaming JSON output into human-readable text.

In addition to the usual Claude output, format-claude-stream prints:

  • Chain-of-thought
  • All tool calls, and their results, in an easy-to-read format
  • Tool call errors
  • A raw JSON dump of any events it doesn't understand.

Output is color-coded to make it easier to scan.

With format-claude-stream, you can print the live stream or dump the JSON to a file and audit it later. With tee (see below), you can do both!

Installation

npm install -g @khanacademy/format-claude-stream

Usage

CLI

claude --print --verbose --output-format stream-json | format-claude-stream

You can use tee to duplicate the output to a timestamped file:

claude --print --verbose --output-format stream-json \
  | tee "claude-$(date +'%Y-%m-%d_%H%M%S').jsonl" \
  | format-claude-stream

Library

import {ClaudeStreamFormatter, StandardOutput, ChalkColorizer} from "@khanacademy/format-claude-stream";

const claudeStreamFormatter = new ClaudeStreamFormatter(
    new StandardOutput(),
    new ChalkColorizer(),
);

await claudeStreamFormatter.write(JSON.parse(streamLine));

Development

Requirements:

node >= 20.20.0
pnpm >= 10.26.0

Everyday commands:

pnpm install  # install dependencies (one-time setup)
pnpm test     # run unit tests
pnpm tsc -w   # watch for type errors
pnpm verify   # run all checks
pnpm fix      # fix formatting

Releasing

Releases are managed via changesets.

The workflow is:

  • Each feature PR must include a changeset file, generated by running pnpm changeset, describing what is in that change and whether a major, minor, or patch version bump is required.
  • A GitHub workflow watches the main branch and updates a "Version Packages" PR whenever a feature PR is landed.
  • When the "Version Packages" PR is landed, a GitHub workflow updates the package version and changelog based on outstanding changesets, builds a new version of the package, and publishes it to NPM.

Merging the "Version Packages" PR is a manual action (you can use git land for this). The package is built and released automatically when the "Version Packages" PR is merged.