CLI
CLI Overview
Generate one result or one manifest from the shell using sharp or wasm backend.
Command surface
Use the CLI when you want JSON output without writing a custom script. Run it through your package runner; a global install is not required.
npx blurkit encode <input># orpnpm exec blurkit encode <input>Encode one image
npx blurkit encode ./public/hero.jpg --prettyCommon flags:
--algorithm blurhash|thumbhash--size <number>--width <number>--height <number>--format png|jpeg--glob <pattern>--out <file>--base-path <path>--concurrency <number>--backend sharp|wasm--pretty
Behavior:
- local file input returns one
BlurResultJSON object - local directory input returns one
BlurManifestJSON object, with or without--glob - the default directory selection is
**/*.{jpg,jpeg,png,webp};--globreplaces it - remote URL input behaves as single-image mode
- output goes to stdout unless
--out <file>is set - backend defaults to
sharp; use--backend wasmto force the wasm path
Backend notes
--backend sharprequiressharp.--backend wasmsupports PNG/JPEG/WebP decode.--backend wasmrequiresblurkit-wasm-codecsinstalled.--globis valid only for local directory input.