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

sharpy-cli-tool

v1.0.1

Published

CLI para convertir imágenes usando Sharp

Readme

🖼️ Sharpy

Conversor de Imágenes CLI en Node.js

Convierte imágenes entre formatos modernos de manera sencilla, rápida y eficiente.

My Skills


✨ Características

  • 🚀 Conversión masiva de imágenes por carpeta y subcarpetas
  • 🎨 Múltiples formatos: JPEG, PNG, WebP, AVIF, TIFF
  • ⚙️ Control de calidad ajustable para formatos con compresión
  • 🔄 Sobrescritura opcional de archivos existentes
  • 🗑️ Limpieza automática de archivos originales
  • 💻 Interfaz CLI simple y amigable

📦 Instalación

Opción 1: Desde npm (Recomendado)

# Instalación global desde npm
npm install -g sharpy-cli-tool

# Usar directamente
sharpy webp

Opción 2: Desde el código fuente

# Clonar el repositorio
git clone https://github.com/codegeekery/sharpy-tool.git
cd sharpy-tool

# Instalar dependencias
npm install

# (Opcional) Instalación global desde local
npm link

🎯 Uso Básico

sharpy <formato> [opciones]

Formatos Disponibles

jpeg · jpg · png · webp · avif · tiff


💡 Ejemplos Prácticos

# Conversión simple a WebP
sharpy webp

# AVIF con calidad específica, recursivo y eliminando originales
sharpy avif -q 70 -r --rm

# JPEG de alta calidad en carpeta específica, forzando sobrescritura
sharpy jpeg --dir ./fotos -f -q 85

# PNG recursivo sin eliminar originales
sharpy png -r --dir ./imagenes

⚙️ Opciones

| Opción | Alias | Descripción | |--------|-------|-------------| | --dir <ruta> | | Especifica la carpeta a procesar (por defecto: carpeta actual) | | --recursive | -r | Procesa imágenes en subcarpetas | | --quality <n> | -q | Ajusta la calidad (0-100) para formatos con compresión | | --force | -f | Sobrescribe archivos de destino existentes | | --remove-original | --rm | Elimina el archivo original tras conversión exitosa | | --help | -h | Muestra la ayuda del comando |


📚 Casos de Uso

🎨 Optimización para Web

sharpy webp --dir ./assets/images -r -q 85

📸 Conversión de Fotografías

sharpy jpeg -q 95 --dir ./fotografias -r

🧹 Limpieza y Conversión

sharpy avif -r --rm -q 80

🔄 Migración de Formato

sharpy webp --dir ./proyecto -r -f

⚠️ Solución de Problemas

Archivo ocupado o bloqueado

⚠️ No se pudo borrar original: path/to/file.webp 
(EBUSY: resource busy or locked, unlink ...)

Soluciones:

  • ✅ Cierra visores de imágenes activos
  • ✅ Cierra el Explorador de Archivos en esa carpeta
  • ✅ Verifica que ningún proceso esté usando las imágenes

🛠️ Tecnologías

| Tecnología | Uso | |------------|-----| | Node.js | Runtime de JavaScript | | Sharp | Procesamiento de imágenes de alto rendimiento | | Commander.js | Gestión de CLI |

  • ⚡ Procesamiento asíncrono para máximo rendimiento
  • 🧩 Código modular y fácil de mantener
  • 🔒 Manejo robusto de errores

📖 Ayuda

sharpy --help

⭐ Si te gusta Sharpy, dale una estrella en GitHub ⭐

Hecho con ❤️ usando Node.js y Sharp