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

clean-image

v1.0.1

Published

Strip AI detection metadata from images. Four-pass pipeline. Zero evidence.

Readme

The problem

Every AI image generator embeds invisible fingerprints into your images. EXIF tags, XMP markers, C2PA Content Credentials, PNG text chunks, pixel-level signatures. Platforms like Twitter/X, Facebook, and Adobe read these markers and label your images as AI-generated.

Existing tools only strip some metadata. A single leftover APP1 marker or a C2PA manifest buried in a JFIF segment is enough to flag you.

The solution

clean-image does not just strip metadata. It destroys and rebuilds the image from the ground up. Four-pass pipeline. Two re-encodes. Two nuclear strips. Nothing survives.

ExifTool alone misses embedded C2PA manifests and PNG text chunks. FFmpeg alone misses residual XMP and IPTC tags. Online tools re-compress at garbage quality and keep your images.

clean-image runs all four passes because no single tool catches everything.

What it kills

| Metadata | Embedded by | Detected by | Killed? | |:---|:---|:---|:---:| | EXIF (software, AI tool tags) | All generators | Most platforms | Yes | | XMP (ai:generative, creator tools) | Adobe, Midjourney | Twitter/X, Facebook | Yes | | IPTC (digitalSourceType) | News tools, Adobe | AP, Reuters | Yes | | C2PA / Content Credentials | Adobe, OpenAI, Google | Twitter/X, Adobe CAI | Yes | | PNG text chunks (prompt, params) | ComfyUI, A1111, SD | Detection tools | Yes | | ICC color profiles | Various | Forensic tools | Yes | | JFIF / APP markers | JPEG encoders | Forensic tools | Yes | | Pixel-level AI fingerprints | Generators | Advanced detection | Yes* |

* Aggressive mode only: applies imperceptible gaussian blur (σ=0.3)

Install

npm install -g clean-image

Or run without installing:

npx clean-image

| Platform | Command | |:---|:---| | macOS | brew install exiftool ffmpeg | | Ubuntu / Debian | sudo apt install exiftool ffmpeg | | Arch | sudo pacman -S perl-image-exiftool ffmpeg | | Windows (WSL) | sudo apt install exiftool ffmpeg |

Usage

Interactive TUI

Run with no arguments to launch the interactive terminal UI:

clean-image
    ██████╗██╗     ███████╗ █████╗ ███╗   ██╗
   ██╔════╝██║     ██╔════╝██╔══██╗████╗  ██║
   ██║     ██║     █████╗  ███████║██╔██╗ ██║
   ██║     ██║     ██╔══╝  ██╔══██║██║╚██╗██║
   ╚██████╗███████╗███████╗██║  ██║██║ ╚████║
    ╚═════╝╚══════╝╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝
    ██╗███╗   ███╗ █████╗  ██████╗ ███████╗
    ██║████╗ ████║██╔══██╗██╔════╝ ██╔════╝
    ██║██╔████╔██║███████║██║  ███╗█████╗
    ██║██║╚██╔╝██║██╔══██║██║   ██║██╔══╝
    ██║██║ ╚═╝ ██║██║  ██║╚██████╔╝███████╗
    ╚═╝╚═╝     ╚═╝╚═╝  ╚═╝ ╚═════╝ ╚══════╝

    Strip AI metadata. Four passes. Zero trace.

  ? What do you want to do?
  ❯ ● Clean an image       : strip AI metadata now
    ● Install CLI skill    : add to Claude / Codex / OpenCode

Features:

  • Auto-detects images in your current directory
  • Drag & drop any image file into the terminal
  • Choose mode: Standard, Aggressive, or Strip-only
  • Pick quality: 95, 92, 85, or 75
  • Before/after report: file size, metadata count, % reduction

Direct CLI

# Basic: clean any image
clean-image photo.png

# Aggressive: defeats pixel-level fingerprinting
clean-image -a photo.png

# Custom quality
clean-image -q 85 photo.webp

# Custom output path
clean-image photo.png -o clean.jpg

