10 Best Open-Source Claude Code Alternatives for 2027

Explore open-source coding agents for local and hosted AI models, with practical steps to move your Claude Code rules, skills, and MCP servers.

Claude Code is the most popular AI coding agent around the world, according to the 2026 Stack Overflow Developer Survey. Among the 12,255 respondents to the coding-agent question, 65.5% had used Claude Code in the past year.

It helps developers build new features, fix bugs, review code, and automate everyday development tasks. Even people with little coding experience can describe an idea in plain language and use Claude Code to build a website or application.

As you use Claude Code more frequently, you may find yourself hitting usage limits or spending more on API calls. You may also want the freedom to switch between AI models, run them locally for greater privacy, or customize the coding agent to suit your needs.

Explore these 10 open-source Claude Code alternatives to find an agent that fits your budget and development workflow, and learn how to bring your existing project setup with you.

Last Updated: Nov 30, 2026

The 10 Best Open-Source Claude Code Alternatives

AgentWhere it runs and why to choose it
CodexCLI / desktop / IDE · Import Claude Code projects and chats
DeepSeek HarnessCLI / web / desktop · Keep existing project rules
OpenCodeCLI / desktop · Free hosted models and model choice
PiCLI · Build a custom agent around your own tools
OpenHandsSelf-hosted web UI · Run agents in Docker
ClineVS Code / CLI · Review and approve changes in your editor
GooseDesktop / CLI · Automate tasks with local models
CodeWhaleCLI · Reuse Claude Code plugin bundles
Kilo CodeVS Code / CLI · Import settings and run specialized agents
Grok BuildCLI · Discover Claude rules, hooks, skills, and MCP servers

1. Codex

OpenAI’s Codex is a coding agent with an open-source CLI, a desktop app, and IDE extensions. The CLI runs on macOS, Windows, and Linux. It can take a feature request or bug report and work through it across your codebase. The desktop app organizes multiple tasks into sessions and includes a diff viewer for reviewing the changes.

OpenAI CodeX

Codex has a built-in migration tool for Claude Code users. Run /import from an idle CLI session or open Settings → Import in the desktop app. Select the projects and setup you want to bring over. Codex converts project instructions to AGENTS.md, and the CLI can import up to 50 chats from the past 30 days.

Read More: The Ultimate Codex Resource List: Skills, Plugins, MCP, SDKs & More

Features:

  • Plan changes, update multiple source files, and run build or test commands.
  • Review uncommitted changes or a branch with a dedicated code review command.
  • Delegate investigations to subagents and run independent tasks in Git worktrees.
  • Resume coding sessions and attach screenshots to explain UI issues.
  • Import skills, plugins, MCP settings, hooks, and slash commands.
  • Control file access and command approvals through sandbox and permission settings.
  • Run unattended coding tasks through codex exec.

License: Apache-2.0 (CLI).

Model access: ChatGPT Free offers limited Codex access in the desktop app. Plus and higher plans include CLI access, and OpenAI API keys use token-based billing. With Ollama running, use codex --oss --local-provider ollama to connect a local model.

Codex CLI on GitHub

2. DeepSeek Harness

DeepSeek Harness (DSH) is DeepSeek’s open-source agent environment with a modular plugin architecture. You can work from a terminal, a local web UI, or a desktop app.

DeepSeek Harness Desktop

Keep the CLAUDE.md files in your repository. DSH reads them alongside AGENTS.md and loads identical instructions only once. If both files define the same rule differently, reconcile them before a coding task. Copy your reusable skill folders into .dsh/skills/ or .agents/skills/.

Read More: 100 Best DeepSeek Harness Plugins for DSH

Features:

  • Explore project files, modify code, and execute shell commands.
  • Follow tool calls and inspect file changes through a graphical workspace.
  • Delegate tasks to subagents and inspect their conversations.
  • Extend agent behavior through plugins and reusable skills.
  • Configure tool permissions and connect MCP tools to agent sessions.
  • Load project instructions from the root down to relevant subdirectories.

License: MIT.

Model access: Add a DeepSeek API key, or connect Anthropic, OpenAI, Kimi, GLM, or a custom model endpoint through the provider settings.

DeepSeek Harness on GitHub

3. OpenCode

OpenCode is a coding agent with a terminal and desktop app that connect to a wide range of AI models. You can change model providers without rebuilding your project setup.

opencode-ai-coding-agent

The desktop app runs multiple sessions in tabs, displays diffs, and includes a browser for inspecting the app you’re building. You can also steer sessions through the OpenCode web UI.

Read More: OpenCode Cheat Sheet: CLI Commands, Shortcuts & Config

OpenCode discovers project skills in .claude/skills/ and falls back to CLAUDE.md in directories without an AGENTS.md file. To reconnect an MCP server, add a definition under mcp in your project’s opencode.json.

Features:

  • Search code, edit multiple files, and run shell commands.
  • Investigate a change in Plan mode and switch to Build to implement it.
  • Delegate research and code exploration to built-in or custom subagents.
  • Define reusable commands, skills, and plugins for your projects.
  • Control agents from scripts and CI jobs using the SDK.
  • Undo changes using filesystem snapshots.
  • Set per-agent permissions for sensitive reads, file edits, commands, and external tools.

