Skip to content

CLI

CLI Overview

Generate one result or one manifest from the shell using sharp or wasm backend.

Use the CLI when you want JSON output without writing a custom script.

Terminal window
blurkit encode ./public/hero.jpg --pretty

Command surface:

Terminal window
blurkit encode <input>

Common 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 BlurResult JSON object
  • local directory input + --glob returns one BlurManifest JSON object
  • remote URL input behaves as single-image mode
  • backend defaults to sharp; use --backend wasm to force wasm path
  • --backend sharp requires sharp.
  • --backend wasm supports PNG/JPEG/WebP decode.
  • --backend wasm requires blurkit-wasm-codecs installed.
  • --glob is valid only for local directory input.