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

@hash-stream/cli

v1.6.0

Published

The CLI to use hash-stream building blocks

Readme

Getting started

Install the CLI from npm (requires Node 20 or higher):

npm install -g @hash-stream/cli

Usage

There are a few Usage guides provided in this repository:

Commands


hash-stream pack write <filePath>

Writes the given file blob into a set of verifiable packs, stores them, and optionally indexes them.

Examples:

hash-stream pack write some-file.ext -iw multiple-level
hash-stream pack write some-file.ext -iw single-level

Options:

  • -f, --format Specifies the pack format (default: "car" for Content Addressable aRchives).
  • -ps, --pack-size Defines the maximum pack size in bytes (default: MAX_PACK_SIZE).
  • -iw, --index-writer Specifies the indexing writer implementation, which can be "single-level", "multiple-level", "none" or "all" (default: "multiple-level").
  • -sb, --store-backend Selects the pack storage backend to use (fs or s3).

hash-stream pack extract <targetCid> [filePath]

Extracts Packs from the store and writes them to a file in the given path.

Examples:

hash-stream pack extract bafk... some-file.car

Options:

  • -f, --format Specifies the pack format (default: "car" for Content Addressable aRchives).
  • -sb, --store-backend Selects the pack storage backend to use (fs or s3).

hash-stream pack clear

Clear all packs stored.

Examples:

hash-stream pack clear

hash-stream index add <packCid> <filePath> [containingCid]

Add Index record for the given verifiable pack using the specified index writer.

Examples:

hash-stream index add bag... pack.car bafy... -iw multiple-level
hash-stream index add bag... pack.car -iw single-level

Options:

  • -iw, --index-writer Indexing writer implementation: "single-level" or "multiple-level" or "all" (default: multiple-level)
  • -f, --format Specifies the pack format (default: "car" for Content Addressable aRchives).
  • -sb, --store-backend Selects the storage backend to use (fs or s3).

index find records <targetCid> [containingCid]

Find index records of a given blob/pack/containing by its CID, written using a specified index writer.

Examples:

hash-stream index find records bafk...
hash-stream index find records bafk... bafy...

Options:

  • -sb, --store-backend Selects the storage backend to use (fs or s3).

hash-stream index clear

Clear all index records stored.

Examples:

hash-stream index clear

hash-stream streamer dump <targetCid> <filePath> [containingCid]

Dump the blob data associated with the given target CID from stored Packs based on the known index records. The data is extracted and written to the specified file path in the selected Pack format.

Examples:

hash-stream streamer dump bafy... /usr/dumps/baf...car

Options:

  • -f, --format Specifies the pack format to use: "car" or "raw" (default: "car").
  • -sb, --store-backend Selects the storage backend to use (fs or s3).

Global Options

Some options are available for all commands:

-v, --verbose

Prints extra information about what the CLI is doing behind the scenes. Useful for debugging or better understanding internal operations.

Examples:

hash-stream pack write some-file.ext --verbose

By default, verbose output is disabled.

Store Backend Configuration

hash-stream supports two types of storage backends for storing and retrieving Packs and Indexes:

  • fs (default): local filesystem-based storage
  • s3: S3-like remote storage

You can configure the backend either via CLI flags or environment variables.

Choosing a Store Backend

You can set the backend using the --store-backend flag on commands that support it:

pack write file.ext --store-backend fs     # use filesystem (default)
pack write file.ext --store-backend s3     # use S3-like remote storage

Or by setting the environment variable globally:

export HASH_STREAM_STORE_BACKEND=s3

If both are provided, the CLI flag takes precedence.

See STORE_BACKEND_USAGE for usage help.

FAQ

Where is my configuration and indexes stored?

In the system default user config directory:

  • macOS: ~/Library/Preferences/hash-stream
  • Windows: %APPDATA%\hash-stream\Config (for example, C:\Users\USERNAME\AppData\Roaming\hash-stream\Config)
  • Linux: ~/.config/hash-stream (or $XDG_CONFIG_HOME/hash-stream)

Contributing

Feel free to join in. All welcome. Please open an issue!

License

Dual-licensed under MIT + Apache 2.0