# Strip metadata only: no re-encoding
clean-image -s photo.jpg

See it work

$ clean-image -a ai-artwork.png

  ⠸ Pass 1/4 — FFmpeg re-encode
  ⠸ Pass 2/4 — ExifTool nuclear strip
  ⠸ Pass 3/4 — FFmpeg re-encode #2
  ⠸ Pass 4/4 — ExifTool final strip
  ✓ Done!

    RESULTS
    Mode       aggressive
    Size       2847 KB → 1923 KB (-32%)
    Metadata   43 fields → 5 fields (38 stripped)
    Output     ./ai-artwork-clean.jpg

    ✓ Zero AI fingerprints remain.

The pipeline

  1. Pass 1: FFmpeg re-encode Re-encodes with -map_metadata -1 and +bitexact flags. In aggressive mode it also applies a tiny gaussian blur to break pixel fingerprints.

  2. Pass 2: ExifTool nuclear strip Runs -all= to remove XMP, IPTC, residual EXIF, and other metadata FFmpeg can leave behind.

  3. Pass 3: FFmpeg re-encode #2 Rebuilds the output again from the stripped intermediate file to remove lingering APP markers and container-level residue.

  4. Pass 4: ExifTool final strip Performs a final metadata wipe on the finished output.

Result: a clean JPEG with zero AI fingerprints.

Options

| Flag | Description | Default | |:---|:---|:---| | -q, --quality <n> | JPEG quality (1-100) | 92 | | -s, --strip-only | Strip metadata only, no re-encoding | false | | -a, --aggressive | Gaussian blur (σ=0.3) + full pipeline | false | | -o, --output <file> | Output file path | <input>-clean.jpg | | -h, --help | Show help | — | | -V, --version | Show version | — | | (no args) | Launch interactive TUI | — |

Modes

| Mode | Flag | What it does | Use when | |:---|:---|:---|:---| | Standard | (default) | 4-pass strip + re-encode | Most use cases | | Aggressive | -a | Standard + imperceptible blur (σ=0.3) | Pixel-level detection is a concern | | Strip only | -s | Metadata removal, no re-encoding | You need exact pixel preservation | | Interactive | (no args) | Full TUI with guided prompts | First time using the tool |

CLI Skills

clean-image installs as a slash command in your AI coding CLI. Run the TUI and select "Install CLI skill", or install manually:

Claude Code

cp .claude/commands/clean-image.md ~/.claude/commands/

Then use /clean-image inside Claude Code.

Codex CLI

The skill auto-appends to ~/.codex/instructions.md via the installer.

OpenCode

cp .claude/commands/clean-image.md ~/.opencode/commands/

Then use /clean-image inside OpenCode.

One-step install for all CLIs

npx clean-image   # → select "Install CLI skill" → "All of them"

API

Use clean-image programmatically in your Node.js projects:

import { cleanImage, checkDeps } from 'clean-image';

// Check system dependencies
const missing = await checkDeps();
if (missing.length) {
  console.error(`Missing: ${missing.join(', ')}`);
  process.exit(1);
}

// Clean an image
const output = await cleanImage('input.png', {
  quality: 92,           // JPEG quality (1-100)
  aggressive: true,      // Enable pixel-level cleaning
  stripOnly: false,      // Set true to skip re-encoding
  output: 'clean.jpg',   // Custom output path (optional)
  onProgress: (msg) => console.log(msg),
});

console.log(`Cleaned: ${output}`);

How it compares

| Tool | Strips EXIF | Strips XMP | Strips C2PA | Re-encodes | Pixel cleaning | CLI + TUI | |:---|:---:|:---:|:---:|:---:|:---:|:---:| | ExifTool | Yes | Yes | No | No | No | CLI only | | ImageMagick | Partial | Partial | No | Yes | No | CLI only | | Online tools | Varies | Varies | Varies | Yes | No | Web only | | clean-image | Yes | Yes | Yes | Yes | Yes | Both |

Requirements

  • Node.js >= 16
  • exiftool: metadata manipulation
  • ffmpeg: image re-encoding

License

MIT