<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Aravinda's Blog]]></title><description><![CDATA[Aravinda's Blog]]></description><link>https://aravindagn.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 23:34:55 GMT</lastBuildDate><atom:link href="https://aravindagn.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Build a Fully Local AI Coding Agent with Ollama + OpenCode (No Cloud, No API Keys, No Monthly Bill)]]></title><description><![CDATA[Cloud-based AI coding assistants are great — until you hit a usage cap, worry about sending your code to someone else’s server, or just don’t have Wi-Fi on a flight. What if your coding agent lived en]]></description><link>https://aravindagn.hashnode.dev/how-to-build-a-fully-local-ai-coding-agent-with-ollama-opencode-no-cloud-no-api-keys-no-monthly-bill</link><guid isPermaLink="true">https://aravindagn.hashnode.dev/how-to-build-a-fully-local-ai-coding-agent-with-ollama-opencode-no-cloud-no-api-keys-no-monthly-bill</guid><category><![CDATA[local ai]]></category><category><![CDATA[ollama]]></category><category><![CDATA[AI Coding Assistant]]></category><category><![CDATA[VS Code]]></category><category><![CDATA[Open Source AI]]></category><dc:creator><![CDATA[Aravinda 加阳]]></dc:creator><pubDate>Fri, 11 Sep 2026 14:40:57 GMT</pubDate><content:encoded><![CDATA[<img src="https://cdn.hashnode.com/uploads/covers/60803902c99e200d08f82dbb/83abd600-09b2-4c79-8a48-0938d9479a0a.png" alt="" style="display:block;margin:0 auto" />

<p>Cloud-based AI coding assistants are great — until you hit a usage cap, worry about sending your code to someone else’s server, or just don’t have Wi-Fi on a flight. What if your coding agent lived entirely on <em>your</em> machine instead?</p>
<p>In this guide, I’ll walk you through setting up a completely local AI coding agent using three free tools:</p>
<ul>
<li><p><a href="https://ollama.com"><strong>Ollama</strong></a> — runs AI models locally on your machine</p>
</li>
<li><p><a href="https://ollama.com/library/qwen3"><strong>Qwen3:8B</strong></a> — a lightweight but surprisingly capable open-source model</p>
</li>
<li><p><a href="https://opencode.ai"><strong>OpenCode</strong></a> — an AI coding agent that plugs straight into your terminal and VS Code</p>
</li>
</ul>
<p>No API keys. No cloud bills. No internet required once it’s set up. I tested this whole stack on a mid-range laptop (16GB RAM, 8GB VRAM, RTX 3070), so if your machine can run a modern game, it can probably run this too.</p>
<p>Let’s get into it.</p>
<h2>What You’ll Need</h2>
<ul>
<li><p>A laptop or desktop with at least 8GB of VRAM (or a decent amount of unified/system RAM if you’re on Apple Silicon)</p>
</li>
<li><p><a href="https://nodejs.org">Node.js</a> installed (for OpenCode)</p>
</li>
<li><p>About 10–15 minutes and a few GB of free disk space</p>
</li>
</ul>
<blockquote>
<p>💡 <strong>Picking a model for your hardware:</strong> Qwen3:8B is a solid middle-ground choice — small enough to run smoothly on 8GB of VRAM, but sharp enough to handle real coding tasks. If you’ve got a beefier GPU (16GB+ VRAM), you could size up to a larger Qwen3 variant for better results. If you’re on a lighter laptop, Ollama also has smaller models (like 3B–4B parameter ones) that’ll run more comfortably.</p>
</blockquote>
<h2>Step 1: Install Ollama</h2>
<p>Ollama is the engine that runs the AI model on your machine — think of it as the “server” your coding agent will talk to.</p>
<ol>
<li><p>Head to <a href="http://ollama.com">ollama.com</a> and download the installer for your OS (Windows, macOS, or Linux).</p>
</li>
<li><p>Run the installer like any other app.</p>
</li>
</ol>
<img src="https://aravinda89.github.io/images/ollama-download.png" alt="alt text" style="display:block;margin:0 auto" />

