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 🙏

© 2025 – Pkg Stats / Ryan Hefner

reduceify

v1.0.1

Published

A powerful and interactive CLI tool to compress and convert images (JPEG, PNG, WebP, AVIF) recursively, preserving folder structure.

Readme

Reduceify

npm version License: MIT

A powerful and interactive command-line interface (CLI) tool brought to you by Kolibri Web Designs. Reduceify helps you optimize your website's performance by compressing and converting images (JPEG, PNG, WebP, AVIF) recursively while preserving your original folder structure.

Say goodbye to manual image optimization and hello to faster page loads!

✨ Features

  • Recursive Processing: Automatically scans and processes images within all subfolders, maintaining the exact directory structure in the output.
  • Multiple Output Formats: Convert images to modern, highly-optimized formats like WebP or AVIF, or simply compress them in their original format.
  • Interactive Prompts: User-friendly command-line interface to choose input/output directories and compression quality.
  • Smart Compression: Leverages sharp for high-performance image processing.
  • Bun.js Optimized: Built with Bun for blazing-fast execution.
  • Detailed Output: Provides real-time feedback on compression progress and file size reduction.

🚀 Installation & Usage

Prerequisites

  • Node.js (v18 or higher recommended)
  • Bun (Optional, but recommended for faster execution)

Global Installation (Recommended for frequent use)

To use reduceify as a global command from any directory:

  1. Make sure you have bun installed.
  2. Open your terminal and run:
    bun install -g reduceify
  3. You can now run reduceify from any project folder:
    reduceify

Using with npx (No global installation needed)

If you prefer not to install globally, you can use npx to run it directly:

npx reduceify

npx will download and execute the latest version of reduceify on demand.

Running the Tool

Once installed (or via npx), simply navigate to your project directory in the terminal and run:

reduceify

You will then be guided by interactive prompts:

  1. Enter the input directory: Specify the folder containing your images (e.g., public/images, assets). Relative to your current terminal location.
  2. Enter the output directory: Choose where the processed images should be saved (e.g., public/compressed-images).
  3. Choose the output format: Select original (for compression only), webp, or avif.
  4. Enter the image quality (1-100): Define the compression level.

The tool will then scan for images, process them, and output them to the specified directory while maintaining your original folder structure.

⚠️ Important Notes

  • Existing AVIF/WebP input: The tool will also detect and re-process existing .avif or .webp files in your input directory. If you choose "original" output format, they will be compressed/copied as their original type. If you choose "webp" or "avif" output, they will be converted to the chosen format (even if already that format) and re-compressed.
  • GIF & TIFF Handling: These formats are copied to the output directory without additional compression unless converted to WebP or AVIF, as sharp has limited specific compression options for them.
  • Error Handling: The script includes basic error handling for file operations.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by Aayan