Intelligent photo renaming tool with AI content analysis, GPS location resolution, and smart organization.
NameForge transforms your photo collection from generic filenames like IMG_1234.jpg into meaningful, contextual names like 2023-08-31_cozy_livingroom.jpg using EXIF metadata, GPS coordinates, and AI-powered content analysis.
Quick Start: Use the convenient nf alias for faster commands!
- 🤖 AI Content Analysis - Uses Ollama vision models to analyze photo content
- 🌍 GPS Location Resolution - Converts GPS coordinates to readable place names
- 📅 Date-based Organization - Automatically sorts photos into date folders
- 💾 Smart Caching - Persistent GPS cache to avoid redundant API calls
- 🎨 Customizable Naming - Multiple case formats and character limits
- 🌈 Beautiful UI - Colorful, emoji-rich terminal interface
- 🏃 Dry Run Mode - Preview changes before applying them
- 📊 Batch Processing - Handle entire photo collections efficiently
Download the latest binary for your platform from GitHub Releases:
macOS (Apple Silicon):
curl -L https://github.com/frontmesh/nameforge/releases/latest/download/nameforge-aarch64-apple-darwin.tar.gz | tar xz
sudo mv nameforge /usr/local/bin/
sudo mv nf /usr/local/bin/macOS (Intel):
curl -L https://github.com/frontmesh/nameforge/releases/latest/download/nameforge-x86_64-apple-darwin.tar.gz | tar xz
sudo mv nameforge /usr/local/bin/
sudo mv nf /usr/local/bin/Linux (x86_64):
curl -L https://github.com/frontmesh/nameforge/releases/latest/download/nameforge-x86_64-unknown-linux-gnu.tar.gz | tar xz
sudo mv nameforge /usr/local/bin/
sudo mv nf /usr/local/bin/Windows: Download nameforge-x86_64-pc-windows-msvc.zip from releases and extract to your PATH.
# Install from Homebrew (coming soon to homebrew-core)
brew install nameforgePrerequisites: Rust 1.70 or later
# Install from crates.io
cargo install nameforge
# Or install from GitHub (latest)
cargo install --git https://github.com/frontmesh/nameforgeArch Linux (AUR):
# Coming soon
yay -S nameforgeWindows (Scoop):
# Coming soon
scoop install nameforge- Ollama (for AI content analysis) - Optional but recommended
macOS:
brew install ollama
brew services start ollama
ollama pull llava-llama3:latestLinux:
curl -fsSL https://ollama.ai/install.sh | sh
ollama pull llava-llama3:latestWindows: Download from ollama.ai
# Rename photos using GPS data (dry run) - uses date-only format by default
nf --input /path/to/photos --dry-run
# Actually rename the files
nf --input /path/to/photos
# Organize into date folders
nf --input /path/to/photos --organize-by-date
# Use full timestamps if needed
nf --input /path/to/photos --full-timestamp --dry-run# Enable AI content analysis
nf --input /path/to/photos --ai-content --dry-run
# Customize AI parameters
nf --input /path/to/photos --ai-content \
--ai-model llava:13b \
--ai-max-chars 15 \
--ai-case snake_case \
--ai-language English# Full-featured example (date-only is default)
nf --input ~/Pictures/Vacation2023 \
--ai-content \
--organize-by-date \
--ai-case snake_case \
--ai-max-chars 20 \
--dry-run
# Process with different AI model and full timestamps
nf --input /path/to/photos \
--ai-content \
--ai-model llava-llama3 \
--ai-case camelCase \
--full-timestamp| Option | Description | Default |
|---|---|---|
--input |
Path to photo directory | Required |
--dry-run |
Preview changes without applying | false |
--organize-by-date |
Create date-based folder structure | false |
--full-timestamp |
Use full timestamp instead of date-only | false |
--ai-content |
Enable AI content analysis | false |
--ai-model |
Ollama model to use | llava:13b |
--ai-max-chars |
Maximum characters for AI filename | 20 |
--ai-case |
Case format (lowercase, uppercase, snake_case, camelCase) | lowercase |
--ai-language |
Language for AI-generated names | English |
- 📁 Scan Directory - Finds all JPEG files in the specified directory
- 📊 Extract EXIF - Reads metadata including date and GPS coordinates
- 🌍 Resolve Location - Converts GPS coordinates to place names via OpenStreetMap
- 🤖 AI Analysis - (Optional) Analyzes image content for descriptive naming
- 📝 Generate Names - Creates meaningful filenames with timestamps and context
- 📂 Organize - (Optional) Sorts into date-based folder structure
YYYY-MM-DD_LocationOrContent.jpg
YYYY-MM-DD_HH-MM-SS_LocationOrContent.jpg
2023-08-31_Paris.jpg(GPS-based, default)2023-08-31_cozy_livingroom.jpg(AI-based, default)2023-08-31_13-12-20_Paris.jpg(GPS-based, with --full-timestamp)2023-09-15_sunset_beach.jpg(AI with snake_case, default)
photos/
├── 2023-08-31/
│ ├── 2023-08-31_13-12-20_Paris.jpg
│ └── 2023-08-31_21-48-55_cozy_livingroom.jpg
├── 2023-09-01/
│ └── 2023-09-01_14-22-45_London.jpg
└── 2023-09-02/
└── 2023-09-02_16-30-12_sunset_beach.jpg
llava:13b(default, balanced accuracy/speed)llava-llama3(faster, good accuracy)llava:34b(higher accuracy, slower)- Any other Ollama vision model
lowercase-beach_sunsetuppercase-BEACH_SUNSETsnake_case-beach_sunsetcamelCase-beachSunset
Supports any language - AI will generate filenames in the specified language:
English(default)SpanishFrenchGerman- etc.
NameForge automatically caches GPS lookups in ~/.nameforge_cache.json to:
- Avoid redundant API calls
- Speed up subsequent runs
- Work offline for previously seen locations
NameForge features a beautiful, colorful terminal interface with:
- 📸 Configuration Display - Shows all active settings
- 📷 Processing Indicators - Visual progress through photo collection
- 🌍 GPS Resolution - Real-time coordinate lookup feedback
- 🤖 AI Analysis - Model processing status and results
- ✨ Results - Highlighted filename generation
- 💁 Dry Run Preview - Clear before → after transformations
Ollama Connection Failed
# Check if Ollama is running
curl http://localhost:11434/api/tags
# Start Ollama service
brew services start ollamaNo GPS Data
- Photos will be named with
NoGPSinstead of location - Consider enabling
--ai-contentfor better naming
EXIF Date Parsing Failed
- Falls back to file modification time
- Warning message will be shown in yellow
Empty AI Response
- Try a different model with
--ai-model - Check Ollama model availability:
ollama list
NameForge is built with a modular architecture:
main.rs- CLI interface and configuration displaylib.rs- Main orchestration logicai.rs- Ollama AI content analysiscache.rs- Persistent GPS cachingexif.rs- EXIF metadata processinggps.rs- GPS coordinate resolutionutils.rs- Utility functions
Contributions are welcome! Areas for improvement:
- Additional AI model support
- More case format options
- Extended EXIF metadata handling
- Performance optimizations
MIT License - feel free to use and modify as needed.
- OpenStreetMap Nominatim for GPS resolution
- Ollama for local AI inference
- Rust Community for excellent crates and tools