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

remove-ai-watermark

v1.1.0

Published

Sanitize images, text documents, and codebases by removing C2PA manifests, EXIF metadata, invisible zero-width unicode watermarks, Bidi control characters, LLM prompt tokens, and steganography signals.

Readme

remove-ai-watermark

npm version License: MIT

Sanitize images, text files, and codebases by stripping C2PA content credentials, EXIF metadata, invisible zero-width unicode watermarks, Bidi control characters, LLM prompt tokens, and steganography signals (SynthID disruption).

Built for fast batch codebase processing via CLI or Node library.


Features

  • Invisible Unicode & Zero-Width Stripping: Removes hidden zero-width spaces (\u200B, \u200C, \u200D, \uFEFF, \u00AD, \u2060, \u2061-\u2064, \u200E, \u200F).
  • Bidi Security Protection: Cleans Right-to-Left Override (\u202E) and invisible unicode control formatting characters.
  • LLM Prompt Token Cleaning: Strips leftover system tokens (, , , , ``, etc.).
  • Language-Aware Comment Sanitization: Cleans AI attribution comment headers in JavaScript, TypeScript, Python, HTML, CSS, JSON, YAML, SQL, and Markdown.
  • Image Metadata & C2PA Stripping: Removes EXIF metadata, IPTC, XMP, C2PA manifest chunks, and PNG text chunks across PNG, JPEG, WebP, AVIF, TIFF, and GIF formats.
  • Pixel Buffer Re-Encoding: Re-encodes canvas pixel data through sharp to disrupt invisible steganographic pixel signals (SynthID).
  • Visual Corner Crop: Optional --crop-corner parameter to trim off visual corner logos.
  • Batch Codebase Sweeping: Recursively scans folders, respects .gitignore and .watermarkignore files, skips node_modules, and supports parallel concurrent file workers.
  • CI / Pre-Commit Integration: Includes --check (CI audit exit code mode), --dry-run (preview mode), and init wizard for pre-commit hooks and GitHub Actions.

Installation

# Global installation for CLI
npm install -g remove-ai-watermark

# Local installation as dependency
npm install remove-ai-watermark

CLI Usage

Basic Batch Directory Cleaning

Overwrites cleaned files in place across an entire project directory:

npx remove-ai-watermark -i .

Cleans target directory and outputs to a destination folder preserving relative directory structure:

npx remove-ai-watermark ./src -o ./dist_clean

Preview and CI Verification

Preview changes without modifying files:

npx remove-ai-watermark --dry-run .

CI Audit mode (exits with code 1 if any AI watermarks or zero-width spaces are found):

npx remove-ai-watermark --check .

One-Click Project & CI Setup

Initialize .watermarkrc configuration and install Git pre-commit hook:

npx remove-ai-watermark init

Generate GitHub Actions workflow file (.github/workflows/verify-watermarks.yml):

npx remove-ai-watermark init --ci

CLI Options

| Flag | Description | |---|---| | -i, --in-place | Overwrite files in place | | -o, --out-dir <dir> | Output cleaned files to destination directory | | --dry-run | Preview changes without writing to disk | | --check | Audit mode (exits with code 1 if watermarks are detected) | | --crop-corner <corner> | Crop corner stamp (bottom-right, bottom-left, top-right, top-left) | | --text-only | Clean text and source code files only | | --image-only | Clean image files only | | --concurrency <N> | Set concurrent worker limit (default: 16) | | -v, --verbose | Print detailed file-by-file log | | -h, --help | Display help information |


Programmatic Library Usage

const { cleanText, cleanImage, cleanPath } = require('remove-ai-watermark');

// Clean string content
const { text, stats } = cleanText('Hello\u200BWorld');
console.log(text); // "HelloWorld"
console.log(stats.zeroWidthCount); // 1

// Clean image buffer
const { buffer, stats: imgStats } = await cleanImage(inputBuffer, {
  cropCorner: 'bottom-right'
});
console.log(imgStats.bytesSaved);

// Clean directory recursively
const summary = await cleanPath('./src', { inPlace: true });
console.log(`Cleaned ${summary.changedFiles} files`);

Configuration (.watermarkrc)

Create a .watermarkrc or .watermarkrc.json file in your repository root:

{
  "ignore": ["node_modules", ".git", "dist", "build", ".next", "vendor"],
  "textOnly": false,
  "imageOnly": false,
  "stripZeroWidth": true,
  "stripBidi": true,
  "stripTokens": true,
  "stripComments": true,
  "concurrency": 16
}

License

MIT © Aman Ghuman