Turn your local LLM into an overqualified file clerk
It reads your files so it can rename them, because `DSC00412.AVI` tells you nothing.

What it does
ai-renamer is a Node.js CLI that asks a local or remote LLM to suggest sensible names for your files based on what they contain. It extracts frames from videos via ffmpeg, sends images to vision models like Llava, and renames other files by their contents. Your preferences—provider, model, case style, and character limit—are automatically saved to ~/ai-renamer.json.
The interesting bit
This is fundamentally glue code—ffmpeg, an LLM API, and the change-case library wired together—but the wiring is practical. By pulling video frames and routing images to vision-capable models, it turns a generic chat interface into an offline-capable batch renaming utility.
Key highlights
- Supports local inference via Ollama or LM Studio, plus OpenAI for cloud-based renaming
- Handles videos (via
ffmpegframe extraction), images, and general files - Enforces consistent naming conventions with
change-case(kebab, camel, snake, etc.) - Remembers flags like model choice, max filename length, and output language in
~/ai-renamer.json - Offers a custom prompt flag to nudge the model toward specific descriptions
Caveats
- Requires separately installed dependencies: an LLM server (Ollama or LM Studio) and
ffmpegfor video support - First-run auto-selection of the Llava model may fail, forcing manual specification
Verdict
Useful if your Downloads folder is a graveyard of IMG_0001 and screen-recording-final-final. Skip it if you want a fully self-contained binary or already have a rigorous naming scheme.
Frequently asked
- What is ozgrozer/ai-renamer?
- It reads your files so it can rename them, because `DSC00412.AVI` tells you nothing.
- Is ai-renamer open source?
- Yes — ozgrozer/ai-renamer is open source, released under the GPL-3.0 license.
- What language is ai-renamer written in?
- ozgrozer/ai-renamer is primarily written in JavaScript.
- How popular is ai-renamer?
- ozgrozer/ai-renamer has 2.1k stars on GitHub.
- Where can I find ai-renamer?
- ozgrozer/ai-renamer is on GitHub at https://github.com/ozgrozer/ai-renamer.