replacing Claude Code

Open Source Claude Code Alternatives

Anthropic's terminal coding agent — Claude Code pricing: Included with Claude Pro/Max ($20-$200/month); API usage billed separately. Below: 4 free, self-hostable open source projects that cover the same ground, ranked by real GitHub adoption.

There are 4 open source Claude Code alternatives tracked on this registry, against Claude Code pricing of Included with Claude Pro/Max ($20-$200/month); API usage billed separately. The most-adopted is OpenCode with 224,407 GitHub stars under MIT, written in TypeScript. Together the set has 382,022 stars across 2 languages and 2 licences. All 4 are free to self-host with no licence fee, and 3 of 4 received a commit in the last 90 days. 4 head-to-head Claude Code comparisons are available.

Claude Code is tied to Anthropic's models and to a subscription tier that has changed repeatedly. Usage limits reset on a rolling window, so heavy agentic sessions stall mid-task, and there is no self-hosted option — your code and prompts go to a third party. Cost scales with token usage, which makes it hard to budget for a team.

Other hosted options

The open source projects below are free to self-host. If you would rather pay for a managed service, these are the hosted products in the same space — listed with the vendor's own pricing.

Our top 3 Claude Code alternatives

OpenCode ★ 224K

OpenCode is an open-source AI coding agent designed to operate across terminal, IDE, and desktop environments. It integrates directly into developer workflows to assist with writing, editing, and understanding code using natural language prompts. Built in TypeScript and licensed under MIT, it runs locally or via a desktop app and supports multiple languages and platforms.

MIT · TypeScript · Claude Code vs OpenCode →

Cline ★ 71K

Cline is an open-source AI coding agent that operates across multiple interfaces: as a CLI tool, desktop application, VS Code extension, JetBrains plugin, and SDK. It lives in the developer tooling ecosystem and is built with TypeScript under the Apache-2.0 license. The project solves the problem of fragmented AI-assisted coding workflows by unifying agent capabilities—code generation, command execution, project-wide edits, and human-in-the-loop approval—into a single extensible engine that works consistently across environments.

Apache-2.0 · TypeScript · Claude Code vs Cline →

Aider ★ 50K

Aider is an open-source AI pair programming tool that runs in the terminal. It connects to large language models—cloud-based or local—to assist with writing, editing, and debugging code directly within a developer’s existing workflow. Built in Python and licensed under Apache-2.0, it integrates with popular LLMs including OpenAI, Anthropic, Google Gemini, and open-source models like Llama.

Apache-2.0 · Python · Claude Code vs Aider →

last updated nightly · ranking method: github stars, live-tracked

Frequently asked questions

What is the best open source alternative to Claude Code?

OpenCode is the most-starred open source alternative to Claude Code in this registry, with 224,407 GitHub stars. 4 alternatives are compared here in total.

Are there free alternatives to Claude Code?

Yes. Every project listed on this page is open source and free to self-host — there is no licence fee. Some projects also sell a managed hosted version, but the self-hosted path costs nothing.

What should I look at when replacing Claude Code?

Compare licence terms, community size (stars), primary language and release activity. A fast-moving project with a compatible licence and an active maintainer base matters more than raw star count when you are committing to a migration.