License: MIT.

Model access: OpenCode includes free hosted models you can use without an account. You can use your own API key, a ChatGPT Plus/Pro or GitHub Copilot subscription, or Ollama for local inference.

Download OpenCode

4. Pi

Pi is a compact terminal coding agent for macOS, Windows, and Linux that you can customize to match your workflow. Start it inside a project and describe the change you need.

pi-ai-coding-agent-free

The agent has a small set of built-in coding tools. You can add planning and multi-agent workflows through extensions and packages.

Read More: Pi Coding Agent Cheat Sheet: Commands, Flags & Shortcuts

Pi reads project instructions from context files, including CLAUDE.md and AGENTS.md. Copy a Claude MCP server entry under mcpServers in .pi/mcp.json. After trusting the checkout, run pi mcp list to check the connection or open /mcp to manage servers within a session.

Features:

  • Read and edit code, run shell commands, and include file or image attachments as context.
  • Resume, branch, and export coding sessions.
  • Create prompt templates and skills for repeated development tasks.
  • Add tools, commands, event handlers, and custom interfaces through extensions.
  • Share custom setups as Pi packages and automate tasks through JSON mode or the SDK.
  • Connect external services through the built-in MCP client.

License: MIT.

Model access: Connect a subscription or provider API key. You can also use a local GGUF model through llama.cpp or configure a server such as Ollama in ~/.pi/agent/models.json.

Pi on GitHub

5. OpenHands

OpenHands Agent Canvas combines a browser-based coding workspace with a native development agent. You can host it on your own machine or server, connect a repository, and ask the agent to make changes in a local or Docker workspace.

OpenHands

Create a Canvas conversation with the native OpenHands agent and select your checkout. Put your repository instructions in AGENTS.md. Open Customize to add skills and MCP servers.

Features:

  • Inspect repositories, edit files, and execute development commands.
  • Review code changes from a browser-based workspace.
  • Manage and branch conversations across multiple agent backends.
  • Customize the native agent with skills, plugins, and MCP integrations.
  • Automate recurring development tasks with schedules or webhook triggers, such as checking new GitHub issues.
  • Build custom workflows with the OpenHands agent SDK.

License: MIT (Agent Canvas and agent SDK).

Model access: Configure a hosted provider key or connect a model server such as Ollama or LM Studio.

OpenHands on GitHub

6. Cline

Cline brings the coding agent into VS Code through its open-source extension. Open a repository and work through a bug or new feature from the Cline sidebar. Review the resulting file changes alongside your code.

Cline CLI

Move your standing project instructions into AGENTS.md or .clinerules/. Cline discovers skills in .claude/skills/, so those folders can stay where they are. In the extension, open MCP Servers -> Configure MCP Servers and add your servers under mcpServers.

Read More: Cline CLI Cheat Sheet: Commands, Flags & Shortcuts

Features:

  • Investigate a change in Plan mode before switching to Act to implement it.
  • Edit files and run terminal commands with an approval workflow.
  • Enable auto-approval for actions you want Cline to handle independently.
  • Keep task history and resume interrupted sessions.
  • Restore file changes using Git-based checkpoints.
  • Configure persistent project rules, reusable skills, and MCP tools.

License: Apache-2.0

Model access: Select a free model when available through Cline’s model picker, connect a provider key such as OpenAI or Anthropic, or run a local model through Ollama or LM Studio.

Cline on GitHub

7. Goose

Goose is an open-source agent for coding and other development tasks, such as preparing release notes from merged pull requests. It ships with a Developer extension for working on your codebase and runs on macOS, Windows, and Linux.

Goose

Goose reads AGENTS.md and .goosehints by default. You can also add CLAUDE.md by setting the CONTEXT_FILE_NAMES environment variable to ["AGENTS.md", ".goosehints", "CLAUDE.md"].

Features:

  • Inspect code structure, edit files, run shell commands, and test changes using built-in extensions.
  • Enable or disable extensions from within a session.
  • Set manual, smart, or automatic approval modes for tool actions.
  • Save repeatable tasks with parameters and tool settings as recipes.
  • Delegate research or development tasks to subagents through the Summon extension.
  • Discover skills globally and per project, and load their instructions when needed.

License: Apache-2.0.

Model access: Choose a hosted provider with your own API key or a subscription. Select Ollama in the provider settings and choose a model with tool-calling support to run it on your computer.

Goose on GitHub

8. CodeWhale

CodeWhale, formerly DeepSeek TUI, is a Rust-based coding agent with terminal releases for macOS, Windows, and Linux.

deepseek-tui-claude-code-alternative

If your Claude Code setup relies on plugins that bundle multiple skills, commands, or MCP servers, CodeWhale can import their components and use them with a different model provider.

To keep your Claude project instructions, set project_instruction_imports = ["claude"] in ~/.codewhale/config.toml. Run /import-claude to prepare a report and a configuration bundle with the settings and MCP servers you can import.

