7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

Alternatives

Best Claude Code Alternatives in 2026: Terminal Coding Agents, Open-Source and Bring-Your-Own-Model

Claude Code alternatives compared: OpenCode, Codex CLI, Gemini CLI, Aider, Cline and Goose, with licences, model choice and approval controls.

By , founder of NQM Studio LTDUpdated 11 min read

The best Claude Code alternatives are OpenCode if you want an open-source terminal agent that works with many model providers, Codex CLI if you already pay for a ChatGPT plan, and Gemini CLI if you want a free tier to start. Aider suits developers who want every AI edit committed to git, Cline covers editor, terminal and CI, and Goose is a general-purpose agent with a desktop app and a CLI.

Claude Code is Anthropic's closed-source coding agent that reads a codebase, edits files and runs commands while you review. This guide covers agents you drive from a terminal or that run commands on your own machine, with open-source tools first and commercial agents after. For AI editors such as Cursor and Zed, see the Cursor alternatives guide.

ToolTypeCategorySelf-hostPricingGitHub
Claude CodeSaaSAI ToolsNoFrom $20/mo per seatClosed source
OpenCodeOpen sourceAI ToolsNoFree (open source)★ 211k
Codex CLIOpen sourceAI ToolsNoFree (open source)★ 128k
Gemini CLIOpen sourceAI ToolsNoFree (open source)★ 107k
AiderOpen sourceAI ToolsNoFree (open source)★ 49k
ClineOpen sourceAI ToolsNoFree (open source)★ 70k
GooseOpen sourceAI ToolsNoFree (open source)★ 55k
OpenHandsOpen sourceAI ToolsNoFree (open source)★ 90k
Open InterpreterOpen sourceAI ToolsNoFree (open source)★ 68k
WarpSaaSDeveloper ToolsNoFree plan · from $20/mo per seatClosed source
FactorySaaSAI ToolsNoFrom $20/moClosed source
Augment CodeSaaSAI ToolsNoFrom $20/moClosed source

Live data from Enlisted: GitHub stats sync daily; pricing comes from each vendor's pricing page.

A note on the table: its Self-host column is mostly No because terminal agents run on your own machine rather than as server software. What matters is which model provider you connect, which the picks below explain.

Why people look for Claude Code alternatives

Claude Code is available in the terminal, VS Code and JetBrains, on the web and mobile, and through GitHub and Slack. Enlisted lists it as closed source and hosted, and the reasons to compare it with other agents are specific.

  • No free plan. Enlisted lists Claude Code with paid plans only. It is included in Claude subscriptions, with per-seat Team and Enterprise plans, so trying it means paying.
  • The agent and the model come from one vendor. Claude Code is Anthropic's own agent, built around its models. Open-source agents let you choose the model provider, use a local model, or sign in with a subscription you already have.
  • Closed source. You cannot read or modify the agent itself. Open-source agents publish their code and licences, so you can audit what runs on your machine.
  • Different approval and sandbox defaults. Teams compare how each agent asks before it runs commands or edits files, covered in a section below.
  • Headless and CI use. Some agents are built to run in scripts and pipelines. Cline's CLI, for example, has a headless mode for CI/CD.

How we picked

Each tool reads a codebase, edits files and can run commands, which is Claude Code's core job. Open-source entries needed recent GitHub activity, and licences are quoted as Enlisted lists them. One popular project whose repository is read-only, Continue, is left out for that reason. Commercial agents are included where Enlisted lists a terminal or command-line product. Descriptions come from the catalogue and vendor docs. Read about how Enlisted ranks tools.

1. OpenCode: best open-source terminal agent with many providers

OpenCode is an open-source coding agent for the terminal, released under MIT, with a beta desktop app for macOS, Windows and Linux. It ships two built-in agents you switch between with the Tab key: a build agent with full development access, and a read-only plan agent that denies file edits by default and asks before running shell commands.

Its docs say it connects to model providers through the AI SDK and Models.dev, supports local models through Ollama, LM Studio and llama.cpp, and can sign in with existing ChatGPT, GitHub Copilot or GitLab Duo subscriptions. That makes it the most direct open-source answer to a Claude Code habit without Anthropic's models.

  • Best for: terminal users who want to choose their provider or run a local model.
  • Watch out for: its permission rules mostly default to allow, so tighten them (covered below), and the desktop app is in beta.

2. Codex CLI: best for ChatGPT plan users

OpenAI's open-source coding agent, Codex CLI, runs locally in your terminal. Its code is in Rust, and the licence is Apache-2.0. You start it with the codex command and ask it to read, explain and change code. It installs through scripts, package managers or binaries for Mac, Linux and Windows.

You can sign in with a ChatGPT plan or use an API key. OpenAI's docs describe a default "Auto" preset that combines a workspace-write sandbox with approvals on request, with network access off. A closed-source OpenAI Codex product adds cloud tasks and IDE use.

  • Best for: developers who already have a ChatGPT plan and want a local agent from the same vendor.
  • Watch out for: Codex CLI is designed around OpenAI's models and account system, which matters if you want a different vendor.

3. Gemini CLI: best open-source terminal agent with a free tier

Gemini CLI is Google's open-source terminal agent for working with Gemini models, written in TypeScript and licensed under Apache-2.0. Out of the box it can ground answers with Google Search, work with files, run shell commands and fetch web pages, and integrations can be added through MCP.

The project highlights a free tier when you sign in with a personal Google account, and Enlisted also lists paid Google plans, an AI Studio API key and Vertex AI. Its docs describe optional sandboxing, using macOS Seatbelt or containers such as Docker and Podman, which you turn on with a flag, environment variable or setting. It is not enabled by default.

  • Best for: anyone comfortable with Gemini models who wants to see how a terminal agent works without paying.
  • Watch out for: sandboxing is opt-in, and free-tier limits are set by Google.

4. Aider: best git-first terminal pair programmer

Aider pairs you with large language models for programming from the command line. It is open source under Apache-2.0. It builds a map of your codebase, commits each change to git with a descriptive message so you can diff or undo it, and can run linters and tests after edits and try to fix what they report.

It works with cloud and local models, accepts images and web pages as context, supports voice requests and covers more than 100 programming languages. Its history of small commits doubles as the review trail.

  • Best for: developers who want every AI change in their git history.
  • Watch out for: Aider's last GitHub commit is older than most others here, so check how active the repository is before you depend on it.

5. Cline: best open-source agent across IDE, terminal and CI

Cline is an open-source coding agent for your IDE, terminal and desktop, with a VS Code extension, a JetBrains plugin, a CLI, a desktop app for macOS and Windows, and an SDK. It can edit across a project, create files, run commands and browse the web, with human-in-the-loop approval for tools in the editor. It is Apache-2.0 licensed.

The CLI has an interactive mode and a headless mode for CI/CD and scripting, and the desktop app schedules recurring routines. Enlisted lists the open-source extension as free for individuals, who pay only for model inference or use their own API keys.

  • Best for: developers who want one agent in the editor, the terminal and CI.
  • Watch out for: you manage keys and inference costs, and agents that run commands need careful approval settings.

6. Goose: best general-purpose agent with many model providers

Goose is an open-source, general-purpose AI agent written in Rust, available as a desktop app, a CLI and an API. It is not limited to coding: the project suggests research, writing, automation and data analysis too. It runs locally and is released under Apache-2.0.

It works with more than a dozen model providers, including Anthropic, OpenAI, Google, Ollama, OpenRouter, Azure and Bedrock, and can use existing Claude, ChatGPT or Gemini subscriptions through ACP instead of API keys. Extensions connect through the Model Context Protocol, and teams can ship a custom build with preset providers and branding.

  • Best for: people who want a local agent that is not tied to one model vendor, for coding and other tasks.
  • Watch out for: its scope is wider than coding, so check how it handles your project size and language.

7. OpenHands: best for running several coding agents from one place

OpenHands is an open-source project whose current README centres on Agent Canvas, a self-hosted control center for starting conversations with coding agents and automating engineering tasks. By default it uses the OpenHands agent, and it can also drive third-party agents such as Claude Code, Codex and Gemini.

It runs locally by default and can use backends including Docker containers, virtual machines and company infrastructure. Automations can run on a schedule or on webhooks, with integrations for Slack, GitHub, Linear and Notion. The code is MIT-licensed, and Enlisted lists a free local use and a free hosted individual tier with model usage passed through at cost.

  • Best for: teams that want to run agents, including Claude Code itself, in isolated Docker or cloud environments.
  • Watch out for: it is a control center around agents rather than a single terminal assistant, so it adds a layer to learn.

8. Open Interpreter: best for low-cost open models

Open Interpreter is an open-source coding agent in Rust, forked from OpenAI's Codex CLI and tuned to get good results from low-cost open models such as Kimi, GLM and Qwen. After installing on macOS, Linux or Windows you start a session by typing interpreter or i.

Its main idea is harness emulation: it reproduces the agent setup that suits a given model and lets you switch harness with a slash command. It reuses AGENTS.md files, skills directories and MCP, and is Apache-2.0 licensed. Model costs depend on the provider you choose.

  • Best for: developers who want to run a terminal agent on cheaper open models.
  • Watch out for: its latest release is numbered 0.0.x, so expect the interface to keep changing, and results depend on the model you pair it with.

9. Warp: best terminal with agents built in

Warp began as a modern terminal and now positions itself as a platform for automating software development with agents. Its products include Warp Terminal, designed for working with coding agents, Warp Agent CLI, a coding agent that runs in any terminal, and Warp Factories for running fleets of agents.

The vendor lists use cases such as first-pass code review on pull requests, bug investigation, refactors and migrations. Enlisted lists a free plan alongside paid individual and business tiers with usage-based top-ups. Warp is closed source.

  • Best for: developers who want their terminal and their agent from the same product.
  • Watch out for: it is proprietary, and heavy agent use means usage-based costs.

10. Factory: best for governed agents in enterprises

Factory is a commercial platform of autonomous agents, called Droids, that plan, build, review and ship code across desktop, terminal, web and CLI. The vendor describes model-independent intelligence, analytics on adoption and consumption per developer and team, Mission Control for monitoring active work, and Automations for repetitive tasks.

Enlisted lists no free plan: individual tiers are paid, and team, business and enterprise plans are quoted or per-seat.

  • Best for: engineering organizations that want governance and usage analytics around coding agents.
  • Watch out for: it is closed source and aimed at organizations more than solo developers.

11. Augment Code: best for very large codebases

Augment Code is an AI coding platform for large codebases and engineering teams, with a Context Engine, a CLI and cloud agents. Its solutions cover code review, test coverage, ticket-to-PR automation, migrations and onboarding, with engineers holding the quality gates.

Enlisted lists flat team pricing rather than per-seat charges, with no free plan. It is closed source.

  • Best for: teams working in big repositories who want a context-aware agent with a CLI.
  • Watch out for: it is proprietary, and Enlisted lists paid plans only.

More agents worth a look

  • Kilo Code: an MIT-licensed agent for VS Code, JetBrains and the command line that works with hundreds of models. It is covered in the Cursor guide.
  • Cursor and GitHub Copilot: both list a command-line product (Cursor CLI and Copilot CLI) alongside their editor features.
  • Kiro and Google Antigravity: AWS's spec-driven agentic IDE and Google's agent-first platform, each with a CLI.
  • Devin: an AI software engineer that takes tickets and opens pull requests in its own environment.
  • OpenAI Codex: the closed-source cloud, terminal and IDE product behind Codex CLI.

How do approvals and sandboxing compare?

A terminal agent that edits files and runs commands needs boundaries. These are the defaults each vendor's docs describe today, and they change, so read the current docs before trusting any of them.

AgentWhat its docs describeWhere to tighten
Claude CodeManual mode asks before shell commands, except a built-in set of read-only ones, and before file edits. Modes include acceptEdits and bypassPermissionsDeny, ask and allow rules, plus an OS-level sandbox documented separately
Codex CLIAn Auto preset with a workspace-write sandbox, approvals on request and network access off by defaultSandbox modes read-only, workspace-write and danger-full-access
Gemini CLIOptional sandbox using Seatbelt or containers, not on by defaultTurn on with a flag, environment variable or setting
OpenCodeAllow, ask or deny per action, with most actions defaulting to allow and .env files blocked by defaultRules with wildcards, per-agent overrides and the read-only plan agent
ClineHuman-in-the-loop approval for tools in the editorThe approval options in Cline's docs

Claude Code's own docs say its bypass mode should only be used in isolated environments such as containers or virtual machines. The same advice applies to every agent here: for an unfamiliar repository, run it in a container or a throwaway checkout, and keep secrets out of reach.

Which Claude Code alternative should you choose?

If you wantPick
Open source with the widest model choice and local modelsOpenCode
A local agent tied to your ChatGPT planCodex CLI
A free tier to startGemini CLI
Every change committed to gitAider
One agent for editor, terminal and CICline
A general-purpose agent that is not tied to one vendorGoose
To run several agents in Docker or the cloudOpenHands
A terminal agent on cheap open modelsOpen Interpreter
Terminal and agents in one productWarp
Governance and analytics for a teamFactory

See every Claude Code alternative in the catalogue, the Cursor alternatives page, or the AI tools and developer tools categories.

Bring your own model: what it means for cost and privacy

Open-source agents are free to install, but the model behind them is not free by default. You either pay a provider for usage, sign in with a subscription where the tool supports it, or run a local model.

  • Where the model runs decides where your code goes. A hosted provider receives the files the agent reads, whereas a local model keeps them on your machine.
  • Subscriptions can replace keys. Codex CLI signs in with a ChatGPT plan, OpenCode supports ChatGPT, GitHub Copilot and GitLab Duo logins, and Goose can use existing Claude, ChatGPT or Gemini subscriptions through ACP.
  • Local models trade quality for control. Check the model's strength on your language and project size before committing a team to it.

If you want a general chat assistant next to your coding agent, see ChatGPT alternatives. Where you host the code the agent edits is a separate choice, covered in the GitHub alternatives guide.

Claude Code alternatives: pricing compared

Plans and list prices from each vendor's pricing page. Prices change, so confirm the current price on the vendor's page before you buy.

ToolFree optionPaid plansSource
Claude CodeNo free plan
  • Team Standard seat$25/ seat / mo
  • Team Premium seat$125/ seat / mo
  • Enterprise$20/ seat / mo

Pro, Max 5x, Max 20xPrices on the vendor's page

Pricing page Checked 2 Oct 2026
OpenCodeFree (open source)None listed
Codex CLIFree (open source)Hosted version available
Gemini CLIFree (open source)
  • FreeFree
  • Vertex AICustom

Google AI Pro, Google AI Ultra, Google Developer Program, AI Studio API keyPrices on the vendor's page

Pricing page Checked 2 Oct 2026
AiderFree (open source)None listed
ClineFree (open source)
  • Open SourceFree
  • EnterpriseCustom
Pricing page Checked 2 Oct 2026
GooseFree (open source)None listed
OpenHandsFree (open source)
  • Open Source (Local)Free
  • Individual (SaaS)Free
  • EnterpriseCustom
Pricing page Checked 2 Oct 2026
Open InterpreterFree (open source)None listed
WarpFree plan
  • FreeFree
  • Build$20/ seat / mo
  • Max$200/ seat / mo
  • Business$50/ seat / mo
  • +1 more
Pricing page Checked 3 Oct 2026
FactoryNo free plan
  • Pro$20/ mo
  • Plus$100/ mo
  • Max$200/ mo
  • Teams$60/ mo
  • +2 more
Pricing page Checked 3 Oct 2026
Augment CodeNo free plan
  • Standard$20/ mo
  • Business$100/ mo
  • EnterpriseCustom
Pricing page Checked 2 Oct 2026

List prices from each vendor's public pricing page on the date shown. Annual billing is often cheaper, and taxes, usage and transaction fees aren't included. Open-source tools cost nothing to self-host beyond your own server.

Frequently asked questions

What is the best open-source alternative to Claude Code?
OpenCode is the broadest open-source choice, released under MIT and able to connect to many model providers and local models. Codex CLI and Gemini CLI are Apache-2.0 agents from OpenAI and Google, Aider is an Apache-2.0 tool that commits each change to git, and Goose is an Apache-2.0 general-purpose agent. All of them run in a terminal and need a model provider, which can cost money.
Is there a free alternative to Claude Code?
Gemini CLI has a free tier when you sign in with a personal Google account, and OpenCode, Aider and Goose are free open-source software you can point at a local model. Cline is free for individuals too, with model inference billed by your provider. Free-tier limits are set by the provider, so check the current allowance before depending on it.
Can I use Claude Code alternatives with local models?
Yes. OpenCode's docs describe local inference through Ollama, LM Studio and llama.cpp using OpenAI-compatible endpoints, and Aider and Goose can also connect to local models. Open Interpreter is tuned for low-cost open models. Results depend on the model and your hardware, so smaller local models handle less than the large hosted ones.
How do terminal coding agents handle permissions and sandboxing?
Each agent takes a different default. Claude Code asks before running most shell commands and editing files, Codex CLI defaults to a sandbox limited to the workspace with network access off, Gemini CLI offers an optional sandbox that is not on by default, and OpenCode uses allow, ask and deny rules that mostly default to allow. Read each agent's current docs and tighten the settings before pointing it at a real repository.
Which is better, Codex CLI or Claude Code?
They serve different vendors' ecosystems. Codex CLI is open source under Apache-2.0 and signs in with a ChatGPT plan or an API key, while Claude Code is closed source and comes with Claude subscriptions. Choose by the model and account you already pay for, how each handles approvals, and whether you want to read or modify the agent's code.