Open Source Alternatives LogoOpen Source Alternatives
AlternativesBlogAdvertise
Open Source Alternatives LogoOpen Source Alternatives
  1. Home
  2. /
  3. Alternative To
  4. /
  5. Claude Code
Claude Code logo

Open-source alternatives guide

Best Open Source Claude Code Alternatives

The closest match to how Claude Code works is OpenCode. Its MIT repository supports 75+ providers and local models, treats CLAUDE.md as a fallback when AGENTS.md is absent, and documents ChatGPT Plus/Pro subscription login. I'd start there for most terminal work.

If you have invested in Claude configuration files already on disk, I would pick oh-my-pi. It auto-discovers CLAUDE.md, .mcp.json, rules, skills, commands, and hooks on first run, and it documents Anthropic OAuth so your existing Claude subscription keeps working.

Claude Code is all rights reserved and uses Claude models through Anthropic or documented cloud gateway routes. Your project configuration travels as plain files. What I'd focus on is which tool loads those files without a manual rebuild, and what you want to do about provider choice after the move.

By Suraj
Last reviewed September 2026
Official website
Paid
AI & Machine Learning

TL;DR

  • OpenCode: For terminal coding with any model or provider, from Claude API to local Ollama, under an MIT license with ChatGPT Plus/Pro subscription support.
  • oh-my-pi: For anyone with an active Claude subscription and Claude configuration files already on disk, where CLAUDE.md, MCP servers, skills, and hooks load automatically without manual conversion.
  • Codex: For ChatGPT-plan users who want to bring recent Claude Code session history along, via the /import command that covers up to 50 chats from the last 30 days.

Pain points

Why people leave Claude Code

The practical reasons teams compare Claude Code with open-source alternatives before they migrate.

Claude Code's public repository license says all rights reserved. That is a documented constraint with practical consequences. The published repository does not provide an open-source, forkable, self-buildable implementation. When terms change or the service has an outage, there is no fallback you can compile yourself.

Model inference routes through Anthropic's service or documented Claude gateways, not local models and not arbitrary third-party providers. GPT-4o, Gemini, and local Ollama runs are not supported paths. The official documentation covers Claude's own deployment surfaces, including Bedrock and Vertex routes, but those are still Claude models delivered differently. For work that depends on a specific non-Claude model, Claude Code is not the tool. OpenCode covers this directly: 75+ providers plus local models under an MIT license.

The subscription structure can make the economics awkward. Pro runs at $20 a month and Max starts at $100, with metered API usage as a separate route. For consistent high-volume work that may be reasonable. For occasional terminal sessions, you may be paying for capacity you do not use.

Configuration is portable in the sense that CLAUDE.md, .mcp.json, skills, hooks, and settings are plain files you can copy. What is not documented is a single-command neutral export that packages your full configuration plus recent sessions for handoff to another tool. Claude Code stores local session transcripts and documents /export; no single command bundles all configuration and sessions for migration. For anyone with a substantial Claude configuration on disk, oh-my-pi is the most direct answer: it auto-discovers those files and loads them on first run.

If any of these constraints are the reason you're looking, the nine MIT- or Apache-2.0-licensed tools in this guide address different combinations of them. The deciding question is whether you want provider freedom, configuration portability, or both.

At a glance

Quick comparison

NameLicenseHostingBest For
OpenCodeMITLocal-firstBroad provider and model choice in a terminal-first client, MIT-licensed with CLAUDE.md compatibility
oh-my-piMITLocal-firstDirect Claude configuration inheritance with Anthropic subscription support
kilocodeMITLocal-firstDocumented Claude transcript import with IDE and CLI surfaces
GooseApache-2.0Local-firstACP subscription bridge that reuses an existing Claude Code or ChatGPT subscription
codexApache-2.0Local-firstChatGPT-plan access with first-party Claude Code session import
ClineApache-2.0Local-firstAgentic coding across the editor and terminal that reuses your Claude subscription, skills, and sessions; move CLAUDE.md by hand
AiderApache-2.0Local-firstGit-centric pair programming where each change is committed under the default auto-commit workflow and the last commit is undoable
OpenHandsMITDocker/self-hostedServer and cloud coding workflows with Claude-compatible hooks and SDK subagent delegation
fxApache-2.0Local-firstTiny embeddable agent for shell pipelines, CI sandboxes, and embedding in a larger program, installed as one native binary

Core license

All rights reserved

All nine are MIT or Apache-2.0: OpenCode, oh-my-pi, Kilo Code, and OpenHands are MIT; Goose, Codex CLI, Cline, Aider, and fx are Apache-2.0

Model choice

Claude only; Bedrock/Vertex and gateway routes are Claude deployments, not arbitrary providers

OpenCode: 75+ providers plus local; oh-my-pi: 60+ including Ollama; Kilo, Cline: multi-provider plus Ollama/LM Studio; Goose, Aider: multi-provider plus local; Codex: ChatGPT plus local in oss mode; OpenHands: provider-agnostic SDK; fx: Gateway or ChatGPT/Grok, local advertised without setup docs

Claude subscription reuse

Yes (native Claude plan access)

oh-my-pi: yes, Anthropic OAuth; Goose: yes via ACP, fork/resume unavailable for ACP sessions; Cline: yes via the Claude Code provider; all others: not documented or explicitly no

ChatGPT subscription reuse

Not documented

OpenCode, oh-my-pi, Kilo, Goose, Codex, Cline, OpenHands, fx: yes; Aider: no (docs say subscription is not API access)

CLAUDE.md reads

