Open Source AI Coding Assistants (2026): 8 Ranked by Stars, License, and Local-Model Support

OpenCode leads at 172k stars (MIT). Aider is 45.9k (Apache-2.0), Cline 63.0k, Gemini CLI 105k, Codex 90k. Every one runs local models via Ollama. Ranked table, exact install commands, and how to run DeepSeek at full quality.

June 9, 2026 · 1 min read
Open Source AI Coding Assistants (2026): 8 Ranked by Stars, License, and Local-Model Support

You want an AI coding assistant whose source you can read, that you can self-host, and that runs a local model when you need code to stay on your machine. Eight open source agents qualify in June 2026. Below: a single table ranked by GitHub stars, license, and local-model support, then exact install commands, the Aider plus Ollama offline setup, and where to run DeepSeek at full quality.

172k
OpenCode GitHub stars
105k
Gemini CLI GitHub stars
90k
OpenAI Codex GitHub stars
45.9k
Aider GitHub stars

Open Source AI Coding Assistants Ranked (June 2026)

Star counts and licenses are pulled directly from each GitHub repository as of June 9, 2026. Every tool here runs local models through Ollama, LM Studio, or an OpenAI-compatible endpoint, so "self-hosted" and "air-gapped" are achievable with all eight.

Ranked by GitHub Stars
ToolStarsLicenseTypeLocal-Model Support
OpenCode172,198MITTerminal / VS Code extOllama, LM Studio, llama.cpp, 75+ providers
Gemini CLI105,104Apache-2.0TerminalAPI key or OAuth; local via providers
OpenAI Codex89,991Apache-2.0CLI / IDE / cloudAPI key mode; ChatGPT login
Cline62,996Apache-2.0IDE extension + CLIOllama, LM Studio, any OpenAI-compatible
Goose48,542Apache-2.0CLI + desktopOllama, 15+ providers, ACP
Aider45,945Apache-2.0TerminalOllama, any OpenAI-compatible API
Kilo Code19,968MITIDE extension + CLIBYOK, 500+ models, Ollama
Note on Claude Code

The most-starred coding repo, anthropics/claude-code at 131,380 stars, is not open source. Its license field is empty; the repo hosts issues and docs while Claude Code itself is proprietary and requires a Pro, Max, Team, Enterprise, or Console (API) account. It is excluded from the ranking above for that reason. See open source Claude Code alternatives.

Quick-Pick by Use Case
Use CaseBest PickWhy
Local LLM in the terminalAiderGit-native, --model ollama/<name>, 45.9k stars
Widest provider choiceOpenCode75+ providers, MIT, most-starred agent
Free daily quota, no keyGemini CLI60 req/min, 1,000 req/day on a Google account
IDE-native, self-hostedClineVS Code + JetBrains, Ollama/LM Studio local
MCP-first general agentGooseRust, 70+ MCP extensions, ACP subscriptions
Most model choicesKilo Code500+ models, BYOK at provider rates
Run DeepSeek at full qualityMorphbf16 activations, no fp8 quant, code-tuned kernels

Aider: The Git-Native Local-LLM CLI

Stars: 45,945. License: Apache-2.0. Language: Python. Last push: May 22, 2026.

Aider runs in your terminal and treats git as the system of record. Every accepted change becomes a commit with a generated message, so undo is just git revert and review is just reading the log. It connects per run via flags, and it works with local models through Ollama or any OpenAI-compatible API, which is why it dominates the "aider local llm" searches that bring people to this page.

45.9k
GitHub stars
Apache-2.0
License
Python
Language
Ollama
Local backend

Install Aider

# Recommended installer (isolates dependencies)
python -m pip install aider-install && aider-install

# One-line install (macOS/Linux)
curl -LsSf https://aider.chat/install.sh | sh

# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex"

# Or via uv / pipx / pip
uv tool install --force --python python3.12 --with pip aider-chat@latest

Connect Aider to a model

# Hosted Claude
aider --model sonnet --api-key anthropic=<key>

# Hosted DeepSeek
aider --model deepseek --api-key deepseek=<key>

# Local model via Ollama (fully offline)
aider --model ollama/qwen3-coder

Aider docs recommend Gemini 2.5 Pro, DeepSeek R1/V3, Claude 3.7 Sonnet, o3/o4-mini, and GPT-4.1. That model guidance has not been refreshed for 2026 frontier models, so treat the named list as a starting point and pass whichever model you actually want with --model. Compare it head to head in our Aider vs Cline and OpenCode vs Aider breakdowns.

Run Aider with Ollama for a Fully Offline Coding Assistant

This is the setup behind "aider local llm ollama coding agent": Ollama serves the model on localhost, Aider drives it, and no prompt or file ever leaves the machine. Pull a coding model, start Ollama, and point Aider at it.

