> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-hi/ai-1/aider.md).

# Aider AI कोडिंग

Clore.ai पर Aider के साथ टर्मिनल-आधारित AI कोडिंग — Git-aware, मल्टी-फ़ाइल, Ollama के माध्यम से लोकल मॉडल

Aider एक टर्मिनल-आधारित AI कोडिंग सहायक है, जिसके 39K+ GitHub stars हैं। यह सीधे आपके repo में फ़ाइलों को संपादित करता है, Git commits अपने आप बनाता है, और cloud APIs (OpenAI, Anthropic) तथा Ollama के माध्यम से पूरी तरह local models — दोनों को सपोर्ट करता है। Clore.ai GPU पर, आप DeepSeek-R1 32B या Qwen2.5-Coder-32B जैसे बड़े coding models पूरी तरह अपने hardware पर चला सकते हैं — निजी, तेज़, और किफ़ायती।

{% hint style="success" %}
सभी उदाहरण GPU servers पर चलते हैं, जो से किराए पर लिए गए हैं [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace).
{% endhint %}

## मुख्य विशेषताएँ

* **टर्मिनल-नेटिव** — SSH के जरिए काम करता है, बिना-स्क्रीन Clore.ai servers के लिए बिल्कुल उपयुक्त
* **Git-aware** — हर बदलाव को वर्णनात्मक संदेशों के साथ अपने आप commit करता है, समीक्षा और वापस लेने में आसान
* **कई फ़ाइलों का संपादन** — context में कई फ़ाइलें जोड़ें और उन्हें एक साथ संपादित करें
* **Local model support** — पूरी तरह निजी, zero-API-cost coding के लिए Ollama से कनेक्ट करें
* **Architect mode** — योजना बनाने के लिए एक मज़बूत reasoning model का उपयोग करें, फिर लागू करने के लिए तेज़ model का
* **Repository map** — context-aware edits के लिए आपके codebase को अपने आप index करता है
* **Linting और testing** — हर edit के बाद linters/tests चलाएँ, failures को अपने आप ठीक करें
* **आवाज़ इनपुट** — माइक्रोफ़ोन के माध्यम से coding निर्देश बोलकर दें

## आवश्यकताएँ

| घटक    | न्यूनतम        | अनुशंसित       |
| ------ | -------------- | -------------- |
| GPU    | RTX 3060 12 GB | RTX 4090 24 GB |
| VRAM   | 12 GB          | 24 GB          |
| RAM    | 16 GB          | 32 GB          |
| डिस्क  | 30 GB          | 60 GB          |
| Python | 3.9            | 3.11           |

**Clore.ai pricing:** RTX 4090 ≈ $0.14–0.42/घं · RTX 3090 ≈ $0.07–0.21/घं · RTX 3060 ≈ $0.03–0.07/घं

केवल cloud-only models (कोई local inference नहीं) के लिए GPU की आवश्यकता नहीं है — लेकिन Clore.ai GPUs आपको पूर्ण privacy के लिए Ollama models स्थानीय रूप से चलाने देते हैं।

## त्वरित शुरुआत

### 1. Aider इंस्टॉल करें

```bash
pip install aider-chat
```

### 2. Local Models के लिए Ollama सेट अप करें

```bash
# Ollama इंस्टॉल करें
curl -fsSL https://ollama.com/install.sh | sh

# एक coding model pull करें
ollama pull deepseek-r1:32b

# या कम VRAM के लिए एक छोटा model
ollama pull qwen2.5-coder:7b
```

### 3. Local Model के साथ Aider शुरू करें

```bash
cd /workspace/your-project

# Ollama के माध्यम से DeepSeek-R1 32B का उपयोग करें (लगभग 20 GB VRAM चाहिए)
aider --model ollama/deepseek-r1:32b

# या RTX 3060 पर एक छोटा model उपयोग करें
aider --model ollama/qwen2.5-coder:7b
```

### 4. Coding शुरू करें

Aider REPL के अंदर:

```
> /add src/main.py src/utils.py
> parse_config function में error handling जोड़ें और इसके लिए unit tests लिखें
```

Aider करेगा:

1. फ़ाइलें पढ़ेगा और codebase को समझेगा
2. बदलावों को diff के रूप में प्रस्तावित करेगा
3. बदलावों को disk पर लागू करेगा
4. एक वर्णनात्मक संदेश के साथ Git commit बनाएगा

## उपयोग के उदाहरण

### Architect Mode (Two-Model Setup)

reasoning के लिए एक मज़बूत model और code generation के लिए एक तेज़ model का उपयोग करें:

```bash
# Cloud architect + local editor
aider --architect --model ollama/deepseek-r1:32b --editor-model ollama/qwen2.5-coder:7b
```

architect model बदलावों की योजना बनाता है, और editor model वास्तविक code लिखता है — उच्च-गुणवत्ता reasoning को तेज़ implementation के साथ जोड़ता है।

### फ़ाइलें जोड़ें और संपादित करें

