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

kempes

v1.0.1

Published

CLI tool untuk kompresi gambar dengan berbagai format dan opsi

Downloads

9

Readme

Kempes - Image Compressor CLI

GitHub npm

Aplikasi CLI untuk kompresi gambar dengan berbagai format dan opsi kustomisasi.

Repository: https://github.com/Cloud-Dark/kempes_image

📦 Instalasi

1. Instalasi Global

# Clone atau download project ini
# Masuk ke folder project
cd kempes

# Install dependencies
npm install

# Install secara global
npm install -g .

# Atau bisa juga dengan npm link
npm link

2. Verifikasi Instalasi

kempes --version
kempes --help

🚀 Cara Penggunaan

Help Command

kempes
# atau
kempes --help

Basic Usage

Kompres semua gambar ke format tertentu

# Kompres ke JPG (default quality 70%)
kempes -t=jpg

# Kompres ke PNG
kempes -t=png

# Kompres ke WebP
kempes -t=webp

Kompres semua gambar dengan kualitas tertentu (pertahankan format asli)

# Kompres semua gambar dengan kualitas 80% tanpa mengubah format
kempes -t -q=80

# Atau cukup
kempes -t -q 80

Dengan Quality Control

# Kompres ke JPG dengan kualitas 80%
kempes -t=jpg -q=80

# Kompres ke WebP dengan kualitas 50%
kempes -t=webp -q=50

Dengan Output Folder

# Kompres dan simpan di folder 'compressed'
kempes -t=jpg -o=compressed

# Kompres dengan kualitas dan folder output
kempes -t=webp -q=85 -o=output

Pertahankan format asli dengan kualitas tertentu

# Kompres semua gambar dengan kualitas 80% tanpa mengubah format
kempes -t -q=80

# Kompres semua gambar dengan kualitas 80% tanpa mengubah format, simpan di folder 'compressed'
kempes -t -q=80 -o=compressed

Dengan Source Folder Spesifik

# Kompres gambar dari folder 'images'
kempes -s=images -t=jpg

# Kompres dari folder tertentu ke folder output
kempes -s=photos -t=webp -o=compressed -q=75

Contoh Lengkap

# Kompres semua gambar di folder 'source', 
# konvert ke WebP kualitas 80%, 
# simpan di folder 'output'
kempes -s=source -t=webp -q=80 -o=output

📋 Parameter

| Parameter | Alias | Deskripsi | Default | |-----------|-------|-----------|---------| | --type | -t | Format output (jpg, png, webp, webm) - jika tidak diset maka format asli dipertahankan | jpg | | --output | -o | Folder output | compress di tempat | | --source | -s | Folder sumber | current directory (.) | | --quality | -q | Kualitas kompresi (1-100) | 70 |

🎯 Format yang Didukung

Input

  • JPG/JPEG
  • PNG
  • WebP
  • BMP
  • TIFF
  • GIF

Output

  • JPG/JPEG
  • PNG
  • WebP
  • WebM (sebagai WebP)

💡 Tips Penggunaan

  1. Backup Original: Selalu backup gambar original sebelum kompresi
  2. Quality Setting:
    • 90-100: Kualitas sangat tinggi, file besar
    • 70-89: Kualitas tinggi, seimbang
    • 50-69: Kualitas sedang, file lebih kecil
    • 30-49: Kualitas rendah, file sangat kecil
  3. Format WebP: Memberikan kompresi terbaik untuk web
  4. Batch Processing: Tool ini otomatis memproses semua gambar dalam folder

🛠️ Development

Requirements

  • Node.js >= 14
  • npm atau yarn

Dependencies

  • sharp: Image processing
  • commander: CLI framework
  • glob: File pattern matching
  • colors: Console colors

Build dari Source

git clone https://github.com/Cloud-Dark/kempes_image.git
cd kempes_image
npm install
npm link

🧪 Unit Tests

This project includes unit tests to verify functionality. To run the tests:

npm test

The tests are located in the test/ directory and use Jest as the testing framework.

Test Coverage

Current tests cover:

  • Image file detection functionality
  • File size formatting
  • Transparent image handling
  • Directory creation
  • Format determination logic

📄 Lisensi

MIT License

🐛 Bug Reports & Feature Requests

Silakan buat issue di repository ini untuk bug reports atau feature requests.

🤝 Contributing

Pull requests are welcome! Please read the contributing guidelines first.