https://github.com/ozgrozer/ai-renamer

A Node.js CLI that uses Ollama and LM Studio models (Llava, Gemma, Llama etc.) to intelligently rename files by their contents

https://github.com/ozgrozer/ai-renamer

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary

Keywords

ai automation cli-tool file-management file-renamer files image-renamer llama3 lm-studio machine-learning ollama openai video-renamer
Last synced: 5 months ago · JSON representation

Repository

A Node.js CLI that uses Ollama and LM Studio models (Llava, Gemma, Llama etc.) to intelligently rename files by their contents

Basic Info
  • Host: GitHub
  • Owner: ozgrozer
  • License: gpl-3.0
  • Language: JavaScript
  • Default Branch: main
  • Homepage: https://airenamer.app
  • Size: 3.18 MB
Statistics
  • Stars: 1,964
  • Watchers: 14
  • Forks: 134
  • Open Issues: 16
  • Releases: 0
Topics
ai automation cli-tool file-management file-renamer files image-renamer llama3 lm-studio machine-learning ollama openai video-renamer
Created over 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

readme.md

ai-renamer

A Node.js CLI that uses Ollama and LM Studio models (Llava, Gemma, Llama etc.) to intelligently rename files by their contents

npm license

Desktop

For the desktop app, visit airenamer.app

Preview

Rename videos

https://github.com/user-attachments/assets/502aedba-044e-4ed5-a1c7-bca84af2f3ce

Rename images

https://github.com/ozgrozer/ai-renamer/assets/651938/0d229179-8385-4f17-a9fb-44d40c79d1e9

Rename files

https://github.com/user-attachments/assets/f8b37c3a-9cc0-48fc-aaea-f25f7b6ee4cc

Usage

You need to have Ollama or LM Studio and at least one LLM (Llava, Gemma, Llama etc.) installed on your system. You need to have ffmpeg to rename videos.

Run with NPX

bash npx ai-renamer /path

Run with NPM

```bash

Install it globally

npm install -g ai-renamer

Run it

ai-renamer /path ```

Ollama Usage

Ollama is the default provider so you don't have to do anything. You can just run npx ai-renamer /images. At the first launch it will try to auto-select the Llava model but if it couldn't do that you can specify the model.

bash npx ai-renamer /path --provider=ollama --model=llava:13b

LM Studio Usage

You need to set the provider as lm-studio and it will auto-select the loaded model in LM Studio.

bash npx ai-renamer /path --provider=lm-studio

OpenAI Usage

You need to set the provider as openai and the api-key with your API key and it will auto-select the gpt-4o model. But you can assign any model with --model flag.

bash npx ai-renamer /path --provider=openai --api-key=OPENAI_API_KEY

Custom Ports

If you're using a different port in Ollama or LM Studio you could simply specify the base URLs.

bash npx ai-renamer /path --provider=ollama --base-url=http://127.0.0.1:11434 npx ai-renamer /path --provider=lm-studio --base-url=http://127.0.0.1:1234

Params

The values of the flags will be saved to your disk when you use them. You can find the config file at ~/ai-renamer.json. If you're using a Mac it's /Users/your-user-name/ai-renamer.json. Also when you set a flag you don't have to use them again. The script gets the values from this config file.

bash npx ai-renamer --help Options: -h, --help Show help [boolean] --version Show version number [boolean] -p, --provider Set the provider (e.g. ollama, openai, lm-studio) [string] -a, --api-key Set the API key if you're using openai as provider [string] -u, --base-url Set the API base URL (e.g. http://127.0.0.1:11434 for ollama) [string] -m, --model Set the model to use (e.g. gemma2, llama3, gpt-4o) [string] -f, --frames Set the maximum number of frames to extract from videos (e.g. 3, 5, 10) [number] -c, --case Set the case style (e.g. camelCase, pascalCase, snakeCase, kebabCase) [string] -x, --chars Set the maximum number of characters in the new filename (e.g. 25) [number] -l, --language Set the output language (e.g. English, Turkish) [string] -s, --include-subdirectories Include files in subdirectories when processing (e.g: true, false) [string] -r, --custom-prompt Add a custom prompt to the LLM (e.g. "Only describe the background") [string]

ai-renamer uses change-case library for case styling

```bash

value: result

camelCase: twoWords capitalCase: Two Words constantCase: TWOWORDS dotCase: two.words kebabCase: two-words noCase: two words pascalCase: TwoWords pascalSnakeCase: TwoWords pathCase: two/words sentenceCase: Two words snakeCase: two_words trainCase: Two-Words ```

Contribution

Feel free to contribute. Open a new issue, or make a pull request.

License

GPL-3.0

Owner

  • Name: Ozgur Ozer
  • Login: ozgrozer
  • Kind: user
  • Location: Antalya, Turkey
  • Company: vhizo.com, shopiket.com, dislack.com

Software developer

GitHub Events

Total
  • Issues event: 6
  • Watch event: 387
  • Issue comment event: 6
  • Push event: 1
  • Pull request review comment event: 1
  • Pull request event: 1
  • Fork event: 30
Last Year
  • Issues event: 6
  • Watch event: 387
  • Issue comment event: 6
  • Push event: 1
  • Pull request review comment event: 1
  • Pull request event: 1
  • Fork event: 30

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 132
  • Total Committers: 2
  • Avg Commits per committer: 66.0
  • Development Distribution Score (DDS): 0.023
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
mac o****r@l****m 129
thomastunc1 t****c@i****m 3
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 23
  • Total pull requests: 6
  • Average time to close issues: 4 days
  • Average time to close pull requests: about 4 hours
  • Total issue authors: 21
  • Total pull request authors: 4
  • Average comments per issue: 2.78
  • Average comments per pull request: 0.17
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 11
  • Pull requests: 3
  • Average time to close issues: about 14 hours
  • Average time to close pull requests: 2 minutes
  • Issue authors: 10
  • Pull request authors: 2
  • Average comments per issue: 0.82
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • HorusPi (2)
  • barakplasma (2)
  • goutham-kaluvakolu (1)
  • ondrovic (1)
  • victornavorskie (1)
  • tommitytom (1)
  • Bit0r (1)
  • mgalde (1)
  • Aleonor1 (1)
  • SaevenTH (1)
  • Lutraphobia (1)
  • bennyc0730 (1)
  • 521xueweihan (1)
  • sumukshashidhar (1)
  • PhantasWeng (1)
Pull Request Authors
  • mishalhossin (4)
  • ozgrozer (4)
  • thomastunc (2)
  • barakplasma (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

package-lock.json npm
  • 261 dependencies
package.json npm
  • standard ^17.1.0 development
  • ollama ^0.5.2
  • pdf-parse ^1.1.1
  • yargs ^17.7.2