Claude Code Alternatives
Claude Code alternatives: OpenCode, Codex CLI, Gemini CLI, Aider and Goose compared by providers, agents, git handling and free tiers.
Updated
short verdict
OpenCode is the closest replacement: a terminal agent with a Tab-switchable read-only plan agent and an open source MIT codebase. Pick Codex CLI if you already pay for a ChatGPT plan, Gemini CLI for its free OAuth tier, Aider for git-commit-per-change editing with local models, and Goose if you want an agent that goes beyond code.
Claude Code is a terminal coding assistant that also runs in IDEs and through GitHub @claude mentions, with a plugin system for custom commands and agents. The alternatives below differ on four points: which models and accounts they accept, whether they edit through git commits or a permissioned agent loop, how you extend them, and whether they stay in the terminal or also ship a desktop app or API.
this page is for
- Developers who want a terminal coding agent from a different vendor or an open source codebase
- Teams that want to use an existing paid plan or a free tier instead of a separate subscription
- Readers who want to run local models or keep conversation data off a vendor's servers
- Developers who want an agent that also covers non-coding tasks
Closest in shape to Claude Code: a terminal TUI agent, but open source (MIT) with a beta desktop app and a read-only plan agent you toggle with Tab.
best for
- Replacing Claude Code with minimal workflow change
- Exploring an unfamiliar codebase without allowing edits
- Developers on Arch, Nix, Scoop or Chocolatey who want a native package
strengths
- Built-in build and plan agents; plan denies file edits and asks before running bash commands
- @general subagent handles complex searches and multistep tasks
- Installs via curl, npm/bun/pnpm/yarn, Homebrew, Scoop, Chocolatey, pacman/AUR and Nix
- Desktop beta for macOS, Windows and Linux (.deb, .rpm, .AppImage)
weaknesses
- Desktop app is labelled beta
- Configuration and agent details live in external docs rather than the README
- No GitHub mention integration is documented
OpenAI's local coding agent; unlike Claude Code it signs in with a ChatGPT Plus, Pro, Business, Edu or Enterprise plan and has IDE extensions for VS Code, Cursor and Windsurf.
best for
- Developers who already pay for a ChatGPT plan
- Teams splitting time between terminal and VS Code, Cursor or Windsurf
strengths
- Authenticates with a ChatGPT account or an API key
- IDE extensions plus a desktop mode via `codex app`
- Pairs with the web-based Codex at chatgpt.com/codex
- Installs with `npm install -g @openai/codex` or `brew install --cask codex`
weaknesses
- Tied to OpenAI accounts and models; no other providers are documented
- Platform list covers macOS and Linux only; Windows is not listed
- Plugin or extension mechanism like Claude Code's is not documented
A terminal agent for Google Gemini models with a free OAuth tier, MCP support and a scripting mode with JSON output, which Claude Code's entry does not describe.
best for
- Trying a terminal agent without paying up front
- Scripting agent runs in CI, including GitHub Actions
- Tasks that need web search grounding
strengths
- Free tier with Google OAuth: 60 requests/min and 1,000 requests/day
- Built-in file operations, shell execution, Google Search grounding and web fetching
- GEMINI.md context files and conversation checkpointing to save and resume sessions
- Non-interactive mode with JSON output; GitHub Actions for code review and issue triage
weaknesses
- Limited to Gemini models, via OAuth, API key or Vertex AI
- Free-tier request caps apply to long agent sessions
- Custom behavior goes through MCP and GEMINI.md rather than a plugin system for commands and agents
Pair-programming CLI in Python that commits every AI change to git and works with hosted or local models, a different workflow from Claude Code's agent loop.
best for
- Reviewing AI edits with ordinary git diff and git log
- Running against local models
- Large repos across many languages
strengths
- Auto-commits changes with descriptive messages so you can use standard git tools
- Builds a map of the whole codebase for context; supports 100+ languages
- Runs linting and tests on AI changes automatically
- Voice-to-code, image and web page context, IDE integration through file watching
weaknesses
- Installed via `python -m pip install aider-install`, so it needs a Python setup
- Pair-programming model, not a subagent or plan/build agent setup
- No GitHub mention integration or plugin system is documented
General-purpose local agent written in Rust with a desktop app, CLI and embeddable API, covering research, writing and data analysis as well as code.
best for
- Wanting to choose among 15+ model providers
- Extending the agent with MCP servers
- Organizations building a preconfigured internal distribution
strengths
- Desktop app for macOS, Linux and Windows, plus a CLI and an API for embedding
- 70+ extensions through the Model Context Protocol
- Connects via API keys or existing subscriptions through the Agent Communication Protocol (ACP)
- Custom distributions with preset providers, extensions and branding
weaknesses
- Broader scope than coding, so it has no coding-specific features like a plan agent or git auto-commit documented
- More setup choices: provider, extensions and interface all need to be picked
- No IDE or GitHub mention integration is documented
Why look beyond Claude Code
- Data handling: Claude Code collects usage data, code accept/reject feedback and conversation data; Aider can use local models
- Scope: it targets coding tasks, while Goose also covers research, writing, automation and data analysis
- Extensibility: its plugin system adds commands and agents; Goose offers 70+ MCP extensions and Gemini CLI supports MCP
- Surfaces: it runs in terminals, IDEs and GitHub; OpenCode and Goose add desktop apps, and Goose adds an embeddable API
Stay with Claude Code if
- You use @claude mentions on GitHub alongside the terminal and IDE in one tool
- You rely on its plugin system for custom commands and agents
- You want a native install on Windows through `winget install Anthropic.ClaudeCode` or macOS via `brew install --cask claude-code`
When not to use these
- You need a plain shell command or editor plugin with no LLM involved and no code or conversation data sent to a model provider
- Your environment forbids any outbound model API calls and you have no local model runtime configured
FAQ
- What is the closest open source alternative to Claude Code?
- OpenCode. It is MIT-licensed, runs as a terminal TUI, and has build and plan agents you switch with Tab, plus a beta desktop app. Goose is also open source but has a broader scope.
- Is there a free alternative to Claude Code?
- Gemini CLI has a free tier with Google OAuth: 60 requests per minute and 1,000 requests per day. Aider can work with local models. The tools are free to install, but hosted models may need paid plans or API keys.
- Which alternative works with local models?
- Aider lists support for local models alongside hosted ones. Goose connects to more than 15 providers, which can include local runtimes.
- Which alternative handles git best?
- Aider commits each AI change with a descriptive message, so you review with standard git diff and git log. Claude Code also handles git workflows through natural language commands.