Yes (native)

oh-my-pi: auto-discovery on first run; OpenCode: fallback when AGENTS.md absent; Kilo, Goose, OpenHands: yes with configuration; Codex: configurable fallback filename; Aider: manual, passed in with its read option; Cline: not documented, .clinerules; fx: not documented, AGENTS.md only

Claude session import

Local JSONL transcripts plus /export; no bundled migration export

Codex: /import covers setup/projects/recent chats, capped at 50 chats from 30 days; Kilo: /resume-claude imports transcripts; Cline: SDK imports Claude Code history from ~/.claude/projects; others: not documented

Editorial ranking

9 Best Open Source Claude Code Alternatives (Ranked)

icon of OpenCode

Rank 1

OpenCode

Broad provider and model choice in a terminal-first client, MIT-licensed with CLAUDE.md compatibility
207.1K stars27.1K forksTypeScriptMIT
OpenCode terminal session searching a repo and reading files before an edit

OpenCode is a terminal coding agent with 75+ providers and local model support, a documented ChatGPT Plus/Pro subscription path, and CLAUDE.md loaded as a fallback when AGENTS.md is absent. The GitHub Actions/App integration can branch, commit, and open pull requests; the CLI's opencode pr fetches and checks out an existing pull request. Sessions can be resumed, forked, exported as JSON, or shared by link.

Key Features

  • 75+ providers plus local models; ChatGPT Plus/Pro subscription via browser sign-in
  • CLAUDE.md as fallback when AGENTS.md is absent; .claude/skills as a documented fallback path
  • GitHub Actions/App integration for branch, commit, and PR creation; opencode pr checks out an existing PR in the CLI
  • Session resume, fork, export/import JSON, and share URL
  • Local web UI alongside TUI; desktop beta; IDE/ACP server mode
  • Subagents, MCP, plugins/hooks, skills, and custom commands

Pros

  • MIT repository with many install routes: curl, npm-family packages, Homebrew, Scoop, and Nix
  • CLAUDE.md compatibility means your project instruction file travels without rewriting
  • Any-provider freedom lets you swap Claude for a local model or a ChatGPT plan without changing your workflow

Cons

  • Claude Pro/Max subscription reuse is explicitly not supported; the first-party provider page says Anthropic prohibits the route; oh-my-pi or Goose cover that path instead
  • MCP servers from .mcp.json need manual translation into OpenCode's config format and re-approval; no direct importer is documented
  • Hosted provider services are separate from the core MIT repository

License & Hosting

MIT. The TUI, web UI, and desktop surfaces all run locally, no server required from anyone else. Available as a local TUI, local web UI, desktop beta, and IDE/ACP server. Install via curl, npm-family packages, Homebrew, Scoop, or Nix. Source: github.com/anomalyco/opencode.

Best For

I'd start here for most people who want provider freedom in a terminal coding tool. The CLAUDE.md fallback and .claude/skills compatibility mean your project instruction file and skills move without rewriting, and the official GitHub integration automates PR work once its App, workflow, and secrets are set up. Skip OpenCode if you need Claude Pro/Max subscription inference to keep working; that route is explicitly not supported, so oh-my-pi or Goose are the right places to look instead.

View OpenCode on Open Source AlternativesOpenCode websiteSource on GitHub
icon of oh-my-pi

Rank 2

oh-my-pi

Direct Claude configuration inheritance with Anthropic subscription support
31K stars3.2K forksTypeScriptMIT
oh-my-pi terminal session running Python, rendering a plot inline and reporting context and cost in the status bar

oh-my-pi discovers and loads your Claude configuration on first run: CLAUDE.md, AGENTS.md, the project .mcp.json, rules, skills, commands, hooks, and tool/settings files are all picked up automatically. Anthropic OAuth/subscription login is documented, so your existing Claude Pro or Max subscription works without setting up a separate API key. OpenAI Codex/ChatGPT subscription login is also documented.

Key Features

  • Auto-discovers CLAUDE.md, AGENTS.md, project .mcp.json, rules, skills, commands, hooks, and tools/settings on first run
  • Anthropic OAuth and subscription login; OpenAI Codex/ChatGPT subscription login
  • 60+ providers including Ollama; subscription or API key
  • omp commit Git command; subagents; RPC mode; no-session for headless and automation
  • ACP IDE integration

Pros

  • MIT repository; the most direct Claude configuration compatibility of any tool on this shortlist
  • CLAUDE.md, MCP servers, skills, and hooks load without manual conversion; you re-approve rather than rebuild
  • Active Claude subscription keeps working; no new API account or per-token billing required for that path

Cons

  • Own-session resume only; Claude conversation history import is not documented
  • No managed hosted tier established on audited pages; local client with BYOK or subscription auth

License & Hosting

MIT. Every mode (TUI, RPC, and no-session headless) runs on your machine, no server required from anyone else. Local terminal TUI with RPC and ACP modes. Install via curl, Homebrew, Bun, Nix, or Windows package routes. Local client only; BYOK or subscription authentication; no documented managed hosting. Source: github.com/can1357/oh-my-pi.

Best For

I'd start here for anyone who has an active Claude Pro or Max subscription and significant Claude configuration already on disk. The rules, skills, MCP servers, and hooks move without manual conversion; you're re-approving what already exists, not rebuilding it. The deciding detail is whether those configuration files are the asset you want to preserve. RPC mode and no-session headless paths are available if you need to drive it from automation without an interactive session. Skip oh-my-pi if you have no existing Claude config and want the widest model agnosticism; OpenCode is the better starting point in that case.

