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

bxl

v1.9.4

Published

CLI toolkit

Downloads

258

Readme

bxl

CLI toolkit for various development related tasks.

Installation

npm install -g bxl

Or for development:

npm install
npm link

Usage

Transform Files

Transforms files from one format to another.

bxl transform [input] to [output] [options]

Arguments:

  • input - Input directory or file (default: current directory)

Options:

  • -o, --output <dir> - Output directory (default: ".")
  • -q, --quality <number> - Quality 0-100 (default: "100")

Examples:

# Convert all images in current directory
bxl transform . to webp

# Convert images from a specific directory
bxl transform ./images to webp

# Convert a single image
bxl transform image.png to webp

# Convert a PDF to multiple WebP images (one per page)
bxl transform document.pdf to webp

# Specify output directory and quality
bxl transform ./images to webp -o ./webp-images -q 90

# Convert PDF with custom quality and output directory
bxl transform presentation.pdf to webp -o ./slides -q 85

Generate Files

Generate placeholder images with specific dimensions based on the filename pattern:

bxl generate <filename>

Arguments:

  • filename - Filename with dimensions in the format name_{width}x{height}.ext

Supported formats:

  • PNG (.png)
  • JPEG (.jpg, .jpeg)
  • WebP (.webp)

Examples:

# Generate a 300x200 PNG placeholder image
bxl generate placeholder_300x200.png

# Generate a 400x300 JPEG placeholder image
bxl generate banner_400x300.jpg

# Generate a 150x150 WebP square image
bxl generate avatar_150x150.webp

# Generate multiple placeholder images
bxl generate hero_1920x1080.png
bxl generate thumbnail_200x200.webp
bxl generate logo_500x200.png

Aliases:

  • bxl gen <filename>
  • bxl g <filename>

The generated images are placeholder graphics with a light gray background that display their dimensions as text in the center. This is useful for creating mockup images during development or testing when you need images of specific sizes.

Fetch Files

Download a file from a URL to the current directory:

bxl fetch <url>

Arguments:

  • url - URL of the file to download

Options:

  • -o, --output <filename> - Custom output filename

Examples:

# Download a file from a URL (filename will be derived from URL)
bxl fetch "https://example.com/image.jpg"

# Download a file with a custom filename
bxl fetch "https://example.com/image.jpg" -o myimage.jpg

# Download any file type
bxl fetch "https://example.com/document.pdf" -o document.pdf

The command automatically determines the filename from the URL if not specified. If the URL doesn't contain a filename, a default name will be used.

Remove Files

Remove files matching a pattern in the current directory:

bxl remove <pattern>

Arguments:

  • pattern - File pattern to match (e.g., ".png", "test.txt")

Examples:

# Remove all PNG files in current directory
bxl remove "*.png"

# Remove all JPG files
bxl remove "*.jpg"

# Remove files starting with 'test' and ending with .txt
bxl remove "test*.txt"

Rename Files

Rename files in the current directory using a pattern:

bxl rename to <pattern>

Arguments:

  • pattern - Naming pattern with placeholders:
    • {index} - Sequential numbering
    • {width} - Image width in pixels (images only)
    • {height} - Image height in pixels (images only)

Examples:

# Rename all files to model_1, model_2, model_3 (preserving extensions)
bxl rename . to "model_{index}"

# Rename all files to image_1.jpg, image_2.jpg, etc. (with specific extension)
bxl rename . to "image_{index}.jpg"

# Rename files to document_1, document_2, etc.
bxl rename . to "document_{index}"

# Rename images with dimensions: model_1_100x200.png, model_2_300x150.png, etc.
bxl rename . to "model_{index}_{width}x{height}"

# Rename images with only dimensions: photo_800x600.png, photo_1920x1080.jpg, etc.
bxl rename . to "photo_{width}x{height}"

Files are renamed in alphabetical order. If the pattern doesn't include an extension, the original file extensions are preserved.

Note: When using {width} or {height} placeholders, only image files will be renamed. Non-image files will be skipped with a warning message.

Unique Files

Remove duplicate files in the current directory using file content hashing.

bxl unique

Behavior:

  • Scans all files in the current working directory.
  • Uses an MD5 hash of file contents to detect duplicates.
  • Removes duplicate files, leaving a single copy of each unique file.
  • Prints a message for each removed duplicate (e.g., Removed duplicate file: filename).

Examples:

# Remove duplicate files in the current directory
bxl unique

# Use in a specific directory
cd ./downloads && bxl unique

Supported Image Formats

The tool supports conversion from the following formats:

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • GIF (.gif)
  • TIFF (.tiff, .tif)
  • BMP (.bmp)
  • SVG (.svg)
  • WebP (.webp)
  • PDF (.pdf) - converts each page to a separate image

License

MIT