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

file-hash-cli

v1.0.0

Published

Calculate file hashes (MD5, SHA1, SHA256, SHA512) from the command line

Readme

file-hash-cli

Fast CLI tool to compute and verify file checksums from the terminal.
Supports MD5, SHA1, SHA256, SHA512 — with glob expansion, recursive directories, base64 output, and JSON output.

Installation

npm install -g file-hash-cli

Commands

hash — compute hashes

# SHA256 (default), single file
file-hash-cli hash myfile.zip

# Specific algorithm
file-hash-cli hash myfile.zip --algo md5

# All algorithms at once
file-hash-cli hash myfile.zip --all-algos

# Base64 output instead of hex
file-hash-cli hash myfile.zip --format base64

# Multiple files via glob
file-hash-cli hash "src/**/*.ts"

# Recursive directory
file-hash-cli hash ./my-folder --recursive

# JSON output
file-hash-cli hash myfile.zip --all-algos --json

verify — check against an expected hash

file-hash-cli verify myfile.zip abc123deadbeef...
file-hash-cli verify myfile.zip abc123deadbeef... --algo md5
file-hash-cli verify myfile.zip LVJUjBj... --format base64
file-hash-cli verify myfile.zip abc123... --json

Exit code 0 = match, 1 = mismatch.

compare — diff two files

file-hash-cli compare file1.zip file2.zip
file-hash-cli compare file1.zip file2.zip --all-algos
file-hash-cli compare file1.zip file2.zip --json

Exit code 0 = identical, 1 = different.

Options (shared across commands)

| Option | Description | |---|---| | -a, --algo <alg> | Algorithm: md5 sha1 sha256 sha512 (default: sha256) | | -A, --all-algos | Run all four algorithms | | -f, --format <fmt> | Output encoding: hex (default) or base64 | | -r, --recursive | Recurse into directories (hash command) | | -j, --json | Machine-readable JSON output | | -V, --version | Show version | | -h, --help | Show help |

Features

  • Streaming reads — handles arbitrarily large files without loading into memory
  • Progress bar on stderr for files > 10 MB
  • Glob expansion via fast-glob
  • Recursive directory hashing (--recursive)
  • hex and base64 output formats
  • JSON output for scripting and pipelines
  • Verify exit codes for use in shell scripts

License

MIT