View oh-my-pi on Open Source Alternativesoh-my-pi websiteSource on GitHub
icon of kilocode

Rank 3

kilocode

Documented Claude transcript import with IDE and CLI surfaces
27.3K stars3.2K forksTypeScriptMIT
Kilo Code in VS Code beside the Kilo CLI prompt with model picker and agents shortcut

Kilo Code offers /resume-claude, which imports Claude Code transcripts from ~/.claude/projects/, skips unsupported outputs, and reports what it skipped. CLAUDE.md and AGENTS.md are both recognized as instruction files. .claude/skills loads when compatibility is enabled. The MIT core covers the local CLI and IDE clients; Slack is a hosted Cloud Agent surface with a separate account, credits, and terms.

Key Features

  • /resume-claude imports Claude Code transcripts; skips and counts unsupported outputs
  • CLAUDE.md and AGENTS.md recognized as instruction files
  • .claude/skills loads with compatibility enabled
  • ChatGPT Plus/Pro subscription documented; multi-provider and local models including Ollama and LM Studio
  • VS Code, JetBrains, and CLI clients in the MIT core; Slack via the hosted Cloud Agent; subagents/custom modes; MCP; plugins/hooks
  • Session resume, export, and fork; headless CLI automation

Pros

  • /resume-claude is one of two documented paths for moving Claude session transcripts (alongside Codex's /import)
  • Multi-surface: IDE and CLI share the same configuration, so switching contexts during a task does not mean switching tools

Cons

  • Claude subscription reuse not documented; audited authentication pages establish API key, not Claude-plan login
  • Git commit-message generation is documented for the VS Code extension only, not the CLI or TUI
  • MIT label covers the repository code; hosted/team/cloud services have separate terms not included in that license

License & Hosting

MIT core repository; hosted/team/cloud services have separate terms not covered by the repo license. No server required for the core MIT functionality; the CLI and IDE extensions run on your machine. Available as VS Code, JetBrains, and CLI clients; Slack and cloud surfaces run on the hosted Cloud Agent. Global npm install for the CLI. Source: github.com/Kilo-Org/kilocode.

Best For

I'd choose Kilo if you want the /resume-claude import path and plan to move between IDE and CLI. The combination of transcript import and multi-surface availability makes it the clearest fit for mixed IDE/terminal workflows. Session resume, export, and fork are also available within Kilo's own sessions, so you do not lose continuity after the initial transcript import. Skip it if you need Claude subscription auth (not documented on the audited pages), or if you expect the MIT label to extend to the hosted services.

View kilocode on Open Source Alternativeskilocode websiteSource on GitHub
icon of Goose

Rank 4

Goose

ACP subscription bridge that reuses an existing Claude Code or ChatGPT subscription
54.2K stars6.2K forksRustApache-2.0
goose configure first-run flow in the terminal: telemetry choice and provider setup menu

Goose documents ACP reuse of both existing Claude Code subscriptions and ChatGPT Plus/Pro subscriptions. No new API account is required for those paths. AGENTS.md loads by default, and CLAUDE.md can be added via CONTEXT_FILE_NAMES. Goose discovers .claude/skills and .claude/agents automatically. The tool runs locally as a CLI or desktop application, with experimental VS Code/ACP integration.

Key Features

  • ACP reuse of an existing Claude Code subscription; ChatGPT Plus/Pro via ACP, with no new API account required for those paths
  • AGENTS.md loads by default; CLAUDE.md configurable via CONTEXT_FILE_NAMES
  • .claude/skills and .claude/agents discovered automatically
  • Subagents (sequential and parallel); MCP; lifecycle hooks under .agents/plugins; recipes; headless JSON modes
  • Apache-2.0, maintained under AAIF

Pros

  • If you have a Claude Code or ChatGPT Plus/Pro subscription, Goose can reuse it without separately metered provider API credentials for that path
  • .claude/skills and .claude/agents discovery means those artifacts travel without manual relocation
  • Recipes provide reusable multi-step workflows without a custom plugin, which can simplify routine automation

Cons

  • ACP sessions do not support fork or resume; native Goose sessions do resume, so the limitation only applies to ACP-authenticated work
  • CLAUDE.md is not the default instruction file; it requires adding it explicitly via CONTEXT_FILE_NAMES
  • Direct project .mcp.json import not documented; recreate MCP configuration as Goose extensions
  • Built-in local Git commit/PR workflow not documented in the audited core pages

License & Hosting

Apache-2.0, maintained under AAIF. Available as a local CLI or desktop application, no server required for the core installation. Local desktop, CLI, and API surfaces. Shell installer with platform-specific paths. Experimental VS Code/ACP integration. No separate managed hosted tier established on audited pages. Source: github.com/aaif-goose/goose.

Best For

I'd start with Goose specifically when the requirement is reusing an existing Claude Code or ChatGPT Plus/Pro subscription without opening a new API account. Keep the ACP session-resume limitation in mind before relying on it for long-running work; if session continuation matters, native Goose sessions are the right path, not ACP.

View Goose on Open Source AlternativesGoose websiteSource on GitHub
OpenAI logo

Rank 5

codex

ChatGPT-plan access with first-party Claude Code session import
123.9K stars19.1K forksRustApache-2.0
Codex CLI terminal session with model and directory header, a plan and explored steps

Codex is Apache-2.0 for its CLI, SDK, and App Server components. ChatGPT sign-in or plan access works for inference. The /import command maps supported Claude Code setup and project material, skills, hooks, MCP configuration, subagents, and up to 50 chats from the last 30 days. AGENTS.md is native; configurable fallback filenames can include CLAUDE.md. Local Ollama and LM Studio are available via --oss.

Key Features

  • Apache-2.0 (CLI, SDK, App Server); IDE extension and Codex cloud are not open source
  • ChatGPT sign-in or plan access; local Ollama and LM Studio via --oss
  • /import from Claude Code: supported setup/project material, skills, hooks, MCP, subagents, and up to 50 chats from last 30 days
  • AGENTS.md native; configurable fallback filenames can include CLAUDE.md
  • Subagents, MCP, hooks, skills; codex exec headless; JSON output modes

Pros

  • First-party /import is one of two structured documented paths for Claude Code handoff, alongside Kilo Code's /resume-claude
  • ChatGPT plan reuse means no separate API account for existing subscribers
  • --oss brings Ollama and LM Studio into the same terminal tool without switching clients

Cons

  • IDE extension and Codex cloud are explicitly not Apache-2.0; open-source scope is CLI, SDK, and App Server only
  • Claude subscription auth not documented; the documented subscription path is ChatGPT
  • /import has restrictions: unavailable during active tasks, remote sessions, or daemon attachment; capped at 50 chats from the last 30 days
  • Desktop app licensing was not independently characterized beyond the official component table

License & Hosting

Apache-2.0 for the CLI, SDK, and App Server. The CLI, SDK, and App Server all run on your machine, no server required for the open-source components. The IDE extension and Codex cloud are explicitly not open source. Local CLI on macOS, Linux, and Windows. Source: github.com/openai/codex.

Best For

I'd start with Codex if you're already on a ChatGPT plan and want the most structured import of your recent Claude Code sessions. The 50-chat, 30-day cap means recent context moves but older history stays behind. Plan for the authentication review and tool permission checks that follow any import before enabling shell access.

View codex on Open Source Alternativescodex websiteSource on GitHub
icon of Cline

Rank 6

Cline

Agentic coding across the editor and terminal that reuses your Claude subscription, skills, and sessions; move CLAUDE.md by hand
68K stars7.3K forksTypeScriptApache-2.0
Cline CLI prompt screen in the terminal: the Cline logo, a What can I do for you prompt, an input box, and a status bar with the selected Claude model, session cost, the repository state, and the Plan and Act toggle

Cline is an agentic coding tool that runs across VS Code, JetBrains, the terminal, and a desktop app, and it keeps more of your Claude setup than a first look suggests. It reuses your Claude Max or Pro subscription through its Claude Code provider, auto-discovers your .claude/skills, and imports your Claude Code session history through its SDK. It ranks here for one specific gap. It does not document loading your CLAUDE.md automatically, so that one file you move by hand.

Key Features

  • Runs across VS Code, JetBrains, the CLI, a desktop app, an SDK, and a Kanban board; the CLI installs with npm install -g cline, and its packaged binaries run with no Node.js, Bun, or Zig runtime.
  • Connects to Anthropic, OpenAI, and Google, plus local models through Ollama, LM Studio, and any OpenAI-compatible endpoint; the Claude Code provider signs in with your Claude Max or Pro subscription.
  • Discovers .claude/skills, runs MCP servers and hooks under .cline/hooks, adds experimental read-only subagents, and layers plugins through the SDK, CLI, and Kanban.
  • An optional external Cline Kanban companion documents Commit and Open PR actions, and the SDK's session importer reads Claude Code history from ~/.claude/projects.

Pros

  • It reuses the Claude subscription you already pay for through the Claude Code provider, so a Claude Pro or Max plan drives it without a separate API key and a ChatGPT plan works too through the OpenAI Codex route.
  • Your .claude/skills come across automatically and your Claude Code sessions import through the SDK, so two of the pieces that usually need a manual rebuild move for you.
  • One tool spans the editor and the terminal, so a team split between VS Code and the shell shares one set of rules, servers, and skills instead of two.

Cons

  • Automatic CLAUDE.md loading is not documented; you point Cline at .clinerules or .cline/rules, or move that file's content in by hand.
  • The CLI auto-approves tool calls by default; set --auto-approve false when you want a prompt before each file change and command.
  • Plugins are documented for the SDK, CLI, and Kanban, not the VS Code or JetBrains extensions, and the JetBrains plugin is not open source.

License & Hosting

The core repository is Apache-2.0. You install Cline locally and it runs on your machine with no server required from anyone else, either through the global npm package or a packaged binary that carries no separate runtime, with your own provider credentials. The client is free to run; model inference may be billed by your provider or plan, and vendor-hosted services are separate from the open-source client.

Best For

People who want one agent across the editor and the terminal that reuses a Claude or ChatGPT subscription and carries their .claude/skills and Claude sessions across. If the file you most need to keep is your CLAUDE.md, oh-my-pi and Kilo Code read it directly and Cline does not, so start there instead. Reach for Cline when subscription reuse, editor-and-terminal reach, and skills and session import matter more than automatic CLAUDE.md loading.

View Cline on Open Source AlternativesCline websiteSource on GitHub
Icon for Aider

Rank 7

Aider

Git-centric pair programming where each change is committed under the default auto-commit workflow and the last commit is undoable
48.5K stars4.9K forksPythonApache-2.0
Aider terminal session applying a one-line edit and auto-committing it to Git

Aider commits automatically after every accepted change, with /undo and /diff available in the same session. Multi-file edits, /run, /test, and --yes for one-shot scripted tasks are all documented. It supports API-key cloud providers such as Anthropic, OpenAI, and Gemini plus local providers such as Ollama. It is deliberately narrower than the other tools on this shortlist.

Key Features

  • Automatic commits, /undo, and /diff after every change
  • Multi-file edits; /run and /test for inline shell and test commands
  • --message and --yes for scripted one-shot tasks
  • Anthropic, OpenAI, Gemini, Ollama, and other cloud/local providers
  • --restore-chat-history for own session; /save reconstructs file context
  • Apache-2.0; terminal-first with an optional browser GUI flag

Pros

  • The commit-and-undo loop is the simplest documented Git workflow on this shortlist; each accepted change lands in history immediately
  • Broad API-key cloud provider support plus local providers, with no subscription dependency
  • Deliberate narrowness means less to configure and fewer surprises in a team setup

Cons

  • MCP client, subagents, and lifecycle hooks are not documented in the audited primary pages
  • ChatGPT subscription explicitly does not include API access; the Aider docs say so
  • Claude subscription login not documented; API key is the documented path
  • Default-branch commit dated 2026-05-22 and latest release v0.86.0 from 2025-08-09; materially older maintenance dates than the rest of this shortlist

License & Hosting

Apache-2.0. No server required; the terminal client and browser GUI flag both run on your machine. Terminal-first with a browser GUI available as a session flag. Python 3.8-3.13 install routes via pip, uv, pipx, or script. Source: github.com/Aider-AI/aider.

Best For

I'd choose Aider when every change needs to be in Git and the commit-and-undo loop is the central workflow. It is deliberately simpler than the other tools here, and that simplicity is the point. Check the maintenance dates before building a team setup around it; the most recent activity is older than the rest of this shortlist, and that is worth knowing before you commit to it as a team standard.

View Aider on Open Source AlternativesAider websiteSource on GitHub
OpenHands logo

Rank 8

OpenHands

Server and cloud coding workflows with Claude-compatible hooks and SDK subagent delegation
87.8K stars11.5K forksTypeScriptMIT
OpenHands Agent Canvas automations view with scheduled agent jobs on sample repos

OpenHands is MIT-licensed at its core and covers CLI, headless, web/server, SDK, cloud, and ACP-based IDE surfaces. The SDK supports sequential and parallel subagent delegation via TaskToolSet. Repository hooks at .openhands/hooks.json are documented as format-compatible with Claude Code hooks. AGENTS.md is recommended; CLAUDE.md is supported as optional permanent context. ChatGPT Plus/Pro subscription login is documented.

Key Features

  • MIT core; CLI, headless, web/server, SDK, cloud, and ACP IDE surfaces (Zed, JetBrains, community VS Code extension)
  • ChatGPT Plus/Pro subscription; provider-agnostic SDK with many LLMs and local model routes
  • Subagents via SDK/TaskToolSet: sequential and parallel delegation documented
  • Claude-compatible hooks at .openhands/hooks.json; plugins can bundle hooks, MCP, agents, skills, and commands
  • AGENTS.md recommended; CLAUDE.md supported as optional permanent context
  • Cloud/GitHub PR integration; headless mode with JSONL output

Pros

  • The SDK documents both sequential and parallel subagent delegation, so multi-step work can be split without a custom orchestrator
  • Hook format is Claude-compatible, so existing hook logic can often move to .openhands/hooks.json with minimal rewriting
  • GitHub Cloud integration handles PR workflows, code review, and issue resolution without a separate automation script

Cons

  • Claude subscription login not documented for the standard LLM path; the subscription guide says OpenAI is the current vendor
  • Headless mode always approves actions; know this boundary before putting it in an automated pipeline
  • Direct project .mcp.json import not documented; recreate MCP configuration or package it inside a reviewed plugin
  • The OpenHands/enterprise repository is PolyForm source-available, not MIT; keep it separate from core feature claims

License & Hosting

MIT core repo; OpenHands/enterprise is a separate PolyForm source-available repository. The current CLI installs with uv on Python 3.12+, an executable binary installer, or Docker; the older separate OpenHands-CLI repository is no longer actively maintained. Local, self-hosted, or OpenHands Cloud. Source: github.com/OpenHands/OpenHands.

Best For

I'd choose OpenHands when the goal is a server-grade, SDK-driven pipeline or a cloud PR workflow rather than an interactive terminal session. The headless always-approve behavior is the main constraint to understand before scripting it. Use the current main repository, not the deprecated standalone OpenHands-CLI; and attribute MIT to the core, not to any enterprise features.

View OpenHands on Open Source AlternativesOpenHands websiteSource on GitHub
icon of fx

Rank 9

fx

Tiny embeddable agent for shell pipelines, CI sandboxes, and embedding in a larger program, installed as one native binary
2.9K stars325 forksZigApache-2.0
fx first-run screen in the terminal: sign-in options and the experimental auto-mode note

fx is a coding agent CLI from Vercel Labs written in Zig, a 6.17 MiB Apache-2.0 native binary with no runtime dependencies. Its interface stays closer to a Unix shell than an IDE in the terminal. It reads AGENTS.md project instructions, starts in an auto permission mode that reviews sensitive actions, saves and resumes sessions with fx -r and fx resume last, and supports skills, MCP servers, and subagents. fx ask runs one noninteractive request, and fx ask --json returns structured fields for scripting. The README labels the whole project experimental and says use at your own risk.

Key Features

  • Single 6.17 MiB native binary; install with one curl command, no runtime, no container
  • AGENTS.md project instructions, global and per-directory, with the narrowest scope winning
  • Skills, MCP servers, and subagents; sessions with save, resume, recover, and compact
  • fx ask and fx ask --json for noninteractive and scripted use
  • fx acp serves the Agent Client Protocol for editors; the libfx npm package embeds the agent core in Node or WebAssembly hosts
  • Auto and ask permission modes; file changes, commands, and external paths go through the permission policy

Pros

  • A vendor-reported 6.17 MiB native binary with an explicit libfx embedding surface for Node and WebAssembly hosts
  • Shell-shaped output that preserves scroll history composes naturally in pipelines and CI jobs
  • Despite the small binary, fx supports skills, MCP servers, and subagents

Cons

  • Experimental by the vendor's own label; the README says use at your own risk
  • Vercel AI Gateway is the default documented provider, with ChatGPT and Grok subscription sign-in; the model and authentication pages do not explain the local and direct-provider routes the docs index advertises
  • Claude subscription login is not documented, and neither is CLAUDE.md; instructions live in AGENTS.md
  • No documented hooks or Claude session import; migration means copying instructions into AGENTS.md and reviewing and approving the existing Claude-compatible project .mcp.json

License & Hosting

Apache-2.0. No server required; the CLI runs locally as a single native binary for macOS and Linux on x86_64 and arm64, installed by script or built from source with Zig. Inference goes through the Vercel AI Gateway by default, with ChatGPT and Grok subscription sign-in also documented. Source: github.com/vercel-labs/fx.

Best For

I'd pick fx to script an agent inside a pipeline, a CI sandbox, or another program, where a 6 MiB binary with a JSON output mode is exactly the right shape and none of the bigger tools fit. I would not choose fx as a daily driver replacement for Claude Code: it is experimental by its own README, the model and authentication pages do not explain the local routes its docs index advertises, and Claude subscription login is not documented.

View fx on Open Source Alternativesfx websiteSource on GitHub

Decision framework

How to choose

Use this section to narrow the Claude Code replacement by team size, hosting model, license, and migration difficulty.

The deciding question is what you most need to preserve from your current setup: your Claude subscription, your configuration files, or your session history.

If you have an active Claude Pro or Max subscription and significant configuration on disk, I'd choose oh-my-pi. It auto-discovers CLAUDE.md, MCP servers, skills, hooks, and rules on first run. You re-approve what already exists rather than converting it. If you also want Goose as an option, it documents ACP reuse of an existing Claude Code subscription, but ACP sessions do not support fork/resume, so check that limitation before committing to it for long-running work.

If you have no existing Claude config and want maximum provider freedom, OpenCode is the common-case pick. It covers 75+ providers plus local models, treats CLAUDE.md as a fallback when AGENTS.md is absent, and has a GitHub PR workflow built in. Most people starting from zero should start here.

If you're on a ChatGPT plan and want to bring recent Claude Code session history along, Codex has /import for that. It covers the last 50 chats from 30 days, maps skills, hooks, and MCP configuration, and runs on the same ChatGPT subscription.

If you need the Claude transcript import path and also want to move between IDE and terminal, Kilo Code covers both. The /resume-claude command imports Claude transcripts in the CLI, and the VS Code, JetBrains, and CLI clients read the same shared configuration.

If you want one agent across the editor and terminal that reuses your Claude subscription and carries your skills, Cline fits. It signs in with a Claude Max or Pro plan through the Claude Code provider, auto-discovers .claude/skills, and imports your Claude Code sessions via its SDK. Its one gap is CLAUDE.md, which it does not load automatically, so if that file matters most, oh-my-pi or Kilo Code read it directly instead.

For a deliberately minimal Git workflow where each change commits under Aider's default auto-commit setting and /undo reverts the last Aider commit, I'd pick Aider. Check its maintenance dates before building a team standard around it.

For server-grade pipelines, SDK-driven subagent delegation, or GitHub PR workflows, OpenHands is the strongest fit. The headless always-approve mode and the enterprise boundary from the MIT core are the two things to know going in.

If you want a very small agent to script in a pipeline or embed in another program, fx is a 6.17 MiB native binary with fx ask --json for structured output and an ACP and WebAssembly embedding surface. Its own README labels it experimental, and the model and authentication pages do not explain the local routes its docs index advertises, so I'd keep it for scripting and embedding rather than daily terminal work.

Complete directory list

All alternatives to Claude Code

icon of OpenCode

OpenCode

Free

OpenCode is an open-source AI coding agent that assists developers in

Key differentiator

Broad provider and model choice in a terminal-first client, MIT-licensed with CLAUDE.md compatibility

207.1K stars27.1K forksTypeScriptMIT
OpenAI logo

codex

Free

OpenAI's terminal coding agent, Apache-2.0 licensed

Key differentiator

ChatGPT-plan access with first-party Claude Code session import

123.9K stars19.1K forksRustApache-2.0
icon of pi

Pi

Free

The minimal, self-extensible coding agent for the terminal

Key differentiator

Run a self-extensible coding agent in your terminal with a minimal TypeScript core, TUI, persistent branching sessions, and 30+ LLM providers

104.8K stars13.2K forksTypeScriptMIT
OpenHands logo

OpenHands

Free

Delegate scoped coding tasks in isolated, reviewable agent sessions

Key differentiator

Server and cloud coding workflows with Claude-compatible hooks and SDK subagent delegation

87.8K stars11.5K forksTypeScriptMIT
icon of Cline

Cline

Free

VS Code AI agent that plans and edits across your entire project

Key differentiator

Agentic coding across the editor and terminal that reuses your Claude subscription, skills, and sessions; move CLAUDE.md by hand

68K stars7.3K forksTypeScriptApache-2.0
icon of Goose

Goose

Free

Run repeatable multi-step coding workflows from CLI or desktop

Key differentiator

ACP subscription bridge that reuses an existing Claude Code or ChatGPT subscription

54.2K stars6.2K forksRustApache-2.0
Icon for Aider

Aider

Free

Git-native terminal coding agent for multi-file edits and clean diffs

Key differentiator

Git-centric pair programming where each change is committed under the default auto-commit workflow and the last commit is undoable

48.5K stars4.9K forksPythonApache-2.0
icon of DeepSeek TUI

DeepSeek TUI

Free

A coding agent that lives in your terminal.

Key differentiator

Run CodeWhale, formerly DeepSeek TUI, as a terminal coding agent for DeepSeek V4, shell tools, MCP, approvals, rollback, and sessions

41K stars3.6K forksRustMIT
icon of oh-my-pi

oh-my-pi

Free

A coding agent with the IDE wired in

Key differentiator

Direct Claude configuration inheritance with Anthropic subscription support

31K stars3.2K forksTypeScriptMIT
icon of agentmemory

agentmemory

Free

Persistent memory for AI coding agents

Key differentiator

Track persistent memory for AI coding agents across sessions

28.4K stars2.5K forksTypeScriptApache-2.0
icon of kilocode

kilocode

Free

Open source AI coding agent. 500+ models at zero markup.

Key differentiator

Documented Claude transcript import with IDE and CLI surfaces

27.3K stars3.2K forksTypeScriptMIT
icon of t3code

t3code

Free

Control your coding agents from one interface

Key differentiator

Orchestrate Claude Code, Codex, Cursor, and other coding agents from one interface

22.6K stars5.7K forksTypeScriptMIT
icon of jcode

jcode

Free

Next-gen coding agent harness for efficient workflows

Key differentiator

Run multi-session coding agent workflows from the terminal with full LLM provider choice and zero per-seat fees

19.6K stars2.3K forksRustMIT
icon of fx

fx

Free

Native Zig CLI coding agent, 7.8 MiB, any AI model.

Key differentiator

Tiny embeddable agent for shell pipelines, CI sandboxes, and embedding in a larger program, installed as one native binary

2.9K stars325 forksZigApache-2.0

Migration

Migration notes for leaving Claude Code

I'd group the migration effort into three tiers. Direct/automatic: oh-my-pi discovers CLAUDE.md, .mcp.json, rules, skills, commands, hooks, and tool settings on first run. Partial/configured with documented paths: OpenCode, Kilo Code, Goose, Codex, Cline, and fx each document compatibility for some files but need manual work for others. Manual rebuild: for Aider and OpenHands no automatic importer is documented; I'd supply instruction files explicitly and recreate MCP, hooks, and skills by hand.

Before you start: keep a clean copy of the repository config. Remove API keys, machine-specific paths, and tokens before copying anything. Inspect every instruction file, MCP definition, skill, and hook as executable configuration before enabling it.

What moves by target:

oh-my-pi discovers CLAUDE.md, AGENTS.md, project .mcp.json, rules, skills, commands, hooks, and tool settings on first run. Revalidate provider authentication and approval modes.

OpenCode treats CLAUDE.md as a fallback when AGENTS.md is absent and recognizes .claude/skills. Translate MCP servers into OpenCode's config format and re-approve one at a time; rebuild Claude hooks as OpenCode plugins.

Kilo Code recognizes CLAUDE.md and AGENTS.md and loads .claude/skills with compatibility enabled. Use /resume-claude for session transcripts; it skips and reports unsupported outputs. Translate MCP servers into Kilo's format and approve each one.

Goose loads AGENTS.md by default. Add CLAUDE.md via CONTEXT_FILE_NAMES. Goose discovers .claude/skills and .claude/agents. No native import of MCP servers or Claude hooks; recreate them as Goose extensions and Open Plugins.

Codex /import covers supported Claude Code setup/project material, skills, hooks, MCP config, subagents, and up to 50 chats from 30 days. The import is unavailable during active tasks, remote sessions, or daemon attachment; review tool restrictions and hook semantics afterward.

Cline auto-discovers .claude/skills, reuses a Claude subscription through its Claude Code provider, and imports Claude Code sessions from ~/.claude/projects via its SDK. CLAUDE.md is not auto-loaded, so move it into .clinerules by hand and recreate MCP servers and hooks under .cline/.

No automatic importer is documented for Aider. Supply a reviewed instruction or conventions file with --read. --restore-chat-history restores Aider's own previous sessions; Claude session history is not documented as importable. No migration path for MCP, hooks, skills, or subagents is documented.

OpenHands supports CLAUDE.md as optional permanent context and recommends AGENTS.md. Hook format is Claude-compatible, but use .openhands/hooks.json and review path/event differences. No direct .mcp.json importer; recreate or bundle in a plugin.

fx reads AGENTS.md natively; move CLAUDE.md content there. It accepts a Claude-compatible .mcp.json and discovers .claude/skills; hooks and Claude session import are not documented.

Staged move: I'd start in read-only or ask mode, add one MCP server at a time and re-approve it, then run a disposable repository task before enabling write and shell access. Keep your Claude Code setup available until the replacement is reliable.

FAQ

Claude Code alternatives FAQ

Is there a free open-source alternative to Claude Code?

The client software for each of the nine tools in this guide is free to download and run. Inference may incur API or hosted-plan charges, by the token or by plan. The exception is if you already have a qualifying subscription: oh-my-pi documents Anthropic OAuth, Goose documents ACP reuse of an existing Claude Code subscription, and OpenCode, oh-my-pi, Kilo Code, Goose, Codex, Cline, and OpenHands all document ChatGPT Plus/Pro login, while fx documents ChatGPT and Grok subscription sign-in. Local model routes via Ollama or LM Studio avoid provider per-token inference fees if you run the model yourself.

Can I use my existing Claude Pro or Max subscription with any of these tools?

oh-my-pi documents Anthropic OAuth/subscription login, so your Claude subscription works there without a separate API key. Goose documents ACP reuse of an existing Claude Code subscription, but ACP sessions do not support fork or resume the way native Goose sessions do. Cline documents reusing a Claude Max or Pro subscription through its Claude Code provider. No other ranked tool in this guide documents Claude subscription authentication. Seven accept a Claude API key as an alternative; Codex and fx do not document direct Anthropic API-key authentication.

What is the open-source equivalent of Codex CLI for ChatGPT users?

Codex CLI is Apache-2.0, runs locally on macOS, Linux, and Windows, and accepts ChatGPT sign-in or a plan subscription. It follows AGENTS.md conventions with configurable fallback filenames, supports MCP, subagents, hooks, and skills, and documents /import from Claude Code covering supported setup/project material and up to 50 recent chats from the last 30 days. The IDE extension and Codex cloud are not open source; the open-source scope is the CLI, SDK, and App Server.

Which tools run with local models?

OpenCode supports 75+ providers plus local models. oh-my-pi documents many providers including Ollama. Kilo Code supports Ollama, LM Studio, and OpenAI-compatible endpoints. Cline supports Ollama, LM Studio, and OpenAI-compatible endpoints. Goose supports Ollama and other providers. Codex CLI uses --oss for local Ollama and LM Studio. Aider documents API-key cloud providers such as Anthropic, OpenAI, and Gemini plus local providers such as Ollama. OpenHands supports provider-agnostic model selection with local routes documented as having limited functionality in some configurations. fx's docs index advertises local models, but its model and authentication pages do not explain a local route.

Which Claude Code configuration files can I bring to another tool?

I'd start with CLAUDE.md and the MCP config in .mcp.json because those carry the most workflow context. oh-my-pi discovers both automatically on first run. For other tools, copy the files for review after removing any API keys, machine-specific paths, and tokens, translate them into the target's configuration format where required, then re-approve each MCP server before enabling shell access. Skills and hooks need target-specific review because path conventions and event schemas differ between tools.

Is Claude Code still the best coding agent for Anthropic models?

I'd keep Claude Code if you specifically need Anthropic's model quality and the Pro or Max plan makes economic sense for your usage. The nine open-source tools in this guide give you provider freedom and an MIT or Apache-2.0 codebase, but none are Anthropic-specific. If your team uses shared billing on a Team plan, or you depend on IDE and desktop surfaces you haven't found satisfying replacements for, staying put is a reasonable choice.

Can I import my Claude Code session history?

Codex CLI's /import covers supported setup and project material plus up to 50 chats from the last 30 days from Claude Code. The import is unavailable during active tasks, remote sessions, or daemon attachment. Kilo Code's /resume-claude imports Claude Code transcripts from ~/.claude/projects/ and reports skipped outputs. Cline's SDK imports Claude Code session history from the same ~/.claude/projects/ location. The other six tools in this guide do not document Claude Code session import.

Next steps

Related resources

Guide

10 Best Open Source AI Coding Assistants in 2026

AI coding tools lock you to one provider and recurring per-seat pricing. I researched 10 open source options with model choice, local inference, and data ownership.

Category

Developer Tools

Developer Tools covers open-source software that improves developer productivity and code quality: code editors and IDEs, AI-powered coding assistants, testing frameworks, debugging tools, code review platforms, git-adjacent utilities, and documentation generators.

Category

AI & Machine Learning

Browse more open-source tools in AI & Machine Learning.

On this page
  1. TL;DR
  2. Why people leave Claude Code
  3. Quick comparison
  4. Ranked alternatives
    1. 1. OpenCode
    2. 2. oh-my-pi
    3. 3. kilocode
    4. 4. Goose
    5. 5. codex
    6. 6. Cline
    7. 7. Aider
    8. 8. OpenHands
    9. 9. fx
  5. How to choose
  6. All alternatives
  7. Migration
  8. FAQ
  9. Related resources

On this page

  1. TL;DR
  2. Why people leave Claude Code
  3. Quick comparison
  4. Ranked alternatives
    1. 1. OpenCode
    2. 2. oh-my-pi
    3. 3. kilocode
    4. 4. Goose
    5. 5. codex
    6. 6. Cline
    7. 7. Aider
    8. 8. OpenHands
    9. 9. fx
  5. How to choose
  6. All alternatives
  7. Migration
  8. FAQ
  9. Related resources
Open Source Alternatives LogoOpen Source Alternatives

Handpicked Open Source Alternatives to Paid Softwares

Product
  • Categories
  • Tag
  • Sign In
Resources
  • Blog
  • Collection
  • Submit
  • Advertise your tool
Company
  • Privacy Policy
  • Terms of Service
  • Refund Policy
  • Sitemap
Alternatives
  • Claude Code
  • Jira
  • Notion
  • Slack
  • Linear
  • Wispr Flow
  • All alternatives
Copyright © 2026 All Rights Reserved.