{"id":50964376,"url":"https://github.com/sinedied/amv","last_synced_at":"2026-06-18T18:01:46.153Z","repository":{"id":363547359,"uuid":"1000131535","full_name":"sinedied/amv","owner":"sinedied","description":"AI-powered bulk file and folder renaming tool with a simple web interface.","archived":false,"fork":false,"pushed_at":"2026-01-03T16:30:48.000Z","size":89,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-09T11:31:29.271Z","etag":null,"topics":["ai","cli","fastify","lit","llm","nodejs","ollama","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinedied.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-06-11T10:04:47.000Z","updated_at":"2026-01-03T16:30:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sinedied/amv","commit_stats":null,"previous_names":["sinedied/amv"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sinedied/amv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Famv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Famv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Famv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Famv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinedied","download_url":"https://codeload.github.com/sinedied/amv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinedied%2Famv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34501482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","cli","fastify","lit","llm","nodejs","ollama","typescript"],"created_at":"2026-06-18T18:01:45.008Z","updated_at":"2026-06-18T18:01:46.148Z","avatar_url":"https://github.com/sinedied.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amv - Quick AI Renamer\n\nAI-powered bulk file and folder renaming tool with a simple web interface.\n\n## Features\n\n- 🤖 **AI-Powered**: Uses local LLM (Ollama), OpenAI, or Azure OpenAI to suggest intelligent file names\n- 🔄 **Model Selection**: Override AI model directly from the web interface\n- 🖱️ **Drag \u0026 Drop**: Easy file and folder selection\n- 🌐 **Web Interface**: Clean, responsive UI that opens automatically\n- 📝 **Rule-Based**: Define custom renaming rules in natural language\n- 💾 **Persistent Settings**: Rules and model preferences are saved locally\n- ⚡ **Batch Operations**: Rename multiple files and folders at once\n- 🚀 **One Command**: Single CLI command to start everything\n\n## Prerequisites\n\n- Node.js v20 or higher\n- One of the following AI providers:\n  - [Ollama](https://ollama.ai/) running locally with a supported model (default: `ministral-3`)\n  - OpenAI API key (set `OPENAI_API_KEY` environment variable)\n  - Azure OpenAI endpoint and API key (set `AZURE_OPENAI_API_ENDPOINT` and `AZURE_OPENAI_API_KEY` environment variables)\n\n## Installation\n\n```bash\nnpm install -g amv\n```\n\nOr run directly from source:\n\n```bash\ngit clone https://github.com/sinedied/ai-renamer.git\ncd ai-renamer\nnpm install\nnpm run build\nnpm start\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\namv\n```\n\nThis will:\n1. Start a local web server\n2. Open your browser to the application\n3. Display the renaming interface\n\n### CLI Options\n\n```bash\namv [options]\n\nOptions:\n  -p, --port \u003cport\u003e    Port to run the server on (default: 3000)\n  -m, --model \u003cmodel\u003e  AI model to use (default: ministral-3)\n  --no-open            Do not open browser automatically\n  -h, --help           Display help for command\n```\n\n### Examples\n\n```bash\n# Use a different port\namv --port 8080\n\n# Use a different AI model\namv --model llama3\n\n# Start server without opening browser\namv --no-open\n```\n\n## How It Works\n\n1. **Configure Settings**: Set your preferred AI model and renaming rules\n2. **Add Files**: Drag and drop files/folders or use the browse button\n3. **Generate Suggestions**: Click \"Generate AI Suggestions\" to get AI-powered name suggestions\n4. **Preview**: Review the original and suggested names in the table\n5. **Rename**: Click \"Rename Files\" to apply the changes\n\n### Model Selection\n\nThe web interface includes an AI model field where you can specify which AI provider and model to use:\n- **Default**: `ministral-3` (Ollama model, can be overridden via CLI `--model` flag)\n- **Ollama**: Enter any available Ollama model name (e.g., `llama3`, `mistral`, etc.)\n- **OpenAI**: Use `openai:` prefix followed by model name (e.g., `openai:gpt-4o`, `openai:gpt-4o-mini`)\n- **Azure OpenAI**: Use `azure:` prefix followed by deployment name (e.g., `azure:gpt-4o`)\n- **Persistence**: Your model preference is saved in browser localStorage\n\n## AI Providers\n\n### Ollama (Default)\n\nNo configuration required. Make sure [Ollama](https://ollama.ai/) is running locally:\n\n```bash\n# Start Ollama (if not already running)\nollama serve\n\n# Pull a model if needed\nollama pull ministral-3\n```\n\n### OpenAI\n\nSet the `OPENAI_API_KEY` environment variable:\n\n```bash\n# Linux/macOS\nexport OPENAI_API_KEY=\"sk-...\"\n\n# Windows (PowerShell)\n$env:OPENAI_API_KEY=\"sk-...\"\n\n# Or use a .env file in the current directory\necho \"OPENAI_API_KEY=sk-...\" \u003e .env\n```\n\nOptionally, set `OPENAI_BASE_URL` to use a custom API endpoint (e.g., for OpenAI-compatible APIs or proxies):\n\n```bash\n# Linux/macOS\nexport OPENAI_BASE_URL=\"https://your-proxy.example.com/v1\"\n\n# Windows (PowerShell)\n$env:OPENAI_BASE_URL=\"https://your-proxy.example.com/v1\"\n\n# Or use a .env file\necho \"OPENAI_BASE_URL=https://your-proxy.example.com/v1\" \u003e\u003e .env\n```\n\nThen use OpenAI models with the `openai:` prefix:\n\n```bash\namv --model openai:gpt-4o\n# or in the web interface: openai:gpt-4o-mini\n```\n\n### Azure OpenAI\n\nSet the required environment variables:\n\n```bash\n# Linux/macOS\nexport AZURE_OPENAI_API_ENDPOINT=\"https://your-resource.openai.azure.com\"\nexport AZURE_OPENAI_API_KEY=\"your-api-key\"\n\n# Windows (PowerShell)\n$env:AZURE_OPENAI_API_ENDPOINT=\"https://your-resource.openai.azure.com\"\n$env:AZURE_OPENAI_API_KEY=\"your-api-key\"\n\n# Or use a .env file in the current directory\necho \"AZURE_OPENAI_API_ENDPOINT=https://your-resource.openai.azure.com\" \u003e .env\necho \"AZURE_OPENAI_API_KEY=your-api-key\" \u003e\u003e .env\n```\n\nThen use Azure deployments with the `azure:` prefix:\n\n```bash\namv --model azure:gpt-4o\n# or in the web interface: azure:your-deployment-name\n```\n\n## Example Renaming Rules\n\n- \"Convert to kebab-case and remove spaces\"\n- \"Add YYYY-MM-DD date prefix to all files\"\n- \"Convert to lowercase and replace spaces with underscores\"\n- \"Remove special characters and use camelCase\"\n- \"Add project prefix 'myapp-' to all files\"\n\n## Tech Stack\n\n- **Frontend**: Lit v3 web components, modern CSS\n- **Backend**: Fastify server with REST API\n- **CLI**: Commander.js\n- **AI**: OpenAI SDK with support for Ollama, OpenAI, and Azure OpenAI\n- **Build**: Vite with TypeScript\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Start development mode with file watching\nnpm run dev\n\n# Type check without building\nnpm run type-check\n```\n\n## API Endpoints\n\n- `GET /` - Web interface\n- `GET /api/health` - Health check and model info\n- `POST /api/suggest-names` - Generate AI suggestions for file names\n- `POST /api/rename-files` - Execute the file renaming operation\n\n## License\n\nMIT\n\n## Inspiration\n\nThis project was inspired by [BulkRenameUtility](https://github.com/XXXiaofeng/BulkRenameUtility).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinedied%2Famv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinedied%2Famv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinedied%2Famv/lists"}