<p>Once it’s installed, Ollama runs quietly in the background and exposes a local API at:</p>
<pre><code class="language-plaintext">http://localhost:11434
</code></pre>
<p>![alt text](<a href="https://aravinda89.github.io/images/Screenshot">https://aravinda89.github.io/images/Screenshot</a> 2026-09-11 111426.png align="center")</p>
<p>You won’t need to touch this URL directly — just know it’s there, because we’ll point OpenCode at it later.</p>
<h2>Step 2: Download the Qwen3:8B Model</h2>
<p>With Ollama installed, open your terminal and pull the model:</p>
<pre><code class="language-plaintext">ollama pull qwen3:8b
</code></pre>
<p>This downloads the model’s weights to your machine (a few gigabytes, so grab a coffee ☕). You’ll see a progress bar as it downloads:</p>
<img src="https://aravinda89.github.io/images/download_progress.png" alt="alt text" style="display:block;margin:0 auto" />

<p>Once it’s done, you’ll see a confirmation that the model is ready to use. That’s it — you now have a full AI model running locally, with zero cloud dependency.</p>
<h2>Step 3: Install OpenCode</h2>
<p>OpenCode is the actual “agent” — the tool that reads your code, understands your prompts, and makes edits, all from your terminal or VS Code.</p>
<p>Install it globally via npm:</p>
<pre><code class="language-plaintext">npm install -g opencode-ai
</code></pre>
<h2>Step 4: Point OpenCode at Ollama</h2>
<p>Now we need to tell OpenCode “hey, don’t call OpenAI or Anthropic — talk to the model running on my own machine instead.” This is done through a config file.</p>
<ol>
<li><p>Create (or open) the <code>opencode.json</code> config file at:</p>
<ul>
<li><p><strong>Windows:</strong> <code>C:\Users\&lt;YourUsername&gt;\.config\opencode\opencode.json</code></p>
</li>
<li><p><strong>macOS/Linux:</strong> <code>~/.config/opencode/opencode.json</code></p>
</li>
</ul>
</li>
<li><p>Paste in the following config (<a href="https://gist.github.com/Aravinda89/a842bb0ed04692e55db53a7e2df10c65">also available as a gist here</a>):</p>
</li>
</ol>
<pre><code class="language-plaintext">{
  "$schema": "https://opencode.ai/config.json",
  "model": "ollama/qwen3:8b",
  "provider": {
    "ollama": {
      "npm": "ollama-ai-provider-v2",
      "name": "Ollama (Local)",
      "options": {
        "baseURL": "http://localhost:11434/api"
      },
      "models": {
        "qwen3:8b": {
          "name": "Qwen3 8B (local)",
          "tool_call": true,
          "limit": { "context": 16384, "output": 4096 }
        }
      }
    }
  }
}
</code></pre>
<p>A quick breakdown of what matters here:</p>
<ul>
<li><p><code>baseURL</code> — points OpenCode to Ollama’s local API instead of a cloud provider</p>
</li>
<li><p><code>tool_call: true</code> — enables the agent to actually run tools/commands, not just chat</p>
</li>
<li><p><code>limit.context</code> — how much text the model can “remember” in a single session (adjust down if you’re low on VRAM)</p>
</li>
</ul>
<h2>Step 5: Fire It Up Inside VS Code</h2>
<ol>
<li><p>Open your project folder in VS Code.</p>
</li>
<li><p>Open the built-in terminal (<code>Ctrl or Cmd+</code>).</p>
</li>
<li><p>Type:</p>
</li>
</ol>
<pre><code class="language-plaintext">opencode
</code></pre>
<ol>
<li>Inside OpenCode, run <code>/models</code> and select <strong>Qwen3 8B</strong> from the list.</li>
</ol>
<img src="https://aravinda89.github.io/images/OpenCode1.png" alt="alt text" style="display:block;margin:0 auto" />

<h2>Step 6: Test Your Local Coding Agent</h2>
<p>Give it a small task — ask it to explain a function, write a test, or refactor a snippet. If it responds and starts editing files, congratulations: you now have a private, offline, zero-subscription AI coding agent running entirely on your own hardware.</p>
<img src="https://aravinda89.github.io/images/OpenCode2.png" alt="alt text" style="display:block;margin:0 auto" />

<h2>Troubleshooting Tips</h2>
<ul>
<li><p><strong>OpenCode can’t connect to the model?</strong> Make sure Ollama is actually running in the background (<code>ollama list</code> should show <code>qwen3:8b</code>).</p>
</li>
<li><p><strong>Responses feel slow?</strong> That’s normal for local inference on consumer hardware — try a smaller model if speed matters more than capability.</p>
</li>
<li><p><strong>Out of memory errors?</strong> Lower the <code>context</code> limit in your config, or switch to a smaller model like a 3B or 4B parameter variant.</p>
</li>
</ul>
<h2>Why Bother Going Local?</h2>
<ul>
<li><p><strong>Privacy</strong> — your code never leaves your machine</p>
</li>
<li><p><strong>No usage limits or subscriptions</strong> — it’s yours, forever, for free</p>
</li>
<li><p><strong>Works offline</strong> — perfect for flights, coffee shops with bad Wi-Fi, or secure environments</p>
</li>
<li><p><strong>Great for learning</strong> — you get hands-on with how these agent tools actually work under the hood</p>
</li>
</ul>
<h2>Frequently Asked Questions</h2>
<p><strong>Do I need a powerful GPU to run this?</strong> No — Qwen3:8B runs comfortably on 8GB of VRAM. Lighter models are available if your hardware is more modest.</p>
<p><strong>Can I use a different model instead of Qwen3:8B?</strong> Yes. Any model available through Ollama can be swapped in — just update the <code>model</code> field in your <code>opencode.json</code> and pull it with <code>ollama pull &lt;model-name&gt;</code>.</p>
<p><strong>Is OpenCode free?</strong> Yes, OpenCode is free and open-source, and pairing it with Ollama means the entire stack costs nothing to run.</p>
<hr />
<p>That’s the whole setup — a private, local AI coding agent with no cloud, no API keys, and no bill at the end of the month. If you try this out, I’d love to hear which model worked best on your hardware.</p>
<p>Written on September 11, 2026</p>
]]></content:encoded></item><item><title><![CDATA[How to Import LM Studio Models into Ollama (No Re-Download!) 🚀]]></title><description><![CDATA[Downloaded a bunch of models in LM Studio? 📦
Now you want to try Ollama… and it wants you to download them all over again? 😩
Nope! In this guide, you’ll learn how to import LM Studio models into Oll]]></description><link>https://aravindagn.hashnode.dev/how-to-import-lm-studio-models-into-ollama-no-re-download</link><guid isPermaLink="true">https://aravindagn.hashnode.dev/how-to-import-lm-studio-models-into-ollama-no-re-download</guid><dc:creator><![CDATA[Aravinda 加阳]]></dc:creator><pubDate>Fri, 11 Sep 2026 03:01:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/60803902c99e200d08f82dbb/c8c16046-883f-4dfa-9073-10b2531a17c2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Downloaded a bunch of models in <strong>LM Studio</strong>? 📦</p>
<p>Now you want to try <strong>Ollama</strong>… and it wants you to download them <strong>all over again</strong>? 😩</p>
<p>Nope! In this guide, you’ll learn how to <strong>import LM Studio models into Ollama</strong> using the <code>.gguf</code> files already on your computer. It takes about 5 minutes. ⏱️</p>
<blockquote>
<p><em>🖥️</em> <em><strong>Example:</strong></em> <em>Qwen3 8B on Windows. Works with any GGUF model.</em></p>
</blockquote>
<h2>⚡ Quick Answer</h2>
<p>Create a one-line Modelfile that points to your LM Studio <code>.gguf</code> file:</p>
<p>Then import and run it:</p>
<p>Want the easy step-by-step version? Let’s go! 👇</p>
<h2>Step 1: Find Your GGUF Model Path in LM Studio 📋</h2>
<p>In LM Studio, go to <strong>My Models</strong> → click <strong>⋯</strong> next to your model → <strong>Copy absolute path</strong>.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*QmOgrpUq4peGFJLW.png" alt="" style="display:block;margin:0 auto" />

