The best open source alternative to OpenCode is pi. If that doesn't suit you, we've compiled a ranked list of other open source OpenCode alternatives to help you find a suitable replacement. Other interesting open source alternatives to OpenCode are: OpenHands, Cline, Open Interpreter, and Goose.
OpenCode alternatives are mainly AI Coding Agents but may also be AI Agent Platforms. Browse these if you want a narrower list of alternatives or looking for a specific functionality of OpenCode.
Terminal-based coding agent with a minimal core, 15+ LLM providers, tree-structured session history, and a TypeScript extension system for building your own workflows.

Pi is a terminal coding agent built around a single principle: the harness should adapt to you, not the other way around. Unlike AI coding agents that ship with fixed opinions about plan modes, sub-agents, and permission flows, Pi keeps the core deliberately small and exposes everything through a TypeScript extension system.
The extension model is the real differentiator. You can add tools, commands, keyboard shortcuts, events, custom editors, status bars, and overlays. Bundle those into a package and share it via npm or git. Third-party extensions already exist, including one that turns Pi into a drawing canvas inside the terminal. If you want a feature Pi doesn't have, you ask Pi to build it, hit /reload, and keep going.
Key capabilities:
/model or cycle favorites with Ctrl+P./tree, export to HTML, or upload to a GitHub gist for a shareable URL.Pi is token-efficient by design. Its system prompt is minimal, and skills use progressive disclosure so you're not burning tokens on capabilities you haven't loaded. Features like Aider or Cline bake more in by default; Pi bets that a smaller, extensible core is more useful to developers who want control over their tooling.
Licensed under MIT and self-hostable.
AI agent platform that runs autonomous coding agents to plan, write, and ship changes across codebases end-to-end, with support for any model and self-hosted deployment.

OpenHands is an AI agent platform built for software teams that need more than code suggestions. Instead of autocompleting lines in an editor, it runs autonomous agents that plan, execute, and ship changes across entire codebases. Think: open a GitHub issue, an agent investigates, writes the fix, runs tests, and opens a pull request for review.
It's model-agnostic by design. You can point it at any LLM, swap models as needs change, and integrate it into existing CI/CD pipelines without rearchitecting your workflow. For teams already using self-hosted developer infrastructure, it fits naturally into that setup.
Key capabilities include:
The platform runs inside isolated Docker or Kubernetes environments. Your code stays in your environment, on-prem or private cloud, with full auditability over every agent action and artifact. That matters for teams with strict compliance requirements.
A Large Codebase SDK handles dependency mapping across complex systems, letting multiple agents work in parallel without creating conflicts. This makes it practical for large legacy codebases that most AI tools struggle with.
Teams can interact with OpenHands through a web UI, CLI, or SDK. It integrates directly with GitHub, GitLab, Slack, and standard ticketing tools, so agents can be triggered from wherever work already happens. Developers building their own AI-powered tooling can embed the SDK into custom workflows.
OpenHands has accumulated over 75,000 GitHub stars and an active contributor community. The open-source foundation means full visibility into how agents behave, which is a meaningful difference from closed-source alternatives.
AI coding agent that runs inside VS Code and the terminal, supporting multi-file edits, bash execution, and any LLM provider via bring-your-own-key.

Cline is an open-source AI coding agent that works inside VS Code and the command line. It reads and edits files across a project, runs terminal commands, reacts to their output in real time, and handles long-running processes like dev servers or test suites.
The Plan/Act mode split lets you discuss a strategy with the agent before it touches any code, then switch to Act mode when you're ready to execute. Every step is approvable, or you can enable auto-approve for unattended runs.
Model choice is unrestricted. Claude, GPT, Gemini, local Ollama or LM Studio instances, and any OpenAI-compatible endpoint all work. You bring your own key or your own weights.
For teams, Cline supports multi-agent setups where a coordinator delegates to specialist agents with their own tools and context windows. It also connects to Slack, Discord, Telegram, and Linear, and runs headlessly inside GitHub Actions or GitLab pipelines. Tools like Roo Code and OpenHands take a similar multi-agent approach if you want to compare.
.clinerules files let you ship coding standards, architecture guidelines, and deployment conventions alongside your repo so the agent follows project-specific rules consistently.
Extensibility comes through the SDK and MCP server support, which lets you register custom tools and connect to databases, APIs, or infrastructure. The project is Apache 2.0 licensed with 250+ contributors.
Coding agent that lets LLMs write and execute code, manage files, and control your computer using local or low-cost models.

Open Interpreter brings the capabilities of a coding agent to your local machine, without requiring a subscription to a proprietary API. It lets language models write code, run it, browse the web, manage files, and interact with your operating system directly. Think of it as a terminal-based assistant that can actually do things, not just suggest them.
It's built specifically to work well with open-weight and local models, making it a practical choice for anyone who wants to avoid sending code or sensitive data to external servers. You can connect it to models running through Ollama or LocalAI, or point it at hosted providers for more capable models when needed.
Key capabilities include:
Compared to cloud-only AI coding agent orchestrators like Codex, Open Interpreter puts you in control of which model runs and where. That matters for privacy, cost, and offline use. It also means performance depends heavily on the model you choose. Pair it with a strong open-weight model and it handles real tasks; use a weaker one and you'll feel the limits quickly.
It suits developers, researchers, and power users who want a capable local agent and are comfortable picking and configuring their own models.
Local AI agent with a desktop app, CLI, and API that connects to 15+ LLM providers and 70+ extensions for code, research, automation, and data tasks.

Goose is a general-purpose AI agent that runs natively on your machine. It's not narrowly focused on coding: you can use it for research, writing, data analysis, browser automation, or any multi-step task you'd otherwise piece together manually. It ships as a desktop app for macOS, Linux, and Windows, a full CLI for terminal-first workflows, and an API for embedding it in other tools.
The LLM support is broad. Goose works with 15+ providers, including Anthropic, OpenAI, Google, Ollama, LocalAI, OpenRouter, Azure, and Bedrock. You can use API keys or connect through existing Claude, ChatGPT, or Gemini subscriptions, so you're not locked into a new billing relationship just to try it.
Extensibility is central to how goose works:
Goose also implements the Agent Client Protocol, which means it works as an ACP server you can connect from editors like Zed, JetBrains, or VS Code. It can use Codex and similar agents as providers through the same standard.
The project sits under the Agentic AI Foundation at the Linux Foundation, which keeps it vendor-neutral and community-governed. Built in Rust for performance, it has attracted 500+ contributors and 45k+ GitHub stars. If you want a self-hostable, provider-agnostic agent that works across interfaces and integrates deeply with the MCP ecosystem, goose covers a lot of ground.
Terminal-based coding agent powered by Grok 4.5 that plans, builds, tests, and deploys across any codebase with parallel subagents and plugin support.

Grok Build is a terminal coding agent built for developers who want serious AI assistance without leaving the command line. It handles the full development cycle: planning, writing code, running tests, committing to git, and deploying. Any language, any codebase.
The tool's Plan Mode sets it apart from simpler autocomplete tools. Before touching a single file, it proposes a structured plan you can approve, comment on line by line, or rewrite entirely. Every approved change appears as a clean diff. Nothing gets written until you say so.
For large tasks, subagents run in parallel, each with its own context window and optionally its own git worktree. Ask it to find a latency regression and it can simultaneously explore your checkout flow, infrastructure, shared libraries, and pricing engine at once.
Key capabilities:
/skillify, auto-invoked when a task matchesWhen a task is ambiguous, Grok Build asks targeted multiple-choice questions before starting, so it picks the right framework, schema, or design direction upfront rather than guessing. The fullscreen terminal UI supports mouse input and keyboard-first navigation.
It's free to try, and unlike Grok in a browser chat interface, this is purpose-built for working directly inside your existing development environment.
Open source AI coding agent with 500+ models, bring-your-own-key support, and specialized modes for writing, debugging, and planning code across IDEs and CLI.

Kilo is an AI coding agent that works inside VS Code, JetBrains, the command line, and a hosted cloud environment. It's built for developers who want full control over their AI setup: bring your own API keys at zero markup, use local models to keep code private, or route through Kilo's model gateway to access 500+ models.
The agent ships with five specialized modes, each suited to a different part of the development workflow:
Switching between modes doesn't mean switching tools. Everything runs in the same agent, in the editor or terminal you're already using.
Kilo also includes KiloClaw, a managed version of the OpenHands open agent platform. It deploys in under 60 seconds with no Docker, SSH, or config files required. Once running, KiloClaw connects to Telegram, Discord, or Slack, handles scheduled tasks and cron jobs, and acts on your behalf autonomously. It's the part of Kilo designed for background work: running tasks while you're away, automating repetitive operations, or handling code review in the cloud.
For teams comparing options, Kilo positions itself against tools like Cline and Roo Code as a more fully integrated alternative with broader model support and cloud agent capabilities built in. The codebase is Apache-2.0 licensed and fully open source.
State-of-the-art AI agent that uses language models like GPT-4o to autonomously solve GitHub issues, fix bugs, and implement features with configurable YAML setup.

SWE-agent enables language models like GPT-4o or Claude Sonnet 3.7 to autonomously use tools to solve GitHub issues, fix bugs, and implement new features. Built by researchers from Princeton and Stanford Universities, it achieves state-of-the-art performance on SWE-bench among open-source projects.
Key Features:
The platform provides comprehensive documentation including installation guides, tutorials, and API references. Whether you're looking to automate code fixes, resolve complex GitHub issues, or conduct AI research, SWE-agent offers a robust foundation with proven academic backing and real-world performance.
Open-source AI coding agent for the terminal that works with 25+ model providers, keeps sessions on your disk, and ships as a single Go binary with no telemetry.

Zero is a terminal coding agent built for developers who want full control over their AI tooling. It reads your repo, edits files, runs commands, and stores every session locally on your disk. No cloud sync, no telemetry, no vendor lock-in on the model side.
The model choice is genuinely open. Zero connects to 25+ providers including OpenAI, Anthropic, Gemini, Mistral, Groq, DeepSeek, Bedrock, Vertex AI, and local options like Ollama and LM Studio. You can switch providers mid-session with /model, or point it at any OpenAI- or Anthropic-compatible endpoint.
Permissions are explicit and visible. Every side effect (file writes, shell commands, network access) is gated, with OS-level sandboxing. Autonomy is an opt-in, not the default. That makes it practical to run in CI as well as interactively.
Key capabilities:
Sessions live in ~/.config/zero/ and API keys are stored in an encrypted local store. Unlike some other terminal agents, Zero ships as a single Go binary that runs on macOS, Linux, and Windows (x64 and arm64). Twelve contrast-audited themes are included.
It's MIT licensed. You pay your model provider, or nothing at all with a local model.
Messaging Infrastructure for Developers. One API for SMS, WhatsApp, and RCS across 190+ countries.
Get Started FreeManaged Open Source software hosting in the EU: secure, compliant, fast.
Start using Open Source today