Rename image files based on their visual contents using AI vision models.
Project description
Image Namer
Rename image files based on their visual contents using AI vision models.
Transform generic filenames like IMG_2347.jpg into descriptive names like golden-retriever-puppy--running-in-park.jpg using AI vision analysis.
Features
- 🤖 AI-powered naming using Ollama (local) or OpenAI (cloud)
- 🖥️ Dual interface - Choose command-line (CLI) or graphical (GUI) workflow
- 🏠 Local-first with Ollama for privacy
- ⚡ Intelligent caching to avoid redundant API calls
- 🔄 Idempotent - won't rename already-suitable files
- 📁 Batch processing with recursive folder support
- 📝 Markdown reference updates for Obsidian and standard markdown
- 🔍 Dry-run mode to preview changes safely (CLI)
- ✏️ Manual editing via table double-click (GUI)
- 🎯 Smart collision handling
Quick Start
Installation
Install Image Namer using pipx for a clean, isolated installation:
# Install pipx (if needed)
brew install pipx # macOS
# or: python3 -m pip install --user pipx
# CLI only (lightweight)
pipx install image-namer
# With GUI (includes Qt6 interface)
pipx install 'image-namer[gui]'
# Verify installation
image-namer --help # CLI commands
image-namer-ui # Launch GUI (if installed with [gui])
Why pipx? It installs Python CLI tools in isolated environments, preventing dependency conflicts with other projects.
Setup AI Provider
Image Namer requires an AI vision model. Choose one:
Option 1: Ollama (Recommended - Free & Local)
# Install from https://ollama.com
ollama pull gemma3:27b
Option 2: OpenAI (Cloud - Requires API Key)
export OPENAI_API_KEY='sk-proj-...'
Basic Usage
Command Line (CLI)
# Preview rename (dry-run)
image-namer file photo.jpg
# Apply rename
image-namer file photo.jpg --apply
# Process entire folder
image-namer folder ~/Pictures/screenshots --apply
# Update markdown references
image-namer folder ~/Documents/notes/images --apply --update-refs
Graphical Interface (GUI)
# Launch GUI application
image-namer-ui
# Then use the visual workflow:
# 1. Click "Open Folder" to select directory
# 2. Click "Process" to analyze images
# 3. Review/edit names in table (double-click to edit)
# 4. Click "Apply" to rename files
Documentation
📚 Full Documentation (comprehensive guides and reference)
Quick links:
- Installation Guide - Detailed setup instructions
- Getting Started - Your first rename
- How-To Guides - Step-by-step workflows
- CLI Reference - Complete command docs
Development
Setup
# Clone repository
git clone https://github.com/svetzal/image-namer.git
cd image-namer
# Install with development dependencies (using uv)
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e ".[dev,gui]" # Includes GUI for testing
# Or with pip
pip install -e ".[dev,gui]"
Testing
pytest # Run all tests with coverage
pytest -v --no-cov # Verbose without coverage
flake8 src # Lint code
Documentation
# Install docs dependencies (included in [dev])
pip install -e ".[dev]"
# Serve docs locally
mkdocs serve
# Build docs locally
mkdocs build
Note: Documentation is automatically deployed to GitHub Pages when a new release is published. See docs/GITHUB_PAGES_SETUP.md for details.
Requirements
- Python 3.13 or later
- AI provider: Ollama (local) or OpenAI (cloud)
License
MIT License - see LICENSE
Project Status
🎉 Version 2.0.0 - Production Ready with GUI
Complete Features
✅ Core Functionality
- Single file and batch folder renaming with AI vision analysis
- Smart pre-flight assessment to skip already-suitable files
- Intelligent caching system (dramatically reduces LLM calls)
- Idempotent operations (won't rename if name already matches content)
✅ Dual Interface
- CLI: Command-line workflow with dry-run/apply modes
- GUI: Qt6 graphical interface with visual preview and editing
✅ Markdown Integration
- Automatic reference updates in standard Markdown and Obsidian
- Preserves alt text and aliases
- URL-encoded path handling
✅ AI Providers
- Ollama (local, privacy-focused, default)
- OpenAI (cloud-based)
- Easy provider switching via CLI or environment variables
✅ Developer-Friendly
- Comprehensive tests with high coverage
- Type-safe with Pydantic models
- Well-documented code and APIs
- Flake8 compliant
What's Not Included (By Design)
- Video or PDF processing (images only)
- Multi-language filename support (English slugs)
See CHANGELOG.md for detailed release notes.
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 image_namer-2.0.0.tar.gz.
File metadata
- Download URL: image_namer-2.0.0.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4a747378a84a66ffa73e0266cad5814b66211c3e745c2f2506baa9d7cc605d8
|
|
| MD5 |
420718bbfef40de38cba9904fcd7f6ec
|
|
| BLAKE2b-256 |
b168c810c7308b4012b5f971a3bb6596a406fd7c309407527cda14083b760030
|
Provenance
The following attestation bundles were made for image_namer-2.0.0.tar.gz:
Publisher:
ci.yml on svetzal/image-namer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
image_namer-2.0.0.tar.gz -
Subject digest:
c4a747378a84a66ffa73e0266cad5814b66211c3e745c2f2506baa9d7cc605d8 - Sigstore transparency entry: 662040430
- Sigstore integration time:
-
Permalink:
svetzal/image-namer@ba20346e44a1daaf556bb2e9e020c5807fc1eb71 -
Branch / Tag:
refs/tags/RELEASE_2_0_0 - Owner: https://github.com/svetzal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@ba20346e44a1daaf556bb2e9e020c5807fc1eb71 -
Trigger Event:
release
-
Statement type:
File details
Details for the file image_namer-2.0.0-py3-none-any.whl.
File metadata
- Download URL: image_namer-2.0.0-py3-none-any.whl
- Upload date:
- Size: 49.8 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 |
1c54cf75914f4d64da4b932adb2e13ed1d3551f2e7ede258786e811d07934b32
|
|
| MD5 |
9191dc3a7ad68afda7bca0fb1d5390b5
|
|
| BLAKE2b-256 |
c0ff03b673d26257f6d0bf52f033320558433c6e2faf4f0907fa969b4e1b8524
|
Provenance
The following attestation bundles were made for image_namer-2.0.0-py3-none-any.whl:
Publisher:
ci.yml on svetzal/image-namer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
image_namer-2.0.0-py3-none-any.whl -
Subject digest:
1c54cf75914f4d64da4b932adb2e13ed1d3551f2e7ede258786e811d07934b32 - Sigstore transparency entry: 662040432
- Sigstore integration time:
-
Permalink:
svetzal/image-namer@ba20346e44a1daaf556bb2e9e020c5807fc1eb71 -
Branch / Tag:
refs/tags/RELEASE_2_0_0 - Owner: https://github.com/svetzal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@ba20346e44a1daaf556bb2e9e020c5807fc1eb71 -
Trigger Event:
release
-
Statement type: