qasai
A powerful CLI tool for image compression and conversion, supporting batch processing, multiple engines (mozjpeg, pngquant, sharp, etc.), format conversion (WebP, AVIF), and recursive directory optimization.
Introduction
Qasai is a professional-grade image optimization CLI designed for developers, designers, and system administrators who need to manage visual assets efficiently. It acts as an abstraction layer over industry-standard compression tools, providing a unified interface to process JPG, PNG, WebP, AVIF, GIF, TIFF, and SVG files. By offering both an interactive guided mode and a highly configurable direct CLI mode, it fits seamlessly into CI/CD pipelines, automated scripting, or manual desktop workflows. The tool excels at balancing file size reduction with visual fidelity, making it essential for web performance tuning, production asset preparation, and storage management.
-
Multi-engine architecture: Leverages high-performance tools like mozjpeg for JPEGs, pngquant or optipng for PNGs, and svgo for vector optimization.
-
Versatile conversion: Seamlessly convert legacy formats like JPEG and PNG into modern, efficient formats like WebP and AVIF.
-
Batch and recursive processing: Easily compress entire project directories or storage folders with recursive file detection.
-
Advanced image manipulation: Includes support for resizing by fixed dimensions, percentages, or maximum width/height constraints while maintaining aspect ratios.
-
Developer-friendly output: Provides JSON output options for integration with automated build scripts, alongside dry-run functionality for previewing savings.
-
Performance optimization: Supports parallel processing to maximize CPU utilization during large-scale asset migrations.
-
The tool is best invoked via npx qasai, making it easy to use without a permanent local installation.
-
Use the -i (in-place) flag with caution; consider using the -B (backup) flag to prevent data loss.
-
Quality settings are granular (1-100); default 80 provides a balanced target for most web applications.
-
Input/Output: Accepts local directory paths or individual files as input; output defaults to a 'qasai' subdirectory but can be customized with -o.
-
Constraints: While it supports many formats, engine availability (like sharp or mozjpeg) depends on the local Node.js environment setup. Ensure all necessary binary dependencies are resolved.
Repository Stats
- Stars
- 16
- Forks
- 1
- Open Issues
- 0
- Language
- HTML
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 1, 2026, 09:58 AM