This document covers every installation method: npm library, CLI, desktop app, and building from source.
| Requirement | Version | Notes |
|---|---|---|
| Node.js | ≥ 20.0.0 | Required for CLI, server-side use, and the desktop app |
| npm / yarn / pnpm | Any current | For package installation |
| OS | Windows, macOS, Linux | All platforms supported |
| Browser | Any modern browser (2020+) | For client-side/bundler use — no Node.js required |
Install as a dependency in your project:
npm install hb-scrubyarn add hb-scrubpnpm add hb-scrubHB_Scrub has zero runtime dependencies. The install is entirely self-contained (~55 KB for the core bundle).
import { getSupportedFormats, isFormatSupported } from 'hb-scrub';
console.log(getSupportedFormats());
// ['jpeg', 'png', 'webp', 'gif', 'svg', 'tiff', 'heic', 'avif', 'dng', 'raw', 'pdf', 'mp4']
console.log(isFormatSupported('jpeg')); // trueInstall globally to use hb-scrub as a command-line tool from anywhere:
npm install -g hb-scrubVerify the installation:
hb-scrub --versionRun directly via npx without installing:
npx hb-scrub photo.jpgOr if installed locally in a project:
./node_modules/.bin/hb-scrub photo.jpgHB Scrub can be installed as a fully standalone system application — a CLI accessible from any terminal and a desktop GUI appearing under Applications → Utility. Once installed, no npm, node, or development tools are required for the desktop GUI (the CLI wrapper still uses the system node).
- Node.js ≥ 20.0.0 (required only for building and for the CLI)
- Git (to clone the repository)
- A Linux desktop environment (KDE, GNOME, XFCE, etc.)
git clone https://github.com/James-HoneyBadger/HB_Scrub.git
cd HB_Scrub
npm install
npm run build# Detect architecture automatically
ARCH=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
npx @electron/packager . "HB Scrub" --platform=linux --arch=$ARCH --out=release --overwrite --asarThis creates a self-contained Electron application in release/HB Scrub-linux-$ARCH/.
sudo ./install.shThe install script:
- Installs the GUI app to
/opt/hb-scrub/gui/ - Installs the CLI and dependencies to
/opt/hb-scrub/cli/ - Creates
/usr/local/bin/hb-scrub(CLI) and/usr/local/bin/hb-scrub-gui(GUI) - Installs hb-scrub.desktop to
/usr/share/applications/ - Installs icons to
/usr/share/icons/hicolor/(16px–512px + SVG) - Updates the icon cache and desktop database
If a previous installation exists, it is removed before the new one is installed.
# CLI
hb-scrub --version
hb-scrub --help
# GUI
hb-scrub-guiThe desktop app appears under Applications → Utility in your desktop environment's application menu.
sudo ./uninstall.shThis removes all installed files, symlinks, icons, and the desktop entry.
| Component | Location |
|---|---|
| CLI wrapper script | /usr/local/bin/hb-scrub |
| GUI launcher script | /usr/local/bin/hb-scrub-gui |
| CLI runtime (dist + node_modules) | /opt/hb-scrub/cli/ |
| Electron GUI app | /opt/hb-scrub/gui/ |
| Desktop entry | /usr/share/applications/hb-scrub.desktop |
| Icons (PNG 16–512 + SVG) | /usr/share/icons/hicolor/*/apps/hb-scrub.* |
HB_Scrub includes a standalone Electron desktop application — a full GUI with drag-and-drop, no browser or terminal required.
# Clone the repository
git clone https://github.com/James-HoneyBadger/HB_Scrub.git
cd HB_Scrub
# Install dependencies
npm install
# Build and launch the desktop app
npm run electronIf you prefer to run the GUI in a browser without the Electron wrapper:
npm run guiThis builds the project and starts a local HTTP server at http://localhost:3777. Open that URL in any browser.
git clone https://github.com/James-HoneyBadger/HB_Scrub.git
cd HB_Scrub
npm install
npm run buildBuild output is written to dist/. See Technical Reference for a full listing of build artifacts.
HB_Scrub ships both ESM and CommonJS builds:
| Import style | File used |
|---|---|
import (ESM) |
dist/hb-scrub.js |
require (CJS) |
dist/hb-scrub.cjs |
TypeScript type definitions are included at dist/index.d.ts. No @types/ package is required.
| Import path | Purpose |
|---|---|
hb-scrub |
Main browser/universal API |
hb-scrub/node |
Node.js file system API (processFile, processDir, streams) |
hb-scrub/heic |
HEIC/HEIF/AVIF handler (optional, loads a larger chunk) |
HEIC processing ships as a separate optional import to keep the base bundle lean.
No extra package is needed — it's included in hb-scrub:
// Auto-registered through the main entry — just import normally
import { removeMetadata } from 'hb-scrub';
// Or access the handler directly for advanced use:
import { heic } from 'hb-scrub/heic';HB_Scrub is fully tree-shakeable. If you only process JPEGs, unused format handlers will be excluded from your bundle automatically.
No special configuration required. Works out of the box.
No special configuration required.
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
// No special config needed for client-side usage.
// For server-side (API routes), Node.js >= 20 is required.
};
module.exports = nextConfig;import { removeMetadata } from 'npm:hb-scrub';bun add hb-scrubNo additional @types/ package is needed. Type definitions are bundled:
// tsconfig.json
{
"compilerOptions": {
"moduleResolution": "bundler" // or "node16" / "nodenext"
}
}The global npm bin directory is not in your PATH. Run:
npm bin -g # shows the global bin directory
export PATH="$(npm bin -g):$PATH"Add that export to your shell's .bashrc / .zshrc to make it permanent.
Ensure you have run npm install in your project directory and that hb-scrub appears in node_modules/.
Import from the /heic subpath or ensure the hb-scrub/heic chunk has been loaded. See User Guide — HEIC Support.
The Electron app starts an internal HTTP server on port 3777. If another process is using that port, the window will fail to load. Check with:
lsof -i :3777Kill the conflicting process or change the port in electron/main.cjs and src/gui.ts.
Documentation for HB_Scrub v1.3.0 — © 2026 Honey Badger Universe