Features:

  • Read and edit repositories, execute commands, and manage Git operations.
  • Delegate work to multiple agents for larger coding tasks.
  • Load standalone Claude Code skills and supported plugin components, including commands, agent profiles, and MCP declarations.
  • Review file and command access through configurable approval settings.
  • Track model usage and session costs when provider pricing is available.
  • Retain session receipts for reviewing agent activity.
  • Restrict command execution with Seatbelt on macOS or bubblewrap on Linux.

License: MIT.

Model access: DeepSeek is the default provider, and you can use your own API keys or run a model with Ollama, vLLM, or SGLang.

CodeWhale releases

9. Kilo Code

Kilo Code combines a VS Code extension with a terminal client that shares the same agent runtime. The VS Code Agent Manager runs multiple tasks side by side, so you can ask one agent to work on a new feature and another to review code.

Kilo Code

Kilo has an experimental Claude Code importer in Settings -> Experimental -> Claude Code Migration. The importer runs once when the Kilo backend next starts. It imports global instructions, standalone skills containing only SKILL.md, and top-level MCP definitions from ~/.claude.json.

Project-level CLAUDE.md files still work. Enable Claude Code Compatibility to discover .claude/skills/, and convert project-level .mcp.json entries to the mcp format in kilo.jsonc.

Features:

  • Plan changes, modify code, and run development commands from VS Code or the CLI.
  • Define custom agents and subagents with their own roles, models, and permissions.
  • Review changes inline and restore earlier file states with enabled checkpoints.
  • Resume Claude Code transcripts in the CLI with /resume-claude.
  • Share project instructions, skills, and MCP servers across Kilo clients.

License: MIT.

Model access: Kilo Gateway offers free models with provider rate limits. Connect your own API key for paid inference or choose a local Ollama or LM Studio server.

Kilo Code on GitHub

10. Grok Build

Grok Build is xAI’s coding agent with an open-source CLI and agent runtime for macOS, Windows, and Linux. Its fullscreen terminal UI includes an agent dashboard, where you can keep track of several coding tasks as they run.

grok-build-coding-cli

Grok Build recognizes CLAUDE.md and can discover Claude skills, hooks, and MCP configuration. Run grok inspect inside your project to see where the settings come from.

Read More: Grok Build CLI Cheatsheet: Commands, Shortcuts, Config, and Workflows

Open /hooks to review available hooks or use /import-claude to select settings to import in the prebuilt CLI. You can keep MCP server definitions in ~/.claude.json or the project’s .mcp.json.

Features:

  • Explore files, implement patches, and execute shell commands.
  • Approve a plan before the agent starts editing normal project files.
  • Delegate tasks to parallel subagents and manage background work.
  • Register plugins, skills, custom commands, hooks, and MCP servers.
  • Inspect discovered project configuration and control tool permissions.
  • Save workflows to repeat multi-agent development tasks in the prebuilt CLI.

License: Apache-2.0

Model access: Sign in to the prebuilt CLI to try it for free. For local inference, compile the open-source version and point it at your model server using config.toml.

Grok Build on GitHub

How to Switch From Claude Code Without Starting Over

Try one real coding task in your existing project to evaluate a replacement. Make a fresh Git branch and bring over the three parts of your Claude Code setup that the task needs.

Project instructions: If the new agent expects AGENTS.md, move the applicable rules from CLAUDE.md into it. For a Node.js project, your shared instructions might look like this:

# Project instructions
- Use npm to manage dependencies.
- Edit source files. The build generates files in dist/.
- Run npm test before proposing a patch.
- Report the files changed and the checks run.

Skills: Copy the full folder of one skill you use regularly, including scripts and reference files. Codex can use .agents/skills/<name>/SKILL.md, and OpenCode can discover .claude/skills/ directly. If the skill calls a Claude-specific tool, adapt that step to the new agent.

MCP servers: Move one server’s command, arguments, or remote URL into the new agent’s configuration. Sign in again if the server uses OAuth, and configure your approval rules in the new agent. For hooks that run essential checks, configure the new agent’s equivalent hook or include the check in your project’s test script.

Once the setup is in place, ask the new agent to fetch a bug report through MCP, write a regression test using your skill, and fix the issue. Review its diff and test output to see whether it can handle the same workflow you used in Claude Code.

Frequently Asked Questions

Can I still use Claude models with an open-source alternative?

Yes. OpenCode, Cline, Pi, and several other agents can connect to Anthropic’s API. You’ll need an Anthropic API key or an AI provider that offers Claude models. Claude subscription logins, including Pro and Max, are reserved for Anthropic’s native products under Anthropic’s authentication policy.

Are open-source Claude Code alternatives free to use?

You can install or build the open-source agent code without a license fee. Hosted AI models can still charge for inference or impose usage limits. With an AI model running on your own hardware, you can avoid per-token API fees.

Can I use a Claude Code alternative entirely offline?

Yes, if both the agent and an LLM run locally. Download the model and required app/CLI first, and disable tools or MCP servers that need an internet connection. Pick a model with tool-calling support and enough context for your coding tasks.

Related Resources

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!