# AIDE — AI Batch Code Operations for VS Code > VS Code extension for AI-powered batch code operations. One-click comments, language conversions, UI-to-code, and AI processing of multiple files simultaneously. ## Install Copy the content below into your project: # AIDE — AI Batch Code Operations for VS Code ## Quick Use **Install from VS Code Marketplace:** 1. Open VS Code 2. Extensions → Search "aide" → Install **AIDE** by nicepkg 3. Open Settings → Search "aide" → Set your API key (OpenAI, Anthropic, or any OpenAI-compatible provider) **First use:** 1. Select code in editor 2. Press `Ctrl+Shift+P` → "AIDE: Ask AI" 3. Or right-click → AIDE menu **Batch file processing:** 1. Select multiple files in Explorer 2. Right-click → "AIDE: Batch Process" 3. Enter instruction (e.g., "Add JSDoc comments to all functions") ## Intro AIDE (AI Development Extension) turns VS Code into a batch-capable AI coding workbench. While most AI code tools work on one file at a time, AIDE lets you apply AI operations across multiple files simultaneously — add comments to an entire project, convert a codebase from JavaScript to TypeScript, or refactor patterns across hundreds of files. Key differentiators: batch processing (select multiple files, apply one AI instruction), code conversion between any languages, screenshot-to-code (paste a UI screenshot, get component code), and smart variable renaming that understands context. ## Details ### Core Features | Feature | What It Does | |---------|--------------| | **Batch AI Processing** | Apply AI instructions to multiple files at once | | **Smart Comments** | One-click: add JSDoc/docstrings to all functions in a file | | **Code Conversion** | Convert between languages (JS→TS, Python→Go, etc.) | | **UI to Code** | Paste screenshot → generate React/Vue/HTML component | | **Variable Renaming** | AI-powered rename that understands semantic meaning | | **Ask AI** | Free-form questions about selected code | | **Code Explanation** | Detailed explanation of complex code blocks | | **Custom Prompts** | Save and reuse your own AI operation templates | ### Batch Processing Examples ``` Select: src/**/*.js (47 files) Instruction: "Convert all files from CommonJS (require) to ES Modules (import)" → AIDE processes all 47 files, converting require() to import statements Select: components/*.vue (12 files) Instruction: "Add TypeScript type annotations to all props" → AIDE adds proper TypeScript types to all Vue component props Select: lib/**/*.py (23 files) Instruction: "Add Google-style docstrings to all public functions" → AIDE generates docstrings for every public function ``` ### LLM Configuration ```json // VS Code settings.json { "aide.openaiKey": "sk-...", "aide.openaiModel": "gpt-4o", // Or use any OpenAI-compatible provider "aide.openaiBaseUrl": "https://api.anthropic.com/v1", // Or local with Ollama "aide.openaiBaseUrl": "http://localhost:11434/v1" } ``` ### Keyboard Shortcuts | Shortcut | Action | |----------|--------| | `Ctrl+Shift+P` → AIDE | All AIDE commands | | Right-click selection | Context menu with AIDE options | | Custom keybindings | Configurable for frequent operations | ## Frequently Asked Questions **Q: Which LLMs are supported?** A: Any OpenAI-compatible API — OpenAI, Anthropic (via proxy), Azure OpenAI, Ollama, Together AI, Groq, etc. **Q: How does batch processing handle errors?** A: If one file fails, AIDE continues with the rest and reports errors at the end. You can retry failed files. **Q: Does it modify files directly?** A: Changes appear as diffs you can accept or reject. Nothing is saved until you confirm. **Q: How many files can I batch process?** A: No hard limit. Practical limit depends on API rate limits and token costs. 50-100 files per batch is typical. ## Works With - VS Code (any version supporting extensions) - OpenAI, Anthropic, Azure, Ollama, any OpenAI-compatible LLM - Any programming language - Windows, macOS, Linux ## Source & Thanks - **GitHub**: [nicepkg/aide](https://github.com/nicepkg/aide) — 2,600+ stars, MIT License - **VS Code Marketplace**: Search "AIDE" by nicepkg --- # AIDE — VS Code AI 批量代码操作 ## 快速使用 VS Code 扩展商店搜索 "aide",安装后在设置中配置 API Key。选中代码右键即可使用。 ## 介绍 VS Code AI 编码扩展。核心特色是**批量处理**:选中多个文件,一条指令批量添加注释、转换语言、重构代码。还支持截图转代码、智能重命名等。2,600+ stars。 ## 来源与感谢 - **GitHub**: [nicepkg/aide](https://github.com/nicepkg/aide) — 2,600+ stars, MIT 许可证 --- Source: https://tokrepo.com/en/workflows/9278070e-cc53-4b4a-bce0-a020fd04eb12 Author: AI Open Source