<p>It looks something like this:</p>
<h2>Step 2: Create an Ollama Modelfile 📝</h2>
<ol>
<li><p>Create a folder, like <code>C:\ollama-models</code></p>
</li>
<li><p>Inside it, create a file called <code>Modelfile.txt</code></p>
</li>
<li><p>Type <code>FROM</code>, a space, then paste <strong>your</strong> path:</p>
</li>
</ol>
<p>Save it. That’s the whole file. Really! 😄</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*6oJF2cr-B1Vmhb-i.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 3: Install Ollama on Windows ⬇️</h2>
<p>Grab it from the <a href="https://ollama.com/download/windows">official Ollama download page</a> and install.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*J8vrfeD1Iz1-1r9z.png" alt="" style="display:block;margin:0 auto" />

<p>Then open <strong>PowerShell</strong> and type:</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:302/0*InEWgxM_Vg-Iq5ET.png" alt="" />

<p>Empty? Perfect. Let’s fill it up. 👇</p>
<h2>Step 4: Import the Model into Ollama ✨</h2>
<p>💡 <code>qwen3</code> is just a nickname. Call it anything you like!</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*tD0_Gm9uR71KCYpa.png" alt="" style="display:block;margin:0 auto" />

<p>See <strong>success</strong>? You did it! 🎉</p>
<h2>Step 5: Run Your Model in Ollama 👋</h2>
<img src="https://miro.medium.com/v2/resize:fit:400/0*HoS9u6o_3hA4xZNi.png" alt="" />

<p>Type a message, hit <strong>Enter</strong>, and chat away. 💬</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*TPRysr_jKsgjBzeD.png" alt="" style="display:block;margin:0 auto" />

<p>Not a terminal fan? Open the <strong>Ollama app</strong> and pick <code>qwen3</code> from the list. 🖱️</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*ZRG9cT_2FIEBu8Qm.png" alt="" style="display:block;margin:0 auto" />

<img src="https://miro.medium.com/v2/resize:fit:520/0*tlhPZmrZtw78IArD.png" alt="" />

<h2>How to Remove an Imported Model from Ollama 🗑️</h2>
<p>Relax, your LM Studio copy stays safe. 😌</p>
<h2>Troubleshooting 🤔</h2>
<ul>
<li><p><strong>File not found?</strong> Make sure your path ends with <code>.gguf</code> and you ran <code>cd</code> to the right folder first.</p>
</li>
<li><p><code>ollama</code> <strong>not recognized?</strong> Close PowerShell and open it again.</p>
</li>
</ul>
<h2>FAQ ❓</h2>
<p><strong>Does importing save disk space?</strong> No. Ollama makes its own copy of the model. You save download time, not space.</p>
<p><strong>Does this work with any LM Studio model?</strong> Yes, as long as the model is a<code>.gguf</code> file.</p>
<p><strong>Can I delete the model from LM Studio after importing?</strong> Yes! Ollama keeps its own copy, so it will still work. Just test it first. 😉</p>
<p>That’s it! Now you know how to <strong>import LM Studio models into Ollama</strong>. One model, two apps, zero re-downloads. Happy chatting! 🤖</p>
<p><em>Originally published at</em> <a href="https://aravinda89.github.io"><em>https://aravinda89.github.io</em></a> <em>on September 10, 2026.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to Run a Free AI Coding Assistant Locally with VS Code, opencode, and LM Studio]]></title><description><![CDATA[Every AI coding assistant wants your credit card. And your code.
There’s a third option, and it costs nothing: run the whole thing on your own computer. No subscription. No internet. Your code never l]]></description><link>https://aravindagn.hashnode.dev/how-to-run-a-free-ai-coding-assistant-locally-with-vs-code-opencode-and-lm-studio</link><guid isPermaLink="true">https://aravindagn.hashnode.dev/how-to-run-a-free-ai-coding-assistant-locally-with-vs-code-opencode-and-lm-studio</guid><dc:creator><![CDATA[Aravinda 加阳]]></dc:creator><pubDate>Sun, 06 Sep 2026 17:15:18 GMT</pubDate><content:encoded><![CDATA[<p>Every AI coding assistant wants your credit card. And your code.</p>
<p>There’s a third option, and it costs nothing: run the whole thing on your own computer. No subscription. No internet. Your code never leaves your machine.</p>
<p>I set this up on a fairly ordinary PC, and it works. Here’s exactly how.</p>
<h2>What you’re building</h2>
<p>Three pieces working together:</p>
<ul>
<li><p><strong>LM Studio</strong> — runs the AI model on your PC. This is the engine.</p>
</li>
<li><p><strong>opencode</strong> — the coding assistant that reads and edits your files.</p>
</li>
<li><p><strong>VS Code</strong> — where you actually write code.</p>
</li>
</ul>
<p>LM Studio does the thinking. opencode does the work. VS Code is where you sit.</p>
<p><strong>My setup:</strong> Windows, RTX 3070 Ti with 8GB VRAM, 16GB RAM. That’s a mid-range gaming PC, not a workstation. If yours is similar, you’re fine.</p>
<h2>Step 1: Install LM Studio</h2>
<p>Download it from <a href="http://lmstudio.ai">lmstudio.ai</a> and install it like any normal app.</p>
<p>LM Studio lets you download and run open-source AI models directly on your computer. It’s the easiest way into local AI — no command line required.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*sJTHM7h1DOnjjBOa.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 2: Download the model</h2>
<p>Open the search inside LM Studio and look for <strong>qwen3 8b</strong>.</p>
<p>You’ll see a lot of versions. Check these three things before you download:</p>
<p>Why those matter, in plain English:</p>
<p><strong>Quantization is compression.</strong> Q4_K_M shrinks the model so it fits on a smaller graphics card. You lose a little quality, but you gain the ability to actually run it.</p>
<p><strong>Tool use is non-negotiable.</strong> A coding assistant needs to open your files and edit them. A model without tool use can only chat about your code — it can’t touch it. Skip this check and nothing will work later.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*yCYV2Hp-Xajn2HOO.png" alt="" style="display:block;margin:0 auto" />

<p>Got different hardware? Pick a model that fits it. Bigger models are smarter but hungrier. An 8B model is a comfortable fit for 8GB of VRAM.</p>
<p>Once the download finishes, your model shows up under <strong>My Models</strong>.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*kiIRTz_dih_8EhGW.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 3: Load the model</h2>
<p>Go to the <strong>Developer</strong> tab and select your model.</p>
<p>Turn on <strong>“Manually choose model load parameters”</strong>, then click the small arrow next to the model name to open the settings.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*cxLBw-8JCkFkHxnK.png" alt="" style="display:block;margin:0 auto" />

<p>Now find <strong>context size</strong> and set it to <strong>16000</strong>.</p>
<p>Context size is how much text the model can hold in its head at once — your question plus its answer plus whatever code it’s looking at. Bigger context means it understands more of your project. It also eats more VRAM.</p>
<p>16000 is a good number for 8GB. If you have less, go lower. If the model refuses to load, lower it again and try once more.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*V7Mu5bC4KtFIV-D_.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 4: Turn on the server</h2>
<p>Flip the server status to <strong>Running</strong>.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*-xucEZRoVnH622RL.png" alt="" style="display:block;margin:0 auto" />

<p>Your model is now live at <a href="http://127.0.0.1:1234"><code>http://127.0.0.1:1234</code></a>.</p>
<p>That address is your own machine talking to itself. Nothing is going out to the internet — which is the entire point.</p>
<h2>Step 5: Install VS Code and opencode</h2>
<p>Install VS Code if you don’t have it.</p>
<p>Then install opencode. On Windows in command prompt, the simplest route is npm:</p>
<p>Open a terminal inside VS Code ( <strong>Terminal → New Terminal</strong>) and type:</p>
<p>opencode starts up right there in the terminal panel.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*Ub1O7vfHL_gpInLH.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 6: Point opencode at your local model</h2>
<p>Here’s the part that trips people up. opencode has no idea your model exists yet. You have to tell it, using a config file.</p>
<p>Create the config file — <a href="https://gist.github.com/Aravinda89/4e62deab8078d6879282a7b930bf3360">here’s mine</a></p>
<p>save it to:</p>
<p>Swap <code>YOUR_USERNAME</code> for your actual Windows username. If that folder doesn't exist, create it.</p>
<h2>Step 7: Pick your model and test it</h2>
<p>Restart VS Code, then start opencode again.</p>
<p>Type <code>/models</code> and select <strong>qwen/qwen3-8b</strong> from the list.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*GHR3UnYaMjgq-_Ep.png" alt="" style="display:block;margin:0 auto" />

<p>Now ask it to do something real. Give it a file to fix.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*huZUiV02Pq10x92M.png" alt="" style="display:block;margin:0 auto" />

<p>Want proof it’s actually running locally? Switch over to LM Studio and check the logs. You’ll see tokens streaming as the assistant types.</p>
<p>Press enter or click to view image in full size</p>
<img src="https://miro.medium.com/v2/resize:fit:700/0*qRsm-1ZH5YwzoCPc.png" alt="" style="display:block;margin:0 auto" />

<p>That’s your own GPU doing the work.</p>
<h2>What to expect</h2>
<p>Let’s be straight about this: a local 8B model is not going to match Claude or GPT on a hard architectural problem. It’s smaller, and smaller means less capable.</p>
<p>But for the everyday stuff — writing boilerplate, explaining unfamiliar code, catching bugs, renaming things across files — it holds its own. And it’s fast, because there’s no network round trip.</p>
<p>The best part is what it costs: nothing, forever. No token limits. No monthly bill. Works on a plane.</p>
<p>If you have more VRAM than I do, try a larger model. Same steps, better results.</p>
<p><em>Originally published at</em> <a href="https://aravinda89.github.io"><em>https://aravinda89.github.io</em></a> <em>on September 5, 2026.</em></p>
]]></content:encoded></item></channel></rss>