Blog · Coding agents

The best OpenCode alternatives in 2026: free, open source and local

OpenCode is one of the most-starred open-source coding agents on GitHub, with about 226,000 stars: an MIT-licensed terminal agent that works with any model provider, plus a desktop app in beta. People look elsewhere for a few reasons: a smaller harness they can bend to their own workflow, a single Go or Rust binary, better support for local models, an app instead of a terminal, a free option that needs no API key, or the agent their company already pays for. Here are the alternatives for each, with licenses, install commands and prices from each project's own page.

Quick picks

  • A minimal agent you shape yourself: Pi, MIT-licensed, about 121,000 stars.
  • A polished terminal app that runs everywhere, Windows and Android included: Crush, from Charm.
  • OpenCode with an IDE and a cloud agent around it: Kilo CLI, which is a fork of OpenCode.
  • Free with no API key: Freebuff, paid for by text ads.
  • Local models first: Nanocoder, built by a not-for-profit collective.
  • Written in Rust: Codex CLI or Goose.
  • You already pay for Claude, ChatGPT or Copilot: Claude Code, Codex CLI or GitHub Copilot CLI.
  • An agent that keeps working on a schedule, not only when you type: Crewmark, on top of Claude Code or Codex.

OpenCode alternatives compared

Stars are rounded, from the GitHub API on November 10, 2026. Costs are what you need to start; most open-source agents are free and you pay your model provider.

ToolLicenseBuilt withRuns onWhat it costsBest for
OpenCodeMIT (~226k stars)TypeScriptTerminal, desktop app (beta)Free models with a daily limit; Go $10/mo, Go Plus $40/moThe baseline: any provider, local models, Plan and Build agents
PiMIT (~121k stars)TypeScriptmacOS, Linux, Windows; SDK and RPCFree; your subscription or API keyA minimal harness you extend with your own tools and skills
CrushFSL-1.1-MIT (~29k stars)GoEvery terminal: macOS, Linux, Windows, Android, BSDFree; your key, or Charm's Hyper modelsA polished terminal UI with LSP and MCP
Kilo CLIMIT (~28k stars)TypeScriptCLI, VS Code, JetBrains, cloudFree to start; 500+ models at the provider's rate, no markupOpenCode's engine plus IDE extensions and code reviews
GooseApache 2.0 (~56k stars)RustDesktop app, CLI, APIFree; your model keyOne agent for code and other work, with MCP extensions
ClineApache 2.0 (~71k stars)TypeScriptCLI, VS Code, JetBrains, SDKFree; your model keyAn open-source agent in your editor and terminal
NanocoderMIT (~2.6k stars)TypeScriptTerminalFree; local models or any OpenAI-compatible APIPrivate, local-first coding with Ollama
FreebuffApache 2.0 (~14k stars)TypeScriptCLI, desktop, web, cloudFree with text ads; no API keyTrying a coding agent without paying or signing up for a model
Qwen CodeApache 2.0 (~29k stars)TypeScriptTerminalQwen Plus or Pro subscription, or an API keyQwen model users
Codex CLIApache 2.0 (~134k stars)RustTerminal; also IDE and desktopAny ChatGPT plan, including Free; Go is $8/mo; or an API keyChatGPT subscribers who want a fast native binary
Claude CodeProprietary-Terminal, IDE, desktop, webClaude Pro $20/moClaude users who want Anthropic's own agent
GitHub Copilot CLIProprietary-macOS, Linux, WindowsA Copilot plan; Pro is $10/moTeams already paying for Copilot
AiderApache 2.0 (~50k stars)PythonTerminalFree; your model keyGit-centric pair programming; no commits since May 22, 2026 (see Aider alternatives)
CrewmarkProprietary-Your computer, inside your own Claude Code or CodexFree plan (1 project, 3 AI employees); Pro $5/mo coming soonAn agent with a role, working hours and a heartbeat that takes the next issue from a board

Open source OpenCode alternatives you can install today

Each of these installs with one command. Read a script before you pipe it to your shell.

  1. Pi

    A minimal, extensible agent harness. It ships with sensible defaults but skips sub-agents and plan mode on purpose: you add them with extensions, skills and prompt templates, or ask Pi to build them. Run /login to connect a subscription or API key. Pi has no built-in permission system, so run it in a container or sandbox if you need boundaries; its docs describe three ways.

    # Pi (macOS and Linux; Windows has a PowerShell installer)
    curl -fsSL https://pi.dev/install.sh | sh
    
    # Crush
    brew install charmbracelet/tap/crush    # or: npm install -g @charmland/crush
    
    # Kilo CLI (a fork of OpenCode)
    npm install -g @kilocode/cli
    
    # Nanocoder
    npm install -g @nanocollective/nanocoder
    
    # Freebuff (free, supported by text ads)
    npm install -g freebuff
    
    # Codex CLI
    npm install -g @openai/codex
    
    # Goose CLI
    curl -fsSL https://github.com/aaif-goose/goose/releases/download/stable/download_cli.sh | bash
  2. Crush

    Charm's terminal agent, written in Go. It reads your language servers for context, takes MCP servers over http, stdio and sse, and lets you switch models mid-session. It installs with Homebrew, npm, winget, scoop, apt and pkg, and its README lists Windows (PowerShell and WSL), Android and the BSDs. The license is FSL-1.1-MIT, a source-available license rather than an open-source one.

  3. Kilo CLI

    Kilo's README says its CLI is a fork of OpenCode. On top, Kilo adds VS Code and JetBrains extensions, a cloud agent, automated pull-request reviews and 500+ models you can switch mid-task. MIT-licensed.

  4. Goose, Cline and Nanocoder

    Goose is a Rust agent with a desktop app and a CLI, now under the Linux Foundation's Agentic AI Foundation. Cline runs as a CLI, an editor extension or an SDK. Nanocoder is a local-first terminal agent from the Nano Collective, with normal, auto-accept, yolo, plan and architect modes, and commands that review a branch or check out a pull request in its own worktree.

Source: each project's README on GitHub

OpenCode alternatives with free models

OpenCode itself includes free models with a daily request limit, and you can fall back to them when your Go limits run out. If you want something else that's free:

  • Freebuff: no subscription, credits or API key. Text ads pay for the included models, with DeepSeek V4.1 Flash as the default; referrals and bounties add hours to the free daily allowance.
  • Local models: Nanocoder, Crush, Goose and OpenCode all talk to Ollama, so the only cost is your own hardware.
  • Google's free tier: Gemini CLI no longer has one. Its README says free individual accounts and Google AI Pro and Ultra moved to Antigravity CLI (agy) on June 18, 2026.
  • Codex CLI: open source, and it works with a free ChatGPT account.
  • Open-source agents with your own key: Pi, Kilo CLI, Cline and Goose cost nothing themselves; you pay only for the model.

OpenCode alternatives for local LLMs

If the reason you use OpenCode is running models on your own machine, these two make local models the first-class path.

  1. Nanocoder

    Built for local models through Ollama, or any OpenAI-compatible API such as OpenRouter. Pass the provider and model as flags, or run it non-interactively with nanocoder run.

    # Nanocoder with a model running in Ollama
    nanocoder --provider ollama --model llama3.1
    
    # Crush: add Ollama in your crushrc
    provider add ollama --type ollama --base-url "http://localhost:11434/v1"
    model add ollama/llama3.3 --name "Llama 3.3" --context-window 128000
  2. Crush

    Add Ollama as a provider in your crushrc, a Bash-like config file that works the same on every platform, including Windows, then register the models you've pulled.

Rust, Windows, Android or a GUI

  • In Rust: Codex CLI and Goose are both written in Rust. Crush is a single Go binary.
  • For Windows: Crush (winget, scoop or npm), Pi (a PowerShell installer), GitHub Copilot CLI (winget) and the OpenCode desktop app all run natively.
  • For Android: Crush's README lists Android among the terminals it supports.
  • With a GUI: OpenCode's own desktop app (beta) for macOS, Windows and Linux; Goose Desktop; Freebuff Desktop, which can also run your installed Claude Code and Codex; and Kilo or Cline inside VS Code and JetBrains.
  • OpenCode Go is $10 a month for open-weight models (Go Plus is $40). If you'd rather have one subscription for a frontier model, Codex comes with ChatGPT Go at $8 a month, Copilot Pro is $10 and Claude Pro is $20.
With Crewmark

When you want the agent to work without you typing

Every tool on this list waits for your next prompt. Crewmark turns your own Claude Code or Codex into an AI employee with a role, a goal in numbers, working hours and a heartbeat: during its shift it wakes, takes the next issue from a board and messages you when it needs a decision. It runs on your computer, on the plan you already pay for.

  1. Hire an employee on your agent

    Run the setup command in a Claude Code or Codex conversation; that conversation becomes the employee. See what an AI employee is.

  2. Give it hours and a heartbeat

    It wakes every 15 to 240 minutes during the hours you set, even overnight. See how to run Claude Code 24/7 and Codex long-running tasks.

  3. Answer when it asks

    Decisions come to you as messages; everything else is on the board. For more terminal agents compared, see Cursor alternatives and Devin alternatives.

FAQ

What is the best open source alternative to OpenCode?

Pi if you want a small harness you extend yourself, Crush for a polished terminal app on every platform, and Kilo CLI if you want OpenCode's engine with IDE extensions around it. Goose and Cline are solid Apache-licensed choices too.

Is Kilo CLI based on OpenCode?

Yes. Kilo's README says Kilo CLI is a fork of OpenCode, extended to work with Kilo's platform: VS Code and JetBrains extensions, a cloud agent and code reviews.

Is there a free alternative to OpenCode?

Freebuff is free with no API key, supported by text ads. Nanocoder, Crush, Goose and OpenCode itself are free with local models through Ollama. Gemini CLI's free tier moved to Antigravity CLI in June 2026.

Is there an OpenCode alternative written in Rust?

Codex CLI, from OpenAI, and Goose are both written in Rust and Apache 2.0 licensed. Crush is written in Go and ships as a single binary.

Is Crush open source?

Crush's code is public under FSL-1.1-MIT, a source-available license. OpenCode, Pi, Kilo CLI and Nanocoder are MIT; Goose, Cline, Codex CLI, Qwen Code and Freebuff are Apache 2.0.

OpenCode vs Claude Code: which should I use?

OpenCode works with any provider, including local models, and is open source. Claude Code is Anthropic's own agent, closed source, included from Claude Pro at $20 a month. If you pay for Claude anyway, Claude Code gets features first; if you switch models often, OpenCode or Pi fit better.

Checked against each project's GitHub repository and README, opencode.ai and vendor pricing pages on November 10, 2026.

Give your coding agent a job, not just a prompt.

Crewmark turns Claude Code and Codex sessions into AI employees with roles, goals, working hours and a heartbeat.