```bash
# chat context में विशिष्ट फ़ाइलें जोड़ें
> /add src/api/routes.py src/models/user.py

# बदलाव माँगें
> user registration endpoint को async/await का उपयोग करने के लिए refactor करें और Pydantic के साथ input validation जोड़ें

# पूरी directory जोड़ें
> /add src/tests/

# edit के बाद tests चलाएँ
> /test pytest src/tests/ -v
```

### Cloud APIs के साथ उपयोग करें

```bash
# OpenAI
export OPENAI_API_KEY=sk-...
aider --model gpt-4o

# Anthropic
export ANTHROPIC_API_KEY=sk-ant-...
aider --model claude-sonnet-4-20250514
```

### Git Integration

```bash
# हर बदलाव अपने आप एक commit बनाता है
git log --oneline -5
# a1b2c3d aider: parse_config में error handling जोड़ें
# d4e5f6g aider: parse_config के लिए unit tests लिखें
# h7i8j9k aider: user registration endpoint को refactor करें

# आख़िरी aider बदलाव वापस लें
aider --undo
```

### Lint और Auto-Fix

```bash
# एक linter कॉन्फ़िगर करें
aider --lint-cmd "ruff check --fix" --auto-lint

# Aider हर edit के बाद linter चलाता है और समस्याएँ अपने आप ठीक करता है
```

### Non-Interactive (Scripted) Mode

```bash
# एक single instruction चलाएँ और exit करें
aider --model ollama/deepseek-r1:32b \
  --message "src/utils.py में सभी functions में type hints जोड़ें" \
  --yes  # बदलाव अपने आप स्वीकार करें
```

## Model Recommendations

| मॉडल                  | VRAM    | गति   | गुणवत्ता | किसके लिए सर्वोत्तम    |
| --------------------- | ------- | ----- | -------- | ---------------------- |
| deepseek-r1:32b       | \~20 GB | मध्यम | उच्च     | जटिल refactoring       |
| qwen2.5-coder:32b     | \~20 GB | मध्यम | उच्च     | Code generation        |
| qwen2.5-coder:7b      | \~5 GB  | तेज़  | अच्छा    | त्वरित edits, RTX 3060 |
| codellama:34b         | \~20 GB | मध्यम | अच्छा    | पुराना code, C/C++     |
| deepseek-coder-v2:16b | \~10 GB | तेज़  | अच्छा    | संतुलित प्रदर्शन       |

## सुझाव

* **उपयोग करें `/add` चुनिंदा रूप से** — केवल वही फ़ाइलें जोड़ें जिन्हें Aider को देखना ज़रूरी है। बहुत सारी फ़ाइलें context tokens बर्बाद करती हैं
* **Architect mode** जटिल बदलावों के लिए शक्तिशाली है — reasoning model उन edge cases को पकड़ता है जिन्हें editor model चूक सकता है
* **`/undo`** Git के माध्यम से आख़िरी बदलाव को साफ़-सुथरे तरीके से वापस लाता है — बेझिझक प्रयोग करें
* **`/diff`** लागू करने से पहले प्रस्तावित बदलाव दिखाता है — समीक्षा के लिए उपयोग करें
* **सेट करें `--auto-commits`** (डिफ़ॉल्ट) हर AI बदलाव के पूरे Git इतिहास के लिए
* **उपयोग करें `.aiderignore`** repo map से फ़ाइलों को बाहर रखने के लिए (node\_modules, .venv, आदि)
* **बड़े repos के लिए**Aider का repo map model को code संरचना समझने में मदद करता है — पहली बार load होने पर इसे चलने दें
* **edit के बाद tests चलाएँ** — `/test pytest` regressions को तुरंत पकड़ता है

## समस्या निवारण

| समस्या                                 | समाधान                                                                                       |
| -------------------------------------- | -------------------------------------------------------------------------------------------- |
| Ollama model बहुत धीमा है              | छोटी quantization (q4\_0) या छोटा model उपयोग करें                                           |
| `CUDA out of memory` Ollama के साथ     | एक छोटा model variant pull करें या उपयोग करें `OLLAMA_NUM_GPU=0` CPU के लिए                  |
| Git commit errors                      | सुनिश्चित करें `git config user.email` और `user.name` सेट हैं                                |
| Aider मेरी फ़ाइलों को ignore कर रहा है | उपयोग करें `/add filename.py` स्पष्ट रूप से — Aider केवल जोड़ी गई फ़ाइलें ही संपादित करता है |
| Model खराब edits बनाता है              | एक मज़बूत model आज़माएँ, या architect mode का उपयोग करें                                     |
| Connection refused (Ollama)            | सुनिश्चित करें कि Ollama चल रहा है: `ollama serve` या `systemctl start ollama`               |
| Context window exceeded                | के साथ फ़ाइलें हटाएँ `/drop`; केवल प्रासंगिक फ़ाइलें रखें                                    |

## संसाधन

* [Aider GitHub](https://github.com/Aider-AI/aider)
* [Aider Documentation](https://aider.chat)
* [Ollama Model Library](https://ollama.com/library)
* [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-hi/ai-1/aider.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
