This guide covers installation options, advanced features, and troubleshooting for nameback.
- Installation Options
- Dependency Management
- Advanced Features
- Metadata Extraction Details
- Safety & Security
- Troubleshooting
brew tap h4x0r/nameback
brew install namebackAutomatically installs all dependencies: exiftool, tesseract, ffmpeg, imagemagick
Intel Mac:
- Download
nameback-x86_64-apple-darwin.dmgfrom releases - Open the DMG file
- Drag
nameback.appto your Applications folder - Launch from Applications
Apple Silicon:
- Download
nameback-aarch64-apple-darwin.dmgfrom releases - Open the DMG file
- Drag
nameback.appto your Applications folder - Launch from Applications
Note: For CLI usage, use Homebrew instead (see above).
Download and install nameback-x86_64-pc-windows-msvc.msi from releases
What you get:
- CLI: Type
namebackin any terminal (automatically added to PATH) - GUI: Launch from Start Menu → nameback
- Auto-install dependencies: exiftool, tesseract, ffmpeg, imagemagick
The MSI installer automatically installs all required dependencies during setup. No manual configuration needed!
Silent Installation:
msiexec /i nameback-x86_64-pc-windows-msvc.msi /quietThe installer uses custom actions for dependency checking and installation. Console windows are automatically hidden during silent installation for a clean user experience.
cargo install nameback
nameback --install-deps # Interactive dependency installationThis installs the command-line tool only. Dependencies are installed automatically when you run nameback --install-deps or on first use (smart detection prompts you).
cargo install nameback --bin nameback-gui
nameback-guiThis installs the GUI application. You can launch it from the terminal or create a desktop shortcut.
# Download the latest .deb package
wget https://github.com/h4x0r/nameback/releases/latest/download/nameback_0.4.1_amd64.deb
# Install with dependencies
sudo dpkg -i nameback_0.4.1_amd64.deb
sudo apt-get install -f
# Now you have both:
nameback # CLI tool
nameback-gui # GUI applicationThe .deb package automatically installs all dependencies and creates desktop menu entries for the GUI.
Dependencies included:
libimage-exiftool-perl- Metadata extraction (required)tesseract-ocr- OCR for images and videostesseract-ocr-chi-tra- Traditional Chinese language supporttesseract-ocr-chi-sim- Simplified Chinese language supportffmpeg- Video frame extractionimagemagick- HEIC/HEIF image support
If you prefer to manage dependencies manually:
Debian/Ubuntu/Kali:
sudo apt-get install libimage-exiftool-perl tesseract-ocr tesseract-ocr-chi-tra tesseract-ocr-chi-sim ffmpeg imagemagickFedora/RHEL:
sudo dnf install perl-Image-ExifTool tesseract tesseract-langpack-chi_tra tesseract-langpack-chi_sim ffmpeg imagemagickArch Linux:
sudo pacman -S perl-image-exiftool tesseract tesseract-data-chi_tra tesseract-data-chi_sim ffmpeg imagemagickThis project uses a Cargo workspace with 3 crates:
nameback-core- Shared library with core rename logicnameback-cli- Command-line toolnameback-gui- GUI application (egui-based)
# Clone the repository
git clone https://github.com/h4x0r/nameback.git
cd nameback
# Build everything
cargo build --release
# Binaries:
# target/release/nameback (CLI)
# target/release/nameback-gui (GUI)# CLI only
cargo build --release -p nameback
# GUI only
cargo build --release -p nameback-gui
# Core library only
cargo build --release -p nameback-corecargo test --workspace- exiftool - Core metadata extraction (always required)
These are automatically installed with nameback --install-deps:
- tesseract-ocr - Enables OCR for images/videos without metadata
- ffmpeg - Enables video frame extraction for OCR
- ImageMagick - Enables HEIC/HEIF support on Windows/Linux (macOS has native support via
sips)
nameback --check-depsWithout tesseract/ffmpeg/imagemagick, nameback still works for:
- Photos with EXIF metadata (JPEG, PNG)
- PDFs with title metadata or embedded text
- Office documents (DOCX, XLSX, PPTX)
- Audio files (MP3, FLAC, etc.)
You'll miss out on:
- OCR for screenshots without metadata
- Video frame OCR
- HEIC/HEIF support (Windows/Linux only)
- Scanned PDF OCR
By default, nameback automatically enriches filenames with GPS location and timestamps when available:
Photos and videos with GPS metadata get location information added to their filenames:
Default behavior (geocoding enabled):
IMG_1234.jpg with GPS 37.7749N, 122.4194W
→ Sunset_at_the_Beach_San_Francisco_CA_2024-03-15.jpg
With --no-geocode (raw coordinates):
→ Sunset_at_the_Beach_37.77N_122.42W_2024-03-15.jpg
Disable location entirely with --no-location:
→ Sunset_at_the_Beach_2024-03-15.jpg
Timestamps are automatically added when available in EXIF metadata:
Screenshot.png with DateTimeOriginal: 2024-03-15 14:30:22
→ Screenshot_2024-03-15.png
Disable with --no-timestamp:
→ Screenshot.png
- Uses OpenStreetMap Nominatim API (free, no API key required)
- Automatically rate-limited to comply with usage policy (1 req/sec)
- Results cached for 1 hour to minimize API calls
- Falls back to coordinates if geocoding fails (offline, rate limit, etc.)
- US/Canada locations abbreviated: "Seattle_WA", "Toronto_ON"
- International locations: "Paris_France", "Tokyo_Japan"
When tesseract-lang is installed, nameback automatically tries multiple languages and selects the best result:
- Traditional Chinese (
chi_tra) - Tried first for broader compatibility - Simplified Chinese (
chi_sim) - Second priority - English (
eng) - Always available as fallback - 160+ additional languages available via tesseract-lang
The system automatically selects the language that produces the most characters, ensuring optimal text extraction.
Example:
screenshot.png with Chinese text → Tries chi_tra, chi_sim, eng → Selects chi_tra (120 chars)
→ Renames to: 輸入_姓名_電話號碼.png
Apple's High Efficiency Image Format is fully supported:
- macOS: Uses
sips(built-in) for fast conversion - Windows/Linux: Uses ImageMagick for conversion
- Extracts EXIF metadata before OCR
- Maintains original
.heicextension after renaming
Process:
- Extract EXIF metadata (Title, Description, DateTimeOriginal)
- If no metadata, convert HEIC → PNG using sips/ImageMagick
- Run OCR on converted image
- Rename original HEIC file
For videos without useful metadata:
- Extracts frame at 1 second using ffmpeg
- Runs multi-language OCR on the frame
- Uses first 80 characters as filename
Supported formats: MP4, MOV, AVI, MKV, WebM, FLV, WMV, M4V
Use cases:
- Screen recordings with text
- Tutorial videos with title screens
- Presentation recordings
Example:
VID_20241015.mp4 (no metadata) → Extract frame at 1s → OCR detects "Product Demo"
→ Renames to: Product_Demo.mp4
Nameback uses intelligent heuristics to extract meaningful names from various file types.
Each file type has a priority-based extraction system:
- Images (JPEG, PNG, HEIC, etc.): Title → Description → DateTimeOriginal → OCR
- PDFs: Title → Subject → Text extraction → OCR (scanned)
- Videos: Title → CreationDate → Multi-frame OCR
- Office Docs: Title → Subject → Author (filtered)
- Audio: Title → Artist → Album
Names are validated with quality scoring to ensure meaningful results:
- Rejects scanner/printer names ("Canon iPR C165")
- Filters generic placeholders ("Untitled", "Document1")
- Validates minimum length and character diversity
- Falls back to original filename if quality too low
When metadata is missing, OCR tries multiple languages:
- Traditional Chinese (
chi_tra) - Simplified Chinese (
chi_sim) - English (
eng) - Selects the language with most extracted characters
Renamed automatically (when they have useful metadata):
- Photos: JPEG, PNG, HEIC/HEIF, GIF, TIFF
- Documents: PDF, DOCX, XLSX, PPTX, ODT, ODS, ODP
- Videos: MP4, MOV, AVI, MKV, WebM
- Audio: MP3, FLAC, WAV, OGG, M4A
- Web: HTML, MHTML (email)
- Archives: ZIP, TAR (based on contents)
Skipped (no useful metadata):
- Plain text: TXT, CSV, MD
- System files: DLL, EXE, temp files
- Recovered files without metadata
For complete technical details and examples, see Intelligent Naming Heuristics.
All nameback release artifacts are signed with SLSA build provenance attestations for supply chain security. This ensures that your downloaded files are authentic and haven't been tampered with.
- Authenticity - Proves the artifact was built by the official h4x0r/nameback repository
- Integrity - Confirms the file hasn't been modified since it was built
- Transparency - Shows the exact commit SHA that built the artifact
- Trust - Validates the build came from the official GitHub Actions workflow
Install the GitHub CLI:
- macOS:
brew install gh - Windows: Download from https://cli.github.com/
- Linux: See https://github.com/cli/cli/blob/trunk/docs/install_linux.md
Windows MSI Installer:
gh attestation verify nameback-x86_64-pc-windows-msvc.msi --owner h4x0rmacOS DMG Installers:
# Intel Mac
gh attestation verify nameback-x86_64-apple-darwin.dmg --owner h4x0r
# Apple Silicon Mac
gh attestation verify nameback-aarch64-apple-darwin.dmg --owner h4x0rLinux Debian Package:
gh attestation verify nameback_0.5.0-1_amd64.deb --owner h4x0rWindows ZIP Archive:
gh attestation verify nameback-x86_64-pc-windows-msvc.zip --owner h4x0rWhen verification succeeds, you'll see:
✓ Verification succeeded!
sha256:abc123... was attested by:
REPO PREDICATE_TYPE WORKFLOW
h4x0r/nameback https://slsa.dev/provenance/v1 .github/workflows/release.yml@refs/tags/v0.5.0
This confirms:
- ✅ The artifact was built by the official h4x0r/nameback repository
- ✅ It was built from the official release.yml workflow
- ✅ It matches the exact commit SHA shown
- ✅ It hasn't been tampered with since build
For maximum security, combine attestation verification with checksum verification:
# Download checksums.txt from the release
wget https://github.com/h4x0r/nameback/releases/latest/download/checksums.txt
# Verify checksum matches
sha256sum -c checksums.txtTwo-layer security:
- Attestations verify authenticity (came from official repo/workflow)
- Checksums verify integrity (file not corrupted/modified)
Using both provides the strongest security guarantee.
- Preview mode - Always test with
--dry-runfirst - No overwrites - Skips files if destination already exists
- Duplicate handling - Adds
_1,_2suffixes automatically - Filename sanitization - Removes special characters safely
- Same-directory only - Files can only be renamed within their parent directory (no path traversal)
- Permission-based - Respects standard Unix/filesystem permissions
- No privilege escalation - Cannot access system directories without appropriate permissions
- Root execution blocked - Refuses to run as root to prevent accidental system directory modification
- Always run
--dry-runfirst to preview changes - Use on user data directories where you have write permissions
- Back up important files before bulk renaming operations
- Test on a small subset before processing thousands of files
- Scans - Recursively walks through directories
- Detects - Identifies file types (image, document, video, audio)
- Extracts - Pulls metadata using exiftool
- Enhances - Falls back to OCR for files without metadata (when tesseract is available)
- Generates - Creates clean, descriptive filenames
- Renames - Updates files (or shows preview in dry-run mode)
Check verbose output:
nameback ~/Pictures --verbose --dry-runCommon reasons:
- Files lack useful metadata (this is normal for many file types)
- Metadata contains only scanner/printer names (filtered out)
- Files are in formats that don't support metadata (TXT, CSV, etc.)
Solution:
- Ensure you have write access to the directory
- Don't run as root (nameback blocks this for safety)
- Check file permissions:
ls -la /path/to/files
Check dependencies:
nameback --check-depsInstall missing OCR tools:
# macOS
brew install tesseract tesseract-lang
# Windows
nameback --install-deps
# Linux (Debian/Ubuntu)
sudo apt-get install tesseract-ocr tesseract-ocr-chi-tra tesseract-ocr-chi-simmacOS: Should work out of the box using sips
Windows/Linux: Install ImageMagick
# Windows
nameback --install-deps
# Linux
sudo apt-get install imagemagick # Debian/Ubuntu
sudo dnf install imagemagick # Fedora/RHELImportant: nameback doesn't keep backups
Options:
- Use version control (git) in your directories
- Always test with
--dry-runfirst - Back up important files before bulk operations
- Use filesystem snapshots (Time Machine, etc.)
Tips:
- Process subdirectories individually
- Use
--skip-hiddento ignore system files - Consider disabling OCR for initial pass (faster, uses only EXIF)
Homebrew isolation (macOS):
# nameback uses standard Homebrew packages
# No conflicts expected with other toolsWindows isolation:
# Tools installed via winget/Chocolatey go to standard paths
# Shouldn't conflict with existing installationsnameback <directory> # Rename files in directory
nameback <directory> --dry-run # Preview changes only--dry-runor-n- Preview changes without modifying files--verboseor-v- Show detailed progress and decisions--skip-hiddenor-s- Skip hidden files (like.DS_Store)--check-deps- Check dependency installation status--install-deps- Install missing dependencies interactively
# Preview changes in Photos folder
nameback ~/Pictures --dry-run
# Process with detailed logging
nameback ~/Documents --verbose
# Skip hidden files
nameback ~/Downloads --skip-hidden
# Check what dependencies are installed
nameback --check-depsMIT License - see LICENSE file for details
Created by Albert Hui (@4n6h4x0r)
Built with Claude Code