# Open-source alternatives to Claude Code and Cursor

Claude Code and Cursor are paid AI coding tools. Claude Code is an agent that edits your repository and runs commands; Cursor is an AI code editor with tab completion and an agent built in.

The open-source projects below do the same kinds of work as terminal agents, editor extensions or full editors. The software is free; the model behind it is what you pay for, if anything. Many work with your own API key or a local model through Ollama or LM Studio, and each row shows which.

> We track 9 open-source coding agents and AI editors, each checked for licence, commercial use, hardware, paid services and setup. OpenCode, Kilo Code, OpenHands and Zed (and 4 more) run on your own machine, allow commercial use and need no paid service (you still choose a model: a paid API key or a free local one). Easiest to set up: OpenCode, Gemini CLI and Kilo Code (and 5 more). Facts checked 2026-10-21.

Give this to your agent: "Help me with this: "Open-source alternatives to Claude Code and Cursor", using the RepoQuarry guide at https://repoquarry.dev/guides/claude-code-alternatives.md. Read the whole guide first, including its builds and links. Recommend the option that fits what I am building and why, check each project's official docs (linked there) before installing anything, ask me before spending money or using my accounts, and tell me what you set up when you finish."

## Step-by-step builds
Each build lists the repos, how they connect and the steps, with a prompt for your coding agent.
- [Build an AI agent that wakes up on a webhook, email or chat message](https://repoquarry.dev/builds/webhook-agent.md): When an email arrives, a form is filled or someone posts in chat, an AI agent starts, does the task and reports back.
- [Build your own AI app builder and code reviewer with open-source software](https://repoquarry.dev/builds/vibe-workshop.md): Build apps from a prompt on your own machine, with an AI reviewer checking every change.

## Compared
| Project | Runs locally | Commercial use | Paid services | Setup |
|---|---|---|---|---|
| [OpenCode](https://repoquarry.dev/projects/opencode.md) | Yes | Yes · MIT | Optional only | Easy |
| [Gemini CLI](https://repoquarry.dev/projects/gemini-cli.md) | Yes | Yes · Apache-2.0 | Required | Easy |
| [Kilo Code](https://repoquarry.dev/projects/kilo-code.md) | Yes | Yes · MIT | Optional only | Easy |
| [OpenHands](https://repoquarry.dev/projects/openhands.md) | Yes | Yes · MIT | Optional only | Medium |
| [Zed](https://repoquarry.dev/projects/zed.md) | Yes | Yes · GPL-3.0-or-later | Optional only | Easy |
| [Aider](https://repoquarry.dev/projects/aider.md) | Yes | Yes · Apache-2.0 | Optional only | Easy |
| [Cline](https://repoquarry.dev/projects/cline.md) | Yes | Yes · Apache-2.0 | Optional only | Easy |
| [OpenAI Codex CLI](https://repoquarry.dev/projects/codex-cli.md) | Yes | Yes · Apache-2.0 | Optional only | Easy |
| [goose](https://repoquarry.dev/projects/goose.md) | Yes | Yes · Apache-2.0 | Optional only | Easy |

## Common questions
### What is Claude Code?
Claude Code is Anthropic's agentic coding tool. It works in the terminal, in VS Code and JetBrains, in a desktop app and in the browser, and it is included with the paid Claude Pro, Max, Team and Enterprise plans, not the free plan. (source: https://claude.com/pricing)

### Is there a free alternative to Claude Code?
OpenCode, Kilo Code, OpenHands, Zed, Aider and Cline (and 2 more) are free to run, with paid services (usually a hosted model API) optional. The software is free; the AI model is the usual cost. A local model through Ollama or LM Studio costs nothing per request but needs a capable computer.

### Which Claude Code or Cursor alternatives work with a local LLM?
OpenCode, Kilo Code, OpenHands, Zed, Aider, Cline, OpenAI Codex CLI and goose document support for a local model (for example Ollama or LM Studio), so you can work without a paid API key. Small local models make more mistakes than the best hosted ones, so expect to check their work more often.

### Which can I use commercially?
Confirmed: OpenCode (MIT), Gemini CLI (Apache-2.0), Kilo Code (MIT), OpenHands (MIT), Zed (GPL-3.0-or-later), Aider (Apache-2.0), Cline (Apache-2.0), OpenAI Codex CLI (Apache-2.0) and goose (Apache-2.0). This is not legal advice; read each licence.

### Which is easiest to set up?
Rated easy from their install docs: OpenCode, Gemini CLI, Kilo Code, Zed, Aider, Cline, OpenAI Codex CLI and goose. Each page links the exact install step we checked.

### Which run on Windows?
OpenCode, Gemini CLI, Kilo Code, OpenHands, Zed, Aider, OpenAI Codex CLI and goose are documented to run on Windows. The others are web apps, servers or unconfirmed; check each page.

## By paid product
- [Open-source alternatives to Claude Code](https://repoquarry.dev/alternatives/claude-code.md)
- [Open-source alternatives to Cursor](https://repoquarry.dev/alternatives/cursor.md)
---
Source: RepoQuarry (https://repoquarry.dev/guides/claude-code-alternatives). Data licence: CC BY 4.0. Quotes are from project documentation and belong to their authors.
