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

@mrbilit/mrz-cli

v2.0.2

Published

CLI tool for MRZ scanning

Readme

@mrbilit/mrz-cli

Command-line tool that runs the full MRZ scanner pipeline over document images and writes the parsed fields as JSON. Installed as the mrz2json binary.

This package is part of mrbilit/mrz-scanner, a fork of alsenet-labs/mrz-scanner.

Installation

Install globally from npm:

npm install -g @mrbilit/mrz-cli

This installs the mrz2json command:

mrz2json --help

Build from source

From the repository root:

yarn install
yarn workspace @mrbilit/mrz-cli build

Run directly from the repository:

node packages/mrz-cli/dist/cli.js passport.jpg

Or link the local package globally:

cd packages/mrz-cli
npm link

The mrz2json command will then be available on $PATH.

Usage

mrz2json [options] <file...>

Options:
  -d, --dest-dir <path>   Output directory for JSON files (must exist, must be under cwd)
  -f, --format <type>     Output format: json (default) or text
  -c, --confidence        Include per-character confidence scores in the JSON
  -h, --help              Show help
  -v, --version           Show version

Examples

Write passport.jpg.mrz.json next to each input:

mrz2json a.jpg b.png c.jpeg

Collect every JSON file into out/:

mkdir -p out && mrz2json -d out *.jpg

Print the raw MRZ lines to stdout without writing a file:

mrz2json -f text passport.jpg

Include per-character confidence scores in the JSON:

mrz2json -c passport.jpg

Output

Output JSON contains the parsed fields flat at the top level (whatever the mrz package produces), plus:

  • _fixed: true when OCR-confusion corrections were applied.
  • _confidence: number[][] when -c was passed.

Security

  • Input files above 50 MB are rejected before decoding.
  • --dest-dir is resolved and forced to stay under the working directory; absolute paths that escape cwd are rejected, as are path-traversal components.
  • Output JSON files are written with mode 0600 (owner read/write only).
  • On parse failure, raw OCR text is not echoed to stderr because it can contain partial PII.

Exit codes

  • 0 — all files processed successfully.
  • 1 — one or more files failed. The CLI still attempts every remaining file and reports each failure on stderr.

License

This project is distributed under the GNU Affero General Public License, version 3 or later (AGPL-3.0-or-later).

The original project and source code are Copyright © 2018-2025 ALSENET SA.

See LICENSE for the full license text.