ai-renamer: Intelligent File Renamer using AI Models

GitHub Stats Value
Stars 1498
Forks 93
Language JavaScript
Created 2024-07-07
License GNU General Public License v3.0

The ‘ai-renamer’ project is a Node.js CLI tool designed to intelligently rename files based on their contents using advanced language models from Ollama and LM Studio, such as Llava, Gemma, and Llama. This tool simplifies the process of organizing files by automatically generating descriptive names, making it particularly useful for videos, images, and other file types. To use ‘ai-renamer’, you need to have the necessary models and dependencies installed, including ffmpeg for video renaming. It can be run either with NPX or by installing it globally via NPM. This tool is worth exploring for anyone looking to streamline their file management with the power of AI.

The ai-renamer project is a Node.js CLI tool that intelligently renames files based on their contents using AI models from Ollama, LM Studio, or OpenAI. It supports renaming videos, images, and other files. Here are the key features:

  • AI Model Integration: Uses models like Llava, Gemma, Llama, and GPT-4 to generate file names.
  • Providers: Supports Ollama, LM Studio, and OpenAI as providers.
  • Customization: Allows setting parameters such as case style, maximum characters in filenames, output language, and custom prompts.
  • File Handling: Can process files in subdirectories and extract frames from videos.
  • Configuration: Saves configuration to a JSON file for reuse.
  • Installation: Can be run using NPX or installed globally via NPM.

This tool streamlines the process of renaming files based on their content using advanced AI capabilities.

The ai-renamer project is a versatile tool that uses AI models to intelligently rename files based on their contents. Here are some practical examples of how users can benefit from this repository:

  • If you have a collection of videos and want to rename them based on their content, ai-renamer can analyze the video and suggest meaningful names. For instance, a video of a cat playing could be renamed to “Cat Playing with Toy.”
  • Similarly, for a folder full of images, ai-renamer can use AI models to describe the image content and rename the files accordingly. For example, an image of a sunset could be renamed to “Sunset Over Ocean.”
  • This tool is not limited to media files; it can also rename documents, PDFs, or any other type of file based on their content. For example, a document about a project proposal could be renamed to “Project Proposal Document.”

To use ai-renamer, you need to have Ollama or LM Studio installed along with at least one Large Language Model (LLM) like Llava or Gemma. You can run the tool using NPX or install it globally via NPM.

bash

npx ai-renamer /path/to/files
  • Users can customize the renaming process by specifying the provider (--provider), model (--model), case style (--case), and other parameters.
  • For example, to use the ollama provider with a specific model and case style:

    bash

    npx ai-renamer /path --provider=ollama --model=llava:13b --case=camelCase
  • The repository is open for contributions. Users can open issues or make pull requests to enhance the tool.
  • The project is licensed under GPL-3.0, ensuring it remains open-source and community-driven.

By exploring the ai-renamer repository, users can automate the process of renaming files in a meaningful and consistent manner, saving time and improving file organization.

The ai-renamer project is a Node.js CLI tool that leverages AI models from Ollama, LM Studio, and OpenAI to intelligently rename files based on their contents. Here are the key points:

  • Functionality: Renames videos, images, and other files using AI-driven descriptions.
  • Usage: Requires installation of Ollama or LM Studio and specific models. Can be run using NPX or NPM.
  • Customization: Supports various providers, models, and configuration options such as case styling, language, and custom prompts.
  • Future Potential: Offers significant automation in file management, particularly useful for large media collections. It has the potential to integrate with other AI tools and expand its capabilities through community contributions.
  • Community Engagement: Open to contributions via issues and pull requests, licensed under GPL-3.0.

For further insights and to explore the project further, check out the original ozgrozer/ai-renamer repository.

Content derived from the ozgrozer/ai-renamer repository on GitHub. Original materials are licensed under their respective terms.