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

@emzett-digital/mz-toolkit

v1.2.0

Published

Handy CLI toolkit: password generator, hashing, encryption/decryption, QR codes, unit converter, Base64, JSON formatter, timer, and todo list.

Readme

mz-toolkit 🧰

A handy command-line toolkit with everyday utilities — fully offline, no API keys required.

Installation

Install via npm:

npm install -g @emzett-digital/mz-toolkit

Help

Use --help or -h to see the available commands and options. If a command is used incorrectly, mz prints the error and automatically shows the relevant help.

mz --help
mz image crop --help
mz image crop photo.png

Commands

🔐 Password generator

mz pw                     # Default: 16 characters
mz pw -l 24               # Length 24
mz pw -c 5                # Generate 5 passwords at once
mz pw --no-symbols        # Without special characters

#️⃣ Hash

Creates a hash digest (one-way — not reversible).

mz hash "MyPassword" SHA-256
mz hash "MyPassword" MD5
mz hash "MyPassword"              # Default: SHA-256

Available algorithms: mz algos

🔎 Dehash

Attempts to reverse a hash via dictionary lookup (only works if the plaintext is in the list — hashing is fundamentally not directly reversible).

mz dehash <hash> SHA-256
mz dehash <hash> SHA-256 --wordlist my-list.txt

🔒 Encrypt

Encrypts text symmetrically (reversible with a password).

mz encrypt "Secret text" AES-256          # Password is auto-generated
mz encrypt "Secret text" AES-256 -p my-password
mz encrypt "Secret text"                  # Default: AES-256-GCM

🔓 Decrypt

mz decrypt "<token>" -p my-password

📋 List algorithms

mz algos

📱 QR code

mz qr "https://example.com"
mz qr "Hello World" --small
mz qr "https://example.com" --output example.png --format png

Read a QR code from a local image file or a direct image URL:

mz qr-read my-qr.png
mz qr-read "https://example.com/qr-code.jpg"
mz qr-read my-qr.png --json

The decoder prints the URL or text stored in the QR code. qr-decode is an alias for qr-read. Remote images are limited to 100 MB and only HTTP(S) URLs are accepted.

For local files, --file can be used explicitly. If no source or --file is provided, mz opens a native file picker with single-file selection:

mz qr-read --file my-qr.png
mz qr-read
mz image convert --file photo.png --output photo.webp --lossless
mz image crop --resolution 1920x1080 --output wallpaper.png

The picker uses Windows File Explorer dialogs, zenity/kdialog on Linux, and the macOS file chooser. A source argument and --file cannot be used together.

🖼️ Image tools

Convert an image selected from your own files, or download an image from a direct http:// or https:// URL. The output format is inferred from the destination extension unless --format is provided.

# Local file to lossless WebP
mz image convert photo.png --output photo.webp --lossless

# Local file to JPEG with quality 95
mz image convert photo.tiff --output photo.jpg --quality 95

# Download and convert a direct image URL
mz image download "https://example.com/image.png" --output image.webp --lossless

# Convert a URL directly without a separate download step
mz image convert "https://example.com/image.png" --output image.tiff --lossless

# Crop to an exact resolution; upscales proportionally first when necessary
mz image crop photo.png --resolution 1920x1080 --output wallpaper.webp --lossless

# Choose which part remains when the aspect ratios differ
mz image crop photo.png --resolution 800x800 --position north --output avatar.png

Options:

  • --output <file>: Destination path; required for both commands.
  • --format <format>: Explicit output format; otherwise inferred from the file extension.
  • --lossless: Enables lossless encoding where the target format supports it.
  • --quality <number>: Quality for formats that support quality settings, from 1 to 100.
  • --resolution <width>x<height>: Exact crop size; required by image crop.
  • --position <position>: Crop anchor (centre, north, south, east, or west).

Cropping never stretches an image. If the requested resolution is larger than the source, the image is proportionally upscaled with Sharp's Lanczos resampling and then cropped to the exact target size. Upscaling cannot restore detail that was not present in the original image, but it avoids distortion and uses the best available resampling quality.

Supported formats depend on the installed sharp/libvips build and include PNG, JPEG/JPG, WebP, AVIF, GIF, TIFF, JP2, JXL, HEIF, and HEIC. JPEG/JPG cannot be lossless; use PNG, TIFF, WebP, AVIF, or JXL when lossless output is required. Website downloads follow redirects, accept files up to 100 MB, and only allow HTTP(S) URLs.

📏 Unit converter

mz convert 100 km mi
mz convert 20 c f
mz convert 5 kg lb

Supports: length (mm, cm, m, km, in, ft, yd, mi), weight (mg, g, kg, t, oz, lb), temperature (c, f, k)

🔤 Base64

mz b64 encode "Hello World"
mz b64 decode "SGVsbG8gV29ybGQ="

📄 Format/validate JSON

mz json data.json
mz json data.json --write   # Write formatted result back to file

⏱️ Timer

mz timer 25 --label "Pomodoro"
mz timer 0.5              # 30 seconds

✅ To-do list

mz todo add Buy groceries
mz todo list
mz todo done 1
mz todo remove 1

🔌 Port scanner and port management

Scan local ports, list open ones, and close or block ports.

mz ports scan 127.0.0.1 1 1024
mz ports status localhost 1 1024
mz ports close 3000 tcp
mz ports block 8080 tcp
mz ports unblock 8080 tcp

Features:

  • scan a host/port range for open ports
  • show currently open local ports
  • close the process behind a port
  • block or unblock a port via the Windows firewall

Note: firewall blocking is currently implemented for Windows systems.

🕵️ Network sniffer

Listen for incoming traffic on a local TCP port and print connection payloads.

mz sniffer 3000 --host 127.0.0.1
mz sniffer 8080 --host 0.0.0.0 --max-connections 5
mz sniffer 9000 --raw

Use this for local debugging of services that accept plain TCP connections.