Aider + Ollama, fully local

# 1. Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh

# 2. Pull a coding model (sized to your hardware)
ollama pull qwen3-coder

# 3. Run aider against the local model
aider --model ollama/qwen3-coder

# Aider maps the repo, edits files, and auto-commits to git.
# Nothing is sent to a cloud API.
Hardware guidance (Cline docs, applies to any local agent)

16-32GB RAM: small or quantized coding models.

32-64GB RAM: mid-size coding models.

64GB or more: larger models. Cline recommends enabling its "Use Compact Prompt" setting for local runs to keep context small enough for limited hardware.

For a deeper local-model walkthrough, see best Ollama models for coding and the best open source coding model in 2026.

OpenCode: The Most-Starred Open Source Coding Agent

Stars: 172,198. License: MIT. Repo: anomalyco/opencode (redirected from sst/opencode).

OpenCode is the most-starred open source coding agent, ahead of Gemini CLI (105k) and openai/codex (90k). The differentiator is breadth: 75+ LLM providers through the AI SDK and the Models.dev catalog, plus local models via Ollama, LM Studio, and llama.cpp. Custom OpenAI-compatible providers are added in JSON.

172k
GitHub stars
MIT
License
75+
LLM providers
3
Local backends

Install OpenCode and add a custom provider

# Install
curl -fsSL https://opencode.ai/install | bash
# or: npm install -g opencode-ai
# or: brew install anomalyco/tap/opencode

# Add a custom OpenAI-compatible provider (JSON config)
{
  "provider": {
    "myprovider": {
      "npm": "@ai-sdk/openai-compatible",
      "options": { "baseURL": "https://api.myprovider.com/v1" },
      "models": {}
    }
  }
}
OpenCode Zen

OpenCode Zen is a curated list of models the team has tested and verified for agentic coding. If you do not want to evaluate 75+ providers yourself, Zen is the short list of what actually performs. Note: OpenCode docs state Anthropic explicitly prohibits using Claude Pro/Max subscriptions with third-party tools, while ChatGPT Plus, GitHub Copilot, and GitLab Duo subscriptions are usable as backends.

More detail in what is OpenCode and the OpenCode vs Cline comparison.

Gemini CLI: The Free-Tier Terminal Agent

Stars: 105,104. License: Apache-2.0. Repo: google-gemini/gemini-cli.

Gemini CLI is the highest-quota free option: 60 requests per minute and 1,000 requests per day on a personal Google account via OAuth login, which serves a managed Gemini 3 mix of flash and pro. Pass an API key instead and you can pick a specific model such as gemini-2.5-flash. MCP servers are configured in ~/.gemini/settings.json.

105k
GitHub stars
60/min
Free requests
1,000/day
Free request cap
Apache-2.0
License

Install Gemini CLI

# Run without installing
npx @google/gemini-cli

# Install globally
npm install -g @google/gemini-cli

# Or via Homebrew
brew install gemini-cli

On Terminal-Bench 2.1, Gemini CLI with Gemini 3.1 Pro scores 70.7% (±2.9), versus Claude Code with Opus 4.8 at 78.9% and Codex CLI with GPT-5.5 at 83.4%. See Gemini CLI vs Claude Code.

OpenAI Codex CLI

Stars: 89,991. License: Apache-2.0. Repo: openai/codex.

Codex spans a CLI, an IDE extension for VS Code, Cursor, and Windsurf, a cloud agent at chatgpt.com/codex, a desktop app, and iOS. Signing in with ChatGPT requires a Plus, Pro, Business, Edu, or Enterprise plan. You can also auth with an OpenAI API key and pay per-token API rates, which drops the cloud features. Switch models in the CLI with the /model command.

90k
GitHub stars
Apache-2.0
License
83.4%
Terminal-Bench 2.1 (GPT-5.5)
6
Surfaces (CLI to iOS)

Install Codex CLI

# Install (macOS/Linux)
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# npm
npm install -g @openai/codex

# Homebrew
brew install --cask codex

# Then sign in
codex   # choose "Sign in with ChatGPT"

Codex CLI with GPT-5.5 is #1 on Terminal-Bench 2.1 at 83.4% (±2.2). Compare it in Codex vs Cline and Codex vs Claude Code.

Cline: The IDE-Native Open Source Agent

Stars: 62,996. License: Apache-2.0. Editors: VS Code, JetBrains (Early Access), Cursor, Windsurf, plus a CLI.

Cline is the open source agent for people who live in an editor. It runs in VS Code, JetBrains, Cursor, and Windsurf, with a CLI installed via npm i -g cline. Model choice is unrestricted: Claude, GPT, Gemini, any OpenAI-compatible endpoint, BYOK, or local through Ollama and LM Studio. It also has the clearest published local-hardware guidance of any tool here.

63.0k
GitHub stars
Apache-2.0
License
4
Editors + CLI
$0
Extension cost
Cline local inference

Run models through Ollama or LM Studio. RAM guidance: 16-32GB for small or quantized models, 32-64GB for mid-size coding models, 64GB or more for larger models. Cline recommends enabling its "Use Compact Prompt" setting for local runs.

See the Cline vs Cursor comparison and the Cline alternatives roundup.

Goose: Rust, MCP-First, Linux Foundation Governed

Stars: 48,542. License: Apache-2.0. Repo: aaif-goose/goose (moved from block/goose to the Agentic AI Foundation at the Linux Foundation).

Goose is built in Rust and ships as a desktop app for macOS, Linux, and Windows plus a CLI and API. It works with 15+ providers including Anthropic, OpenAI, Google, Ollama, OpenRouter, Azure, and Bedrock, can reuse existing Claude, ChatGPT, or Gemini subscriptions via ACP, and connects to 70+ extensions over MCP. It positions itself as general purpose, not code-only: research, writing, automation, and data analysis alongside coding.

48.5k
GitHub stars
Rust
Language
70+
MCP extensions
AAIF
Linux Foundation

Install Goose CLI

curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash

Compare it in Goose vs Claude Code and OpenCode vs Goose.

Kilo Code: The Most Model Choices

Stars: 19,968. License: MIT. Repo: Kilo-Org/kilocode (domain kilocode.ai now redirects to kilo.ai).

Kilo Code is a free and open source extension for VS Code, JetBrains, and CLI. Pricing is BYOK-friendly: bring your own Anthropic, OpenAI, Google, Azure, or Bedrock key with no Kilo plan required, or use the Kilo Gateway at $0/mo plus usage at exact provider rates with no markup. Kilo Pass subscriptions run $19, $49, $199 per month with up to 50% bonus credits; Teams is $15 per user per month.

500+
Supported models
MIT
License
$0
Extension + Gateway base
3
Surfaces (IDE + CLI)

See Kilo Code vs Claude Code and OpenCode vs Kilo Code.

Where to Run DeepSeek and Other Open Models

Every agent above is BYOM, so the real question for open models is who serves them. The catch with serverless DeepSeek is quantization: most providers quantize activations to fp8 to cut cost, which degrades output. Morph Open Source Models serves DeepSeek with 16-bit (bf16) activations and no fp8 or int8 quantization, so responses match the reference weights. For coding specifically, Morph runs code-tuned speculative decoding plus custom low-level inference kernels, which makes it the fastest and highest-fidelity option for coding agents rather than a general-purpose menu.

Running DeepSeek: Self-Host vs Morph
DimensionSelf-host (Ollama / vLLM)Morph Open Source Models
Activation precisionDepends on your build16-bit bf16, no fp8/int8 quant
Codegen tuningGeneric decodingCode-tuned speculative decoding + custom kernels
morph-dsv4flash input priceYour GPU cost$0.139 / 1M tokens
morph-dsv4flash output priceYour GPU cost$0.278 / 1M tokens
Hardware to manageYours (64GB+ for large models)None (OpenAI-compatible API)

Point any agent on this page at Morph by setting its OpenAI-compatible base URL to https://api.morphllm.com/v1 and the model to morph-dsv4flash. Full catalog and rates on Models and Pricing.

When to Use What

Four questions narrow the field:

Do you live in the terminal or an editor?

Terminal: Aider (git-native local LLM), OpenCode (75+ providers), Gemini CLI (free quota), Codex, or Goose. Editor: Cline (VS Code, JetBrains, Cursor, Windsurf) or Kilo Code. Both categories run the same local models.

Does code need to stay on your machine?

Run a local model through Ollama or LM Studio. Aider, Cline, OpenCode, and Goose all support this. RAM guidance: 16-32GB for small/quantized models, 32-64GB for mid-size, 64GB or more for larger models.

Do you want a free daily quota with no setup?

Gemini CLI gives 60 requests per minute and 1,000 per day on a personal Google account. No API key, no card. For a free open model that runs anywhere, pair any agent with a quantized local model in Ollama.

How much model control do you need?

OpenCode supports 75+ providers; Kilo Code advertises 500+ models; Aider and Cline take any OpenAI-compatible endpoint. To run DeepSeek at reference quality without managing GPUs, point any of them at Morph's bf16 endpoint.

Open Source vs Proprietary (Cursor / Copilot)
DimensionOpen Source (Aider / Cline / OpenCode)Proprietary (Cursor / Copilot)
Source visibleYes (MIT / Apache-2.0)No
Model choiceAny provider or localVendor roster
Local / air-gappedYes, via Ollama / LM StudioLimited or none
Cost$0 tool + API or local at cost$10-$20+/mo flat plus usage
Self-hostingRun the agent and model yourselfCloud only

