A privacy-focused CLI tool that removes sensitive metadata from image files
Project description
🔒 Metadata Scrubber
A privacy-focused CLI tool that removes sensitive metadata (EXIF, GPS, author info) from image files. Perfect for protecting your privacy before sharing photos online.
✨ Features
- Multi-format support - JPEG, PNG (with PDF/Office planned)
- Concurrent processing - Process 1000+ files efficiently with ThreadPoolExecutor
- Dry-run mode - Preview what would be scrubbed without making changes
- Smart format detection - Uses Pillow's format detection, not just file extensions
- Beautiful CLI - Rich progress bars and formatted output
- Privacy-first - Removes GPS coordinates, camera info, timestamps, author data
🚀 Quick Start
Installation
# Using uv (recommended)
uv pip install metadata-scrubber
# Or clone and install locally
git clone https://github.com/Heritage-XioN/metadata-scrubber-tool.git
cd metadata-scrubber-tool
uv sync
Basic Usage
# Read metadata from a file
mst read photo.jpg
# Scrub metadata and save to output folder
mst scrub photo.jpg --output ./cleaned
# Batch process entire folder
mst scrub ./photos -r -ext jpg --output ./cleaned
📖 Commands
mst read - View Metadata
mst read photo.jpg # Single file
mst read ./photos -r -ext jpg # Directory (recursive)
mst scrub - Remove Metadata
mst scrub photo.jpg --output ./out # Single file
mst scrub ./photos -r -ext jpg -o ./out # Directory
mst scrub ./photos -r -ext jpg --dry-run # Preview only
mst scrub ./photos -r -ext jpg -w 8 # 8 concurrent workers
CLI Options
| Option | Description |
|---|---|
-r, --recursive |
Process directories recursively |
-ext, --extension |
Filter by file extension (jpg, png) |
-o, --output |
Output directory for cleaned files |
-d, --dry-run |
Preview without making changes |
-w, --workers |
Number of concurrent workers |
-V, --verbose |
Show detailed debug logs |
-v, --version |
Show version |
🛠️ Development
Setup
git clone https://github.com/Heritage-XioN/metadata-scrubber-tool.git
cd metadata-scrubber-tool
# Install with dev dependencies
uv sync --all-extras
# Run tests
pytest
# Run linting
ruff check .
# Run type checking
mypy src
Project Structure
src/
├── main.py # CLI entry point (Typer app)
├── commands/
│ ├── read.py # Read metadata command
│ └── scrub.py # Scrub metadata command
├── services/
│ ├── metadata_factory.py # Factory for creating handlers
│ ├── image_handler.py # JPEG/PNG handler
│ └── batch_processor.py # Concurrent batch processing
└── core/
├── jpeg_metadata.py # JPEG EXIF processor
└── png_metadata.py # PNG metadata processor
⚠️ Security Considerations
- Original files are never modified - processed copies are created
- Use
--dry-runto preview changes before committing - GPS coordinates are completely stripped for privacy
- Always backup files before scrubbing in production
📄 License
MIT License - See LICENSE for details.
Made with ❤️ for privacy
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metadata_scrubber-0.1.1.tar.gz.
File metadata
- Download URL: metadata_scrubber-0.1.1.tar.gz
- Upload date:
- Size: 74.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cac9f89ee32ef31cfa76c0dd1de76bf1a99ef419f167ccba15d760fcb8fe268
|
|
| MD5 |
280f3e4d3dfe61f6c247d654081a0710
|
|
| BLAKE2b-256 |
9a4e6679a50a3ff19484dd0088008d1932778c1ccfe79af5cf04efb8527ed24e
|
Provenance
The following attestation bundles were made for metadata_scrubber-0.1.1.tar.gz:
Publisher:
publish.yml on Heritage-XioN/metadata-scrubber-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metadata_scrubber-0.1.1.tar.gz -
Subject digest:
0cac9f89ee32ef31cfa76c0dd1de76bf1a99ef419f167ccba15d760fcb8fe268 - Sigstore transparency entry: 801811992
- Sigstore integration time:
-
Permalink:
Heritage-XioN/metadata-scrubber-tool@d00d9d45989e8cb1498045ac1fb8a9e64e1298e5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Heritage-XioN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d00d9d45989e8cb1498045ac1fb8a9e64e1298e5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file metadata_scrubber-0.1.1-py3-none-any.whl.
File metadata
- Download URL: metadata_scrubber-0.1.1-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
999a7829500438761bcc7c367416bf216589d2f49f76eb36b7bead367feebcba
|
|
| MD5 |
44fe54f5e452f32ab2fefdadbd01e973
|
|
| BLAKE2b-256 |
89e9dc77e40128e2b5944737f32d0abb8e32c6d959d5f21ca65b886102967784
|
Provenance
The following attestation bundles were made for metadata_scrubber-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on Heritage-XioN/metadata-scrubber-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metadata_scrubber-0.1.1-py3-none-any.whl -
Subject digest:
999a7829500438761bcc7c367416bf216589d2f49f76eb36b7bead367feebcba - Sigstore transparency entry: 801812046
- Sigstore integration time:
-
Permalink:
Heritage-XioN/metadata-scrubber-tool@d00d9d45989e8cb1498045ac1fb8a9e64e1298e5 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Heritage-XioN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d00d9d45989e8cb1498045ac1fb8a9e64e1298e5 -
Trigger Event:
release
-
Statement type: