Claude Code alternatives for agents with local models

Compare OpenCode, Cline and Aider for coding with local models or hosted APIs. Find a terminal agent, editor assistant or self-hosted setup.

Claude Code takes on coding tasks such as fixing bugs, writing tests and handling migrations. It works from the terminal and other development interfaces, so the appeal is an agent that can help with the project itself. Replacing it means choosing both an agent you like working with and a model to power it.

OpenCode and Aider are Claude Code alternatives for terminal work; Cline brings the workflow into an editor with diffs and checkpoints. For agents on your own server, consider OpenHands. The options below support local models as well as hosted providers, giving you room to choose how you run inference and pay for it.

An open source AI coding agent works in your terminal or IDE with local models or cloud models including Claude, GPT and Gemini.

Screenshot of OpenCode website

OpenCode suits replacing Claude Code repository work with a model-flexible terminal or IDE agent. The development agent edits files, while a planning agent denies edits by default. Automatic language-server context and parallel sessions support project exploration and changes with local or hosted models.

An open-source AI coding agent for editors, terminal and desktop, with local models through Ollama or LM Studio and an Apache 2.0 core.

Screenshot of Cline website

Cline suits people who would rather work from an editor panel than a terminal, though it also has a CLI and a desktop app. It pairs with models on your machine through Ollama or LM Studio, or with Claude, GPT, Gemini and OpenAI-compatible endpoints.

Plan mode proposes an approach before Act mode edits, and you approve edits and commands one by one or let them run. Diffs and checkpoints let you review and undo changes, and the CLI runs without interaction in scripts and CI.

An open-source AI coding agent for macOS, Windows and Linux that supports local models through Ollama or vLLM and cloud model APIs.

Screenshot of Qwen Code website

Qwen Code suits Claude Code users who need agent teams, planning and reusable project skills. Its terminal and editor interfaces support local or hosted models, MCP tools and isolated worktrees. Headless operation and SDKs cover scripted coding tasks.

An open-source coding agent for macOS, Linux and Windows that uses local or hosted models, with terminal and local browser clients that need no account.

Screenshot of Codewhale website

Codewhale covers Claude Code repository edits with planning, permissions and recovery controls. Review file diffs and command results, resume sessions in the terminal or local browser, and use Fleet to divide work among agents. It supports existing Claude Code plugins with a different model backend.

Terminal coding assistant for local repositories on macOS, Windows and Linux. Use local models through Ollama or paid OpenAI access.

Screenshot of Codex CLI website

Codex CLI is another terminal agent for exploring a repository, editing files and running commands. Its review mode checks changes without editing them, and noninteractive tasks fit scripts and CI; local execution does not by itself mean offline inference.

130KApache-2.0macOSWindowsLinux

An open-source AI coding agent for VS Code, JetBrains, and the CLI, with local model support, hosted model access, and an MIT license.

Screenshot of Kilo Code website

Kilo Code covers repository edits, planning and debugging from an IDE or terminal. It supports local models, model switching during a task and parallel work in isolated worktrees.

A self-hosted AI coding agent platform runs locally or on servers, supports Claude Code and Codex, and automates engineering workflows.

Screenshot of OpenHands website

OpenHands covers delegated and recurring Claude Code engineering tasks. Agents apply changes, investigate failures, run checks and prepare pull requests, with events or schedules starting work. Run its own agent on your infrastructure; using Claude Code as its backend would retain Claude Code.

A local-first AI coding workspace for macOS, Windows and Linux that connects to local or cloud models and coordinates parallel agents.

Screenshot of Pi Desktop website

Pi Desktop brings coding agents into a desktop project workspace. Review a plan before execution, follow commands and tests, and inspect diffs across persistent sessions with the model provider you choose.

6.9KLGPL-3.0macOSWindowsLinux

Desktop AI agent client for macOS, Windows and Linux that combines Claude Code, Codex and local models through Ollama, with locally stored chat history.

Screenshot of CodePilot website

CodePilot provides a desktop workspace for coding with file inspection, Git review and separate agent sessions. Its built-in agent works without a separate coding CLI; choosing its Claude Code or Codex mode requires the corresponding CLI and credentials.

A terminal AI coding assistant that connects to local backends such as Ollama and llama.cpp or cloud APIs, with model switching that preserves context.

Screenshot of Crush website