Open source agents have closed the capability gap on agent workflows. Where they still ask more of you is setup and inline autocomplete polish. If you care about reading the source, choosing the model, or keeping code local, the open source side wins on all three.

The Apply Layer Every Agent Shares

Every tool in this list hits the same problem: after the LLM generates an edit, something has to merge it into your existing file. Diffs break when context shifts. Search-and-replace misses when code moves. Full rewrites waste tokens and introduce regressions.

Morph's Fast Apply model handles that step at over 10,500 tokens per second with a deterministic merge. If you are building a custom agent or extending any open source tool here, the apply step is the reliability bottleneck Morph solves.

Morph Fast Apply API (OpenAI-compatible)

import { OpenAI } from 'openai';

const morph = new OpenAI({
  apiKey: process.env.MORPH_API_KEY,
  baseURL: 'https://api.morphllm.com/v1'
});

const result = await morph.chat.completions.create({
  model: 'morph-v3-fast',
  messages: [{
    role: 'user',
    content: `<instruction>Add error handling to all API calls</instruction>
<code>${originalFile}</code>
<update>${llmEditSnippet}</update>`
  }],
  stream: true
});

Frequently Asked Questions

What is the best open source AI coding assistant in 2026?

By GitHub stars, OpenCode leads at 172,198 (MIT), ahead of Gemini CLI (105,104) and OpenAI Codex (89,991). For terminal users who want a local LLM, Aider (45,945 stars, Apache-2.0) is the most-used git-native option. For IDE users, Cline (62,996 stars, Apache-2.0) runs inside VS Code, JetBrains, Cursor, and Windsurf with the same BYOK and local-model flexibility.

Can I run Aider with a local LLM through Ollama?

Yes. Install aider with python -m pip install aider-install && aider-install or curl -LsSf https://aider.chat/install.sh | sh, run Ollama with your model, then start aider --model ollama/qwen3-coder. Aider connects to Ollama and any OpenAI-compatible API. No code or prompts leave your machine.

What is the best self-hosted AI coding assistant?

Cline documents the cleanest local setup: run models through Ollama or LM Studio, with RAM guidance of 16-32GB for small or quantized models, 32-64GB for mid-size coding models, and 64GB or more for larger ones. Aider and OpenCode also run fully local through Ollama. For models too large for one machine, Morph serves DeepSeek V4 with 16-bit (bf16) activations and no fp8 quantization.

How many GitHub stars does Aider have?

Aider (Aider-AI/aider) has 45,945 GitHub stars under an Apache-2.0 license as of June 9, 2026. Its last repo push was May 22, 2026, a visibly slower cadence than OpenCode and Cline, which push daily.

Which open source coding agent supports the most LLM providers?

OpenCode supports 75+ providers via the AI SDK and the Models.dev catalog, plus local models through Ollama, LM Studio, and llama.cpp. Kilo Code advertises 500+ models. Goose works with 15+ providers and 70+ MCP extensions. Cline and Aider connect to any OpenAI-compatible endpoint.

Is OpenAI Codex CLI open source?

Yes. openai/codex is Apache-2.0 with 89,991 GitHub stars. Install with npm install -g @openai/codex, brew install --cask codex, or curl -fsSL https://chatgpt.com/codex/install.sh | sh. Signing in with ChatGPT needs a Plus, Pro, Business, Edu, or Enterprise plan; API-key auth pays per-token rates without the cloud features.

Can I use my Claude Pro or Max subscription with open source agents?

No. OpenCode docs state Anthropic explicitly prohibits using Claude Pro or Max subscriptions with third-party tools like OpenCode. ChatGPT Plus, GitHub Copilot, and GitLab Duo subscriptions are usable as backends in OpenCode, and Goose can reuse Claude, ChatGPT, or Gemini subscriptions via ACP. Otherwise, using Anthropic models in third-party tools means paying per-token API rates.

Where should I run DeepSeek for coding?

Morph Open Source Models serves DeepSeek V4 Flash (morph-dsv4flash) at $0.139 per 1M input tokens and $0.278 per 1M output tokens with 16-bit (bf16) activations and no fp8 or int8 quantization. Most serverless providers quantize activations to fp8, which degrades output; Morph keeps full 16-bit activations so responses match the reference weights, and adds code-tuned speculative decoding plus custom kernels for codegen. See Models.

Run DeepSeek at Reference Quality, No GPUs to Manage

Morph serves DeepSeek V4 Flash with 16-bit (bf16) activations and code-tuned kernels at $0.139/1M input, $0.278/1M output. Point any open source agent at the OpenAI-compatible endpoint and keep full output fidelity.