CLI tool for intelligent file renaming via LLMs
Top 23.5% on sourcepulse
This Node.js CLI tool intelligently renames files based on their content using local LLMs via Ollama or LM Studio, or cloud models via OpenAI. It targets users who manage large collections of media files (images, videos) and need to automate descriptive renaming for better organization. The primary benefit is saving time and improving file discoverability through AI-powered context.
How It Works
The CLI leverages multimodal LLMs (like Llava) or text-based models to analyze file content. For videos, it extracts frames using ffmpeg
and feeds them to the LLM. For images, it uses the image directly. It then prompts the LLM to generate a descriptive filename based on the content, with options to customize output case, character limits, and language.
Quick Start & Requirements
npm install -g ai-renamer
npx ai-renamer /path/to/files
ffmpeg
for video processing.--provider
, --model
, --api-key
, --base-url
can be used and are saved to ~/ai-renamer.json
.npx ai-renamer --help
Highlighted Details
ffmpeg
.Maintenance & Community
The project is open for contributions via issues and pull requests.
Licensing & Compatibility
Limitations & Caveats
Requires local LLM setup (Ollama/LM Studio) and ffmpeg
, which can be resource-intensive. The effectiveness of renaming is dependent on the chosen LLM's capabilities and the quality of the prompts.
5 months ago
Inactive