<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mallikarjun H T</title>
    <description>The latest articles on DEV Community by Mallikarjun H T (@mallikarjun_ht_719608538).</description>
    <link>https://dev.to/mallikarjun_ht_719608538</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4163831%2F1f49ca4b-45a1-4f50-a3ca-9a3ee31b0923.jpg</url>
      <title>DEV Community: Mallikarjun H T</title>
      <link>https://dev.to/mallikarjun_ht_719608538</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mallikarjun_ht_719608538"/>
    <language>en</language>
    <item>
      <title>Aider: How to Install and Use the AI Pair Programmer in Your Terminal</title>
      <dc:creator>Mallikarjun H T</dc:creator>
      <pubDate>Sun, 22 Nov 2026 06:01:44 +0000</pubDate>
      <link>https://dev.to/mallikarjun_ht_719608538/aider-how-to-install-and-use-the-ai-pair-programmer-in-your-terminal-ad7</link>
      <guid>https://dev.to/mallikarjun_ht_719608538/aider-how-to-install-and-use-the-ai-pair-programmer-in-your-terminal-ad7</guid>
      <description>&lt;p&gt;If you want an AI coding assistant that edits files directly in your repository, runs git commits automatically, and works with both cloud APIs and free local models via Ollama, &lt;strong&gt;Aider&lt;/strong&gt; is one of the fastest tools you can add to your terminal.&lt;/p&gt;

&lt;p&gt;Unlike browser-based chat tools where you constantly copy and paste snippets back and forth, Aider maps your codebase, applies multi-file edits cleanly, and tracks every change with Git.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before installing Aider, make sure you have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python 3.10 to 3.12&lt;/strong&gt; installed (very new releases like Python 3.14 can occasionally lack prebuilt wheels for AI dependencies).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git&lt;/strong&gt; installed and initialized in your project folder (&lt;code&gt;git init&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step 1: Install Aider
&lt;/h2&gt;

&lt;p&gt;Open your terminal (PowerShell on Windows, Terminal on macOS/Linux) and install &lt;code&gt;aider-chat&lt;/code&gt; via &lt;code&gt;pip&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python -m pip install aider-chat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Windows Tip (If &lt;code&gt;aider&lt;/code&gt; is not recognized or you have multiple Python versions)
&lt;/h3&gt;

&lt;p&gt;If you run into PATH issues or dependency build errors on a newer Python version, target &lt;strong&gt;Python 3.12&lt;/strong&gt; explicitly using the Windows Python Launcher:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;3.12&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="n"&gt;pip&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;aider&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the installation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aider --version
&lt;span class="c"&gt;# Or on Windows via Python module:&lt;/span&gt;
py -3.12 -m aider --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 2: Connect an LLM (Cloud or Local)
&lt;/h2&gt;

&lt;p&gt;Aider supports almost every major LLM provider—including Anthropic, OpenAI, Gemini, DeepSeek, and local models via &lt;strong&gt;Ollama&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Option A: Using Cloud Models (Claude, GPT, Gemini)
&lt;/h3&gt;

&lt;p&gt;Set your API key as an environment variable and launch Aider:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;macOS / Linux:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_api_key_here
aider --model claude-3-7-sonnet-latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Windows (PowerShell):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;\&lt;span class="nv"&gt;$env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="no"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_api_key_here"&lt;/span&gt;
&lt;span class="n"&gt;aider&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="n"&gt;claude&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;sonnet&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;latest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Option B: Using Free Local Models with Ollama (Offline &amp;amp; Private)
&lt;/h3&gt;

&lt;p&gt;If you have &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; running locally, you can code completely offline at zero cost:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pull a coding model (for low-RAM/CPU machines, &lt;code&gt;qwen2.5-coder:1.5b&lt;/code&gt; or &lt;code&gt;3b&lt;/code&gt; works great; for GPUs, use &lt;code&gt;7b&lt;/code&gt; or &lt;code&gt;14b&lt;/code&gt;):
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ollama pull qwen2.5-coder:1.5b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Launch Aider pointed at your Ollama model:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   aider --model ollama_chat/qwen2.5-coder:1.5b --no-detect-urls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro Tip for Local Models:&lt;/strong&gt; Adding &lt;code&gt;--no-detect-urls&lt;/code&gt; prevents Aider from launching a headless browser to scrape localhost URLs (like &lt;code&gt;http://127.0.0.1:11434&lt;/code&gt;) if you paste them into your prompt—saving hundreds of megabytes of RAM.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Step 3: Essential Aider Workflow &amp;amp; Commands
&lt;/h2&gt;

&lt;p&gt;Navigate to your project folder and launch Aider with the specific files you want it to edit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; my-project
aider app.py utils.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once inside the Aider prompt, you can type plain English instructions—or use built-in slash commands to control context and Git:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/add &amp;lt;file&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adds a file to the active chat context so Aider can read and edit it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/drop &amp;lt;file&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Removes a file from context to save tokens and keep prompts fast.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/clear&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Clears conversation history (essential for keeping local models fast).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/diff&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shows the exact diff of the last change Aider made.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/undo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Reverts the last Git commit created by Aider if you don't like the edit.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/run &amp;lt;cmd&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Runs a shell command (like &lt;code&gt;pytest&lt;/code&gt; or &lt;code&gt;python app.py&lt;/code&gt;) and shares output with Aider.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/exit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Exits the Aider session.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  4 Best Practices for Getting Clean Code from Aider
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Keep context small:&lt;/strong&gt; Only &lt;code&gt;/add&lt;/code&gt; the 1–3 files relevant to your current task. Smaller context means faster responses, lower API costs, and fewer hallucinations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;/clear&lt;/code&gt; between tasks:&lt;/strong&gt; Once a feature is working and committed, run &lt;code&gt;/clear&lt;/code&gt; before starting an unrelated feature.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write specific, single-task prompts:&lt;/strong&gt; Instead of &lt;em&gt;"Build my entire app,"&lt;/em&gt; ask: &lt;em&gt;"Add a function in &lt;code&gt;utils.py&lt;/code&gt; that parses &lt;code&gt;.vtt&lt;/code&gt; subtitle files and strips timestamps."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let Aider handle Git:&lt;/strong&gt; Aider automatically commits each successful change with a descriptive commit message, making it effortless to roll back with &lt;code&gt;/undo&lt;/code&gt; whenever needed.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>openai</category>
      <category>localhost</category>
    </item>
  </channel>
</rss>
