Skip to content

rekonov/SHADE

Repository files navigation

SHADE

TypeScript Node.js Tauri Rust License

File metadata inspector and cleaner. See what's hidden inside your files — GPS coordinates, device identifiers, author data — then strip it all.


What it does

SHADE reads hidden metadata embedded in files (EXIF, XMP, IPTC, document properties) and classifies each field by risk level:

  • RISK — GPS coordinates, device serial numbers, unique identifiers
  • WARN — author name, software version, creation/modification dates
  • OK — technical dimensions, color space, resolution

Files can then be cleaned — metadata stripped, clean copy saved alongside the original.


Supported formats

Format Inspect Clean
JPEG, JPG Yes Yes
PNG Yes Yes
WebP Yes Yes
TIFF, TIF Yes Yes
BMP, AVIF, HEIC, HEIF Yes Yes
PDF Yes Yes
DOCX, XLSX, PPTX Yes Yes

Screenshots


Requirements

CLI:

  • Node.js 18+
  • npm

Desktop build (additional):

  • Rust stable toolchain — install via rustup.rs
  • Tauri CLI v2 (installed by npm install inside desktop/)
  • Windows: Microsoft C++ Build Tools or Visual Studio with "Desktop development with C++" workload

Installation

git clone <repo-url>
cd SHADE

# Install CLI dependencies
npm install

# Build the CLI
npm run build

Use the shade command globally:

npm link

Or run directly:

node dist/index.js <file>

Usage

Inspect a file:

shade photo.jpg

Displays all metadata fields grouped by category with color-coded risk badges.

Strip all metadata:

shade photo.jpg --clean

Saves a clean copy as photo_clean.jpg in the same directory.

Specify output path:

shade photo.jpg --clean -o /path/to/output.jpg

Output raw JSON:

shade photo.jpg --json

Useful for scripting or piping into other tools.

Examples:

# Inspect an image — shows GPS coordinates, camera model, software
shade vacation.jpg

# Strip metadata from a Word document
shade report.docx --clean

# Check a PDF and save clean version to a specific path
shade contract.pdf --clean -o contract_clean.pdf

# Get machine-readable output, filter only high-risk fields
shade photo.jpg --json | jq '.fields[] | select(.severity == "danger")'

Development

# Run with ts-node (no build step)
npm run dev -- photo.jpg

# Run tests
npm test

# Lint
npm run lint

Desktop app (Tauri)

The desktop/ directory contains a native application built with Tauri v2 and a Vite/TypeScript frontend. Same metadata inspection capabilities through a GUI.

cd desktop
npm install

# Development mode (hot reload)
npm run tauri dev

# Production build
npm run tauri build

Built binary: desktop/src-tauri/target/release/


Project structure

SHADE/
├── src/
│   ├── index.ts          # CLI entry point (Commander.js)
│   ├── parsers/
│   │   ├── index.ts      # Unified analyzer, format detection
│   │   ├── types.ts      # Shared types, severity classifier
│   │   ├── image.ts      # EXIF/XMP/IPTC extraction via exifr
│   │   ├── pdf.ts        # PDF metadata parser
│   │   └── docx.ts       # Office document (DOCX/XLSX/PPTX) parser
│   ├── cleaners/
│   │   ├── index.ts      # Unified cleaner entrypoint
│   │   ├── image.ts      # Image cleaning via sharp
│   │   ├── pdf.ts        # PDF metadata removal
│   │   └── docx.ts       # Office document cleaning via fflate
│   └── cli/
│       └── output.ts     # Terminal rendering (Chalk)
└── desktop/              # Tauri desktop application
    ├── src/              # Frontend (TypeScript + Vite)
    └── src-tauri/        # Rust backend

Parsers and cleaners are kept separate. exifr works in both Node.js CLI and the browser-based desktop frontend. sharp is Node.js only (CLI cleaner). fflate handles ZIP-based Office formats in both environments.


Tech stack

Package Purpose
TypeScript 5.8 Language
Commander.js CLI argument parsing
Chalk Terminal color output
exifr EXIF/XMP/IPTC metadata extraction
sharp Image processing and metadata stripping
fflate ZIP/Office document parsing and rewriting
Vitest Unit testing
Tauri v2 Desktop application framework

About

See what your files reveal. Remove metadata from images, PDFs, and docs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors