{"slug": "ai-pair-programming-in-your-terminal-with-aider-and-ollama", "title": "AI Pair Programming in Your Terminal with Aider and Ollama", "summary": "A developer combined Aider, an AI pair programming tool, with Ollama running local models like Qwen3 Coder 30B to create a fully private coding assistant that works in the terminal. The setup reads files, understands git repos, makes real edits, and commits changes with sensible messages, all without sending code to the cloud. On an RTX 4090, the Qwen3 Coder 30B at Q4 achieves 15-20 tok/s for real-time suggestions.", "body_md": "Want an AI coding assistant that works on YOUR codebase, respects YOUR git history, and doesn't send your code to the cloud? Aider + Ollama gives you exactly that.\n\nAider is an AI pair programming tool that works directly in your terminal. It sees your files, understands your git repo, and makes real edits to your code. Paired with Ollama running a local model, you get a fully private coding assistant.\n\n```\n# Install Aider\npip install aider-chat\n\n# Pull a capable coding model\nollama pull qwen3-coder:30b-a3b\n```\n\nSet Aider to use your local Ollama model:\n\n```\n# For bash/zsh\nexport OLLAMA_CONTEXT_LENGTH=8192\n\n# Run Aider with Ollama\naider --model ollama_chat/qwen3-coder:30b-a3b --editor\n```\n\nFor persistent config, create `.env`\n\nin your project:\n\n```\nOLLAMA_CONTEXT_LENGTH=8192\nAIDER_MODEL=ollama_chat/qwen3-coder:30b-a3b\n# Start Aider in your project directory\ncd my-project\naider --model ollama_chat/qwen3-coder:30b-a3b\n\n# Now just describe what you want:\n# \"Add error handling to the API routes\"\n# \"Refactor the database connection into a singleton\"\n# \"Write unit tests for the user service\"\n```\n\nAider reads your files, makes changes, and commits them with sensible messages. You approve each change before it's applied.\n\nOn a **RTX 4090** with Qwen3 Coder 30B at Q4: ~15-20 tok/s, enough for real-time code suggestions.\n\nQwen2.5 Coder 14B runs faster (~35 tok/s) and fits on a 12GB GPU, great for smaller projects.\n\n*Originally published on everylocalai.com*", "url": "https://wpnews.pro/news/ai-pair-programming-in-your-terminal-with-aider-and-ollama", "canonical_source": "https://dev.to/everylocalai/ai-pair-programming-in-your-terminal-with-aider-and-ollama-4hdi", "published_at": "2026-06-14 22:05:39+00:00", "updated_at": "2026-06-14 22:10:38.547800+00:00", "lang": "en", "topics": ["artificial-intelligence", "developer-tools", "large-language-models", "ai-tools"], "entities": ["Aider", "Ollama", "Qwen3 Coder", "RTX 4090", "Qwen2.5 Coder"], "alternates": {"html": "https://wpnews.pro/news/ai-pair-programming-in-your-terminal-with-aider-and-ollama", "markdown": "https://wpnews.pro/news/ai-pair-programming-in-your-terminal-with-aider-and-ollama.md", "text": "https://wpnews.pro/news/ai-pair-programming-in-your-terminal-with-aider-and-ollama.txt", "jsonld": "https://wpnews.pro/news/ai-pair-programming-in-your-terminal-with-aider-and-ollama.jsonld"}}