https://github.com/sandy-sp/metadata-cleaner
Metadata Cleaner – A CLI tool to remove metadata from images, PDFs, DOCX, audio, and video files. Privacy-focused, fast, and open-source. Supports batch processing & standalone executables.
https://github.com/sandy-sp/metadata-cleaner
cli file-cleaner metadata metadata-removal open-source privacy python security
Last synced: about 2 months ago
JSON representation
Metadata Cleaner – A CLI tool to remove metadata from images, PDFs, DOCX, audio, and video files. Privacy-focused, fast, and open-source. Supports batch processing & standalone executables.
- Host: GitHub
- URL: https://github.com/sandy-sp/metadata-cleaner
- Owner: sandy-sp
- License: mit
- Created: 2025-01-31T13:26:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-13T00:02:57.000Z (over 1 year ago)
- Last Synced: 2025-04-15T02:52:46.522Z (about 1 year ago)
- Topics: cli, file-cleaner, metadata, metadata-removal, open-source, privacy, python, security
- Language: Python
- Homepage: https://github.com/sandy-sp/metadata-cleaner
- Size: 385 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Metadata Cleaner
[](https://github.com/sandy-sp/metadata-cleaner/actions/workflows/ci.yml)
[](https://github.com/sandy-sp/metadata-cleaner/releases)
[](https://pypi.org/project/metadata-cleaner/)
[](LICENSE)
Metadata Cleaner is a privacy-focused CLI for viewing and removing metadata from
local files. It writes cleaned copies by default and avoids modifying originals
in-place.
## Supported Files
- Images: JPG, JPEG, PNG, TIFF, WEBP, AVIF
- Documents: PDF, DOCX, TXT
- Audio: MP3, WAV, FLAC, OGG, AAC, M4A, WMA
- Video: MP4, MKV, MOV, AVI, WEBM, FLV
Video support requires `ffmpeg` and `ffprobe`. AVIF and broader metadata
coverage benefit from `exiftool`.
## Installation
Requires Python 3.11 or newer.
```bash
pip install metadata-cleaner
metadata-cleaner --help
```
For development:
```bash
git clone https://github.com/sandy-sp/metadata-cleaner.git
cd metadata-cleaner
poetry install --with dev
poetry run metadata-cleaner --help
```
## CLI Usage
View metadata:
```bash
metadata-cleaner view sample.jpg
```
Remove metadata from one file:
```bash
metadata-cleaner delete sample.jpg
```
Write to a specific file:
```bash
metadata-cleaner delete sample.jpg --output cleaned/sample.jpg
```
Process a folder recursively:
```bash
metadata-cleaner delete ./photos --output ./cleaned-photos
```
Preview a run without writing files:
```bash
metadata-cleaner delete ./photos --dry-run
```
Edit metadata where supported:
```bash
metadata-cleaner edit song.mp3 --changes '{"artist": "Unknown"}'
```
## Development Checks
```bash
python3 manage.py test
python3 manage.py lint
python3 manage.py check
```
CI runs tests, lint, and `pip-audit` on pull requests and pushes to `main`.
## Docker
```bash
docker build -t metadata-cleaner .
docker run --rm -v "$(pwd)/photos:/data" metadata-cleaner delete /data
```
## Logging
By default, logs go to stderr only. To write a log file, opt in explicitly:
```bash
METADATA_CLEANER_LOG_FILE=./metadata-cleaner.log metadata-cleaner delete sample.jpg
```
Use debug logging when needed:
```bash
METADATA_CLEANER_LOG_LEVEL=DEBUG metadata-cleaner view sample.jpg
```
## Resources
- [API Reference](docs/API_REFERENCE.md)
- [Usage Guide](docs/USAGE.md)
- [Architecture](docs/ARCHITECTURE.md)