In the world of file management, naming your files correctly can save you a lot of headaches down the road. Enter AI-Renamer, a Node.js CLI that uses advanced AI models like Ollama and LM Studio to intelligently rename files based on their content. This guide will walk you through everything you need to know to get started!
Prerequisites
- You need to have Ollama or LM Studio installed on your system.
- Make sure to have at least one LLM (Llava, Gemma, Llama etc.) ready to go.
- Install ffmpeg if you’re planning to rename videos.
Getting Started with AI-Renamer
AI-Renamer is easy to get started with, thanks to its intuitive interface. Here’s how to use it:
Installation
- Run it via NPX:
npx ai-renamer path - To install globally, run:
npm install -g ai-renamer - To run it, use:
ai-renamer path
Using Different Providers
AI-Renamer supports multiple providers. Here’s a quick rundown:
Ollama
By default, AI-Renamer uses Ollama. Simply run:
npx ai-renamer images
LM Studio
Specify the provider and let it auto-select your loaded model:
npx ai-renamer path --provider=lm-studio
OpenAI
For OpenAI, set the provider to OpenAI and input your API key:
npx ai-renamer path --provider=openai --api-key=OPENAI_API_KEY
Custom Ports
If you’re using a different port for either Ollama or LM Studio, specify it with:
- Ollama:
npx ai-renamer path --provider=ollama --base-url=http://127.0.0.1:11434 - LM Studio:
npx ai-renamer path --provider=lm-studio --base-url=http://127.0.0.1:1234
Parameter Configuration
AI-Renamer allows various parameters to fine-tune your renaming process. The values you set will be saved to a config file, making it easier to run future commands without repetitive configurations:
npx ai-renamer --help
Understanding the Configuration Parameters
Imagine AI-Renamer as a talented artist preparing for an exhibit. Each parameter is like a different brush she uses to create a masterpiece. Here’s a breakdown of some parameters that can enhance your renaming experience:
- Provider: Selects the AI brain behind the magic.
- API Key: It’s like giving the artist a VIP pass to access more resources.
- Model: Choose whether you want to create a gentle watercolor or a bold oil painting by selecting different models (e.g., Gemma, Llama).
- Case Style: Like the artist’s signature, this chooses how your file names are styled, whether it’s camelCase, snake_case, or kebab-case.
- Include Subdirectories: You can decide if you want to explore beyond the main gallery to rename files deep in the archives.
Troubleshooting Tips
If you’re facing any issues while using AI-Renamer, here are some troubleshooting ideas:
- Check if all prerequisites are installed and up-to-date.
- Verify your provider and model selections for potential misconfigurations.
- If you encounter errors related to the API, ensure that your API keys are correctly input and valid.
- If the application does not recognize your settings, try deleting the config file located at
~/.ai-renamer.jsonand re-running your command.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Final Thoughts
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