Crush is a terminal coding assistant for people who move between model backends. It discovers models from Ollama, llama.cpp, LM Studio and LiteLLM automatically, connects to Anthropic, OpenAI, Gemini and OpenRouter, and accepts any OpenAI- or Anthropic-compatible API.

You can change models during a session without losing its context and keep separate sessions in one project. Language server integrations add code context, and MCP connects other tools.

An open-source terminal coding assistant that edits projects with local or cloud LLMs, maps codebases and commits changes to Git.

Screenshot of Aider website

Aider fits developers who live in a terminal and keep every project in Git. It maps the codebase so the model has context in larger projects, and it commits each change with a message, so you review diffs and undo edits with the Git tools you already use.

It works with local LLMs or cloud models from Anthropic, DeepSeek, OpenAI and others, runs your linters and tests after a change and fixes what they report. Comments in your editor can serve as requests.

50KApache-2.0macOSWindowsLinux

A terminal coding agent that runs locally, supports Ollama and cloud models, and lets developers customize tools and workflows under the MIT license.

Screenshot of Pi website

Pi suits adapting Claude Code-style terminal work around your own extensions and project instructions. Switch models during a session, branch earlier conversations and package reusable skills or prompts. Planning and subagents require extensions, and Pi inherits the process access it runs with.

An open-source terminal AI agent that edits files, runs code and handles persistent tasks with local models or cloud providers under the MIT license.

Screenshot of gptme website

gptme edits project files, executes shell commands and Python, and runs tests while retaining session state. ACP connections bring the same agent into compatible editors, with plugins and Markdown skills for recurring work.

An open source terminal coding assistant connects to Ollama, LM Studio or cloud models and recalls information from previous sessions.

Screenshot of jcode website

jcode is a terminal coding assistant with a choice of local endpoints or hosted providers. Its memory retrieves details from earlier sessions and checks them for stale or conflicting information, helping carry project decisions into later work.

An open-source coding agent with recursive task delegation, searchable context, and persistent sessions accessible through terminal and web clients.

WhipCode suits coding jobs that need recursive delegation and more context than one conversation can hold. Follow the task tree and agent messages while work continues, then return to the same session through its persistent daemon.

1.1KApache-2.0macOSLinuxWeb

Local terminal coding and research agent with persistent Python sessions and parallel subagents. Hosted model routes use subscription or API-key access.

Prime Agent suits coding tasks that continue between terminal sessions. It edits project files, keeps a Python environment alive and coordinates subagents; you can disconnect and later reattach to background work.

22K

An Apache 2.0 AI agent for macOS, Windows and Linux, with desktop and CLI interfaces and support for Ollama or cloud model providers.

Screenshot of Goose website

Goose suits Claude Code users whose tasks mix coding with research, writing or data work. Its desktop app and CLI use local or hosted providers, while MCP extensions connect additional tools. Using Claude Code through an ACP connection would retain it as the backend.

55KApache-2.0macOSWindowsLinux

A terminal coding agent that works with local models through Ollama or cloud providers and supports embedding in editors and browser apps.

Screenshot of fx website

fx covers terminal coding with a shell-style conversation, visible tool activity and preserved scrollback. Skills, MCP tools and subagents extend the agent, while a chosen model endpoint handles inference.

3.5KApache-2.0macOSLinuxWeb

An open-source terminal coding agent and Python toolkit that supports local models through llama.cpp, cloud providers, and MCP tools.

Screenshot of Fast Agent website

Fast Agent gives terminal coding sessions access to shell commands and MCP tools, with local llama.cpp or other model providers. Its agent workflows can divide a task between specialists and ask an evaluator for revisions.

3.9KApache-2.0

A self-hosted coding assistant and Python agent framework that branches runs to compare approaches and supports local models through Ollama.

Screenshot of Pydantic DeepAgents website

Pydantic DeepAgents reads and edits project files and runs shell commands from a terminal assistant. It can fork a task into isolated branches so you can compare approaches and review their diffs before continuing.

1.1KMIT

A self-hosted DevOps AI agent that monitors apps and automates operations, with secret substitution and support for local or cloud models.

Screenshot of Stakpak website

Stakpak covers the infrastructure side of Claude Code work: generating deployment configuration, debugging Kubernetes and managing CI. It can run ongoing checks and retains incident context, with action logs and backups for file changes.

For Claude Code, start with OpenCode. Other alternatives include Cline, Qwen Code, Codewhale and Codex CLI.

Most are Terminal Coding Agents; others include Autonomous Coding Agents.

People also replace

See all