{"id":13494882,"url":"https://github.com/ozgrozer/ai-renamer","last_synced_at":"2025-10-23T02:43:12.511Z","repository":{"id":247252528,"uuid":"825279449","full_name":"ozgrozer/ai-renamer","owner":"ozgrozer","description":"A Node.js CLI that uses Ollama and LM Studio models (Llava, Gemma, Llama etc.) to intelligently rename files by their contents","archived":false,"fork":false,"pushed_at":"2025-02-09T14:58:12.000Z","size":3332,"stargazers_count":1843,"open_issues_count":15,"forks_count":120,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-05-11T01:35:53.908Z","etag":null,"topics":["ai","automation","cli-tool","file-management","file-renamer","files","image-renamer","llama3","lm-studio","machine-learning","ollama","openai","video-renamer"],"latest_commit_sha":null,"homepage":"https://airenamer.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ozgrozer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-07T10:44:27.000Z","updated_at":"2025-05-11T00:45:25.000Z","dependencies_parsed_at":"2024-07-10T19:59:29.110Z","dependency_job_id":"8ebc9c4c-70ee-40d2-9843-ff8523e93caf","html_url":"https://github.com/ozgrozer/ai-renamer","commit_stats":{"total_commits":131,"total_committers":3,"mean_commits":"43.666666666666664","dds":"0.022900763358778664","last_synced_commit":"4116039b224e8a066b66045d3ef7edae26cc7ce2"},"previous_names":["ozgrozer/ai-renamer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozgrozer%2Fai-renamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozgrozer%2Fai-renamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozgrozer%2Fai-renamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozgrozer%2Fai-renamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozgrozer","download_url":"https://codeload.github.com/ozgrozer/ai-renamer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672701,"owners_count":21945480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","automation","cli-tool","file-management","file-renamer","files","image-renamer","llama3","lm-studio","machine-learning","ollama","openai","video-renamer"],"created_at":"2024-07-31T19:01:29.101Z","updated_at":"2025-10-23T02:43:12.417Z","avatar_url":"https://github.com/ozgrozer.png","language":"JavaScript","funding_links":[],"categories":["CLIs","JavaScript","automation"],"sub_categories":[],"readme":"# ai-renamer\n\nA Node.js CLI that uses Ollama and LM Studio models (Llava, Gemma, Llama etc.) to intelligently rename files by their contents\n\n[![npm](https://img.shields.io/npm/v/ai-renamer.svg?style=flat-square)](https://www.npmjs.com/package/ai-renamer)\n[![license](https://img.shields.io/npm/l/ai-renamer?style=flat-square)](https://github.com/ozgrozer/ai-renamer/blob/main/license)\n\n## Desktop\n\nFor the desktop app, visit [airenamer.app](https://airenamer.app)\n\n## Preview\n\nRename videos\n\nhttps://github.com/user-attachments/assets/502aedba-044e-4ed5-a1c7-bca84af2f3ce\n\nRename images\n\nhttps://github.com/ozgrozer/ai-renamer/assets/651938/0d229179-8385-4f17-a9fb-44d40c79d1e9\n\nRename files\n\nhttps://github.com/user-attachments/assets/f8b37c3a-9cc0-48fc-aaea-f25f7b6ee4cc\n\n## Usage\n\nYou need to have [Ollama](https://ollama.com/download) or [LM Studio](https://lmstudio.ai/) and at least one LLM (Llava, Gemma, Llama etc.) installed on your system. You need to have [ffmpeg](https://www.ffmpeg.org/download.html) to rename videos.\n\nRun with NPX\n\n```bash\nnpx ai-renamer /path\n```\n\nRun with NPM\n\n```bash\n# Install it globally\nnpm install -g ai-renamer\n\n# Run it\nai-renamer /path\n```\n\n## Ollama Usage\n\nOllama 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.\n\n```bash\nnpx ai-renamer /path --provider=ollama --model=llava:13b\n```\n\n## LM Studio Usage\n\nYou need to set the provider as `lm-studio` and it will auto-select the loaded model in LM Studio.\n\n```bash\nnpx ai-renamer /path --provider=lm-studio\n```\n\n## OpenAI Usage\n\nYou 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.\n\n```bash\nnpx ai-renamer /path --provider=openai --api-key=OPENAI_API_KEY\n```\n\n## Custom Ports\n\nIf you're using a different port in Ollama or LM Studio you could simply specify the base URLs.\n\n```bash\nnpx ai-renamer /path --provider=ollama --base-url=http://127.0.0.1:11434\nnpx ai-renamer /path --provider=lm-studio --base-url=http://127.0.0.1:1234\n```\n\n## Params\n\nThe 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.\n\n```bash\nnpx ai-renamer --help\nOptions:\n  -h, --help                    Show help                              [boolean]\n      --version                 Show version number                    [boolean]\n  -p, --provider                Set the provider (e.g. ollama, openai,\n                                lm-studio)                              [string]\n  -a, --api-key                 Set the API key if you're using openai as\n                                provider                                [string]\n  -u, --base-url                Set the API base URL (e.g.\n                                http://127.0.0.1:11434 for ollama)      [string]\n  -m, --model                   Set the model to use (e.g. gemma2, llama3,\n                                gpt-4o)                                 [string]\n  -f, --frames                  Set the maximum number of frames to extract from\n                                videos (e.g. 3, 5, 10)                  [number]\n  -c, --case                    Set the case style (e.g. camelCase, pascalCase,\n                                snakeCase, kebabCase)                   [string]\n  -x, --chars                   Set the maximum number of characters in the new\n                                filename (e.g. 25)                      [number]\n  -l, --language                Set the output language (e.g. English, Turkish)\n                                                                        [string]\n  -s, --include-subdirectories  Include files in subdirectories when processing\n                                (e.g: true, false)                      [string]\n  -r, --custom-prompt           Add a custom prompt to the LLM (e.g. \"Only\n                                describe the background\")               [string]\n```\n\n`ai-renamer` uses `change-case` library for case styling\n\n```bash\n# value: result\ncamelCase: twoWords\ncapitalCase: Two Words\nconstantCase: TWO_WORDS\ndotCase: two.words\nkebabCase: two-words\nnoCase: two words\npascalCase: TwoWords\npascalSnakeCase: Two_Words\npathCase: two/words\nsentenceCase: Two words\nsnakeCase: two_words\ntrainCase: Two-Words\n```\n\n## Contribution\n\nFeel free to contribute. Open a new [issue](https://github.com/ozgrozer/ai-renamer/issues), or make a [pull request](https://github.com/ozgrozer/ai-renamer/pulls).\n\n## License\n\n[GPL-3.0](https://github.com/ozgrozer/ai-renamer/blob/main/license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozgrozer%2Fai-renamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozgrozer%2Fai-renamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozgrozer%2Fai-renamer/lists"}