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

@image-marker/cli

v0.1.0

Published

Automation-friendly Image Marker CLI for Recipe v2 and Node rendering

Readme

@image-marker/cli

Automation-friendly command-line interface for Image Marker Recipe v2. It uses @image-marker/node and Sharp, so it runs without React or React Native.

npm install --global @image-marker/cli
image-marker --help

Node.js 20.19 or newer is required.

Start a Recipe

image-marker init
image-marker validate --recipe image-marker.recipe.json

init creates a small, editable Recipe v2 document. Outputs are never replaced unless --force is passed.

Render one image

image-marker render \
  --recipe image-marker.recipe.json \
  --input photo.jpg \
  --output marked.webp \
  --format webp \
  --quality 86 \
  --var recipient=Alice

Image layers with relative file paths are resolved relative to the Recipe file. Template variables are typed automatically: true and false become booleans, finite numeric strings become numbers, and other values remain strings.

Use - for one stdin input or for binary stdout:

cat photo.jpg |
  image-marker render -r recipe.json -i - -o - --quiet > marked.png

Recipe JSON and image bytes cannot both use stdin. Binary stdout cannot be combined with --json.

Batch rendering

image-marker batch \
  --recipe recipe.json \
  --output-dir dist \
  --concurrency 4 \
  --retries 2 \
  --retry-delay 100 \
  photo-1.jpg photo-2.jpg

Inputs can also be repeated with --input or read from a newline-delimited --input-list. Empty lines and lines beginning with # are ignored. Results preserve input order. The command exits 1 when any item fails.

Inspect images

image-marker inspect photo.jpg logo.png

Inspect always prints JSON with encoded/display dimensions, format, EXIF orientation, alpha, channels, and density.

Validate and migrate Recipe documents

image-marker validate --recipe recipe-v2.json --json
image-marker migrate --recipe recipe-v1.json --output recipe-v2.json

validate intentionally rejects v1 documents. migrate accepts supported legacy documents and writes canonical Recipe v2 JSON.

Invisible locator

Keys are read from an environment variable, not a command-line argument, to keep them out of shell history:

export IMAGE_MARKER_TRACE_KEY='replace-with-at-least-16-secret-bytes'

image-marker embed \
  --input source.png \
  --output traced.png \
  --payload asset-42

image-marker detect --input traced.png

Use --key-env MY_SECRET_NAME to select another variable. This authenticated lsb-hmac-v1 locator requires lossless PNG pixels. JPEG conversion, resizing, or destructive optimization can remove it.

Automation contract

  • --json prints machine-readable result metadata for commands that otherwise report human progress.
  • --quiet suppresses progress messages.
  • File writes use a temporary sibling and atomic rename.
  • Existing outputs require --force.
  • SIGINT and SIGTERM cancel active rendering.
  • Exit codes: 0 success, 1 rendering/runtime failure, 2 usage error, 3 locator not detected, and 130 interrupted.

The package also exports runImageMarkerCli() and executeCliCommand() for programmatic wrappers and tests.