selfhostedworld.com logoselfhostedworld.com

Try describing what you need:

Best open-source alternatives to Claude Code - CLI

Anthropic's agentic AI coding CLI.

Claude Code is a terminal-based agentic coding assistant from Anthropic that reads, edits, and executes code within a project context. Developers use it for refactoring, debugging, and feature implementation directly from the command line. Self-hosted alternatives appeal to those who want local model inference or a vendor-agnostic coding agent.

17 alternatives listed
  1. MIT LicenseOpen Source — No Paywall

    Hermes Agent is a self-improving AI assistant designed for people who want an agent that can remember, adapt, and operate across multiple interfaces. It supports a terminal-first workflow as well as messaging platforms such as Telegram, Discord, Slack, WhatsApp, Signal, and email, making it suitable for both individual use and unattended automation. The project emphasizes persistent memory, autonomous skill creation, and cross-session continuity. It can run with a variety of model providers, including hosted APIs and custom endpoints, and it includes features for scheduled jobs, tool usage, and parallel subagents. The README positions it as a flexible system for users who want an agent that can live on a local machine, VPS, or cloud/serverless environment while remaining controllable from chat or the CLI.

    Cloud OptionalMulti-UserSource

    Features:

    • built-in learning loop
    • skill creation and self-improvement
    • cross-session memory and search
    • scheduled automations
    • subagents and parallel workstreams

    +5 more

    Auth:oauth
  2. 2opencode logo
    184.9k
    MIT LicenseOpen Source — No Paywall

    OpenCode is an open source AI coding agent aimed at developers who want AI assistance for code-related work. It provides an interactive agent experience and includes multiple built-in agents for different tasks, such as a default build agent for full-access development work and a plan agent for read-only analysis and code exploration. The project can be installed via a shell install script, common package managers, or built from source, and it is also available as a beta desktop application for macOS, Windows, and Linux. The README points users to documentation for configuration and to a docs page describing the agent system, suggesting it is meant both as a command-line tool and as a desktop companion for coding workflows.

    DockerPackage ManagerSource

    Features:

    • AI coding agent
    • Desktop app
    • Built-in build agent
    • Read-only planning agent
    • General subagent

    +2 more

  3. Claude Code is an agentic coding assistant designed for developers who want help directly in their terminal and related workflows. It is positioned as a tool that can understand a project’s codebase, assist with routine programming tasks, explain complex code, and help manage git operations through natural language commands. The project appears aimed at individual developers and teams working in local repositories, with usage extending to the terminal, IDEs, and even GitHub via @claude mentions. The README also highlights a plugin system for extending behavior with custom commands and agents, along with documentation and troubleshooting resources for setup and usage. It is backed by Anthropic and includes information about data collection and privacy safeguards.

    Cloud RequiredBinaryPackage ManagerSource

    Features:

    • terminal-based coding assistant
    • natural language commands
    • codebase understanding
    • routine task execution
    • code explanation

    +4 more

  4. 4Codex logo
    97.2k
    Apache License 2.0Open Source — No Paywall

    Codex CLI is a locally running coding agent from OpenAI designed to assist with software development tasks on a user's computer. The README positions it as part of a broader Codex ecosystem, with related experiences available in IDEs and as a desktop app, while also pointing users to a separate cloud-based Codex Web product. The project is aimed at developers who want an agentic coding assistant that can be installed on macOS, Linux, or Windows. Installation is supported through shell scripts, npm, Homebrew, and downloadable release binaries. For authentication, it works either through a ChatGPT account or, with extra setup, an API key.

    Cloud OptionalDockerPackage ManagerBinarySource

    Features:

    • local execution
    • IDE integration
    • desktop app mode
    • ChatGPT sign-in
    • API key authentication

    +1 more

    Auth:oauthlocal
  5. 5OpenHands logo
    80.5k
    MIT LicenseOpen Core — Some Features Paid

    OpenHands is an AI-driven development platform centered around agentic software engineering workflows. It offers multiple entry points: a composable Python SDK for building agents in code, a CLI for interactive use, and a local GUI for running agents on a laptop. The project is aimed at developers and teams that want to delegate coding tasks to AI systems while integrating with familiar tools and model providers. The README also describes a hosted cloud deployment and an enterprise self-hosted option. The cloud version adds collaboration-oriented capabilities such as multi-user support, RBAC, conversation sharing, and integrations with Slack, Jira, and Linear. For organizations, the enterprise edition can be deployed in a VPC via Kubernetes and is source-available under a separate license, while the core project remains MIT-licensed.

    Cloud OptionalMulti-UserDockerKubernetesBinarySource

    Features:

    • composable Python agent SDK
    • local agent execution
    • cloud-scale agent execution
    • CLI interface
    • local GUI

    +5 more

    Auth:oauth
  6. 6Pi logo
    69.7k
    MIT LicenseOpen Source — No Paywall

    Pi Agent Harness is a monorepo for the Pi project, centered on a self-extensible coding agent. It includes an interactive CLI, a runtime for tool calling and state management, a terminal UI library, and a unified LLM API layer that can work with multiple providers such as OpenAI, Anthropic, and Google. The project is aimed at developers building or using coding agents, especially in local or self-hosted workflows. The README emphasizes running Pi with the permissions of the launching user and suggests containerization or sandboxing for stronger isolation. It also documents development commands, test scripts, and a workflow for publishing OSS agent sessions, indicating that the project is meant to be actively developed and used in open-source coding-agent work.

    Cloud OptionalSourceDocker

    Features:

    • interactive coding agent CLI
    • agent runtime with tool calling
    • state management
    • unified multi-provider LLM API
    • terminal UI library

    +2 more

  7. 7Cline logo
    64.6k
    Apache License 2.0Open Source — No Paywall

    Cline is an open source coding agent designed to work inside an IDE or from the terminal. It targets developers who want an assistant that can read a codebase, propose changes, run commands, and help fix errors while keeping the user in control through approval-based workflows. The project is organized into multiple surfaces: a CLI, a Kanban-style web task board for parallel agent work, editor integrations for VS Code and JetBrains, and an SDK for building custom agents and tools. It supports headless automation for CI/CD, scheduled agents, plugins, MCP servers, and integrations with messaging platforms, making it suitable for both interactive development and repeatable automation across projects.

    Cloud OptionalMulti-UserMulti-TenantPackage Manager

    Features:

    • terminal CLI
    • headless CI/CD mode
    • VS Code extension
    • JetBrains plugin
    • codebase-aware edits

    +5 more

  8. 8Aider logo
    47.3k
    Apache License 2.0Open Source — No Paywall

    Aider is a terminal-based AI pair programming tool designed to help developers start new projects or extend existing codebases with assistance from large language models. It is aimed at software developers who want to work directly inside their repositories while using an AI assistant to propose and apply code changes. The project emphasizes workflows that fit into normal development practices: it can map a codebase, work with many programming languages, integrate with Git, and run linting and tests after making edits. It also supports use in an IDE or editor, can incorporate images and web pages as context, and offers voice-driven interaction. The README highlights compatibility with both hosted and local models and provides a getting-started flow based on installing via Python and running the CLI with an API key.

    Cloud OptionalPackage ManagerSource

    Features:

    • terminal-based pair programming
    • cloud and local LLM support
    • codebase mapping
    • 100+ language support
    • Git integration

    +5 more

  9. 9Continue logo
    34.8k
    Apache License 2.0Open Source — No Paywall

    Continue is an open-source coding agent aimed at developers who want AI-assisted tooling in their editor or terminal. The README presents it as available in three forms: a CLI, a VS Code extension, and a JetBrains plugin, with a recommendation to use the CLI over the JetBrains plugin. The project documentation focuses on how to configure, understand, and customize the agent. The README also notes that this repository is a final, read-only release of the Continue 2.0.0 codebase and that anonymous telemetry was removed and authentication was pulled out in that release.

    No Telemetry

    Features:

    • CLI
    • VS Code extension
    • JetBrains plugin
    • customization
    • configuration
  10. 10NanoClaw logo
    30.2k
    MIT LicenseOpen Source — No Paywall

    NanoClaw is a lightweight AI assistant framework designed for individuals who want agents to run in strong OS-level isolation rather than inside a single shared process. It is built around Claude Code and the Claude Agent SDK, and the README emphasizes a small, understandable codebase that users can fork and adapt to their own workflows. The project supports messaging through multiple channels such as WhatsApp, Telegram, Discord, Slack, and Gmail, with each group or channel isolated in its own container and separate memory. It also includes scheduled tasks, web access, and a main self-chat channel for administration. Setup is driven by Claude Code skills, and the project is intended to be customized through code changes instead of configuration files.

    Cloud OptionalMulti-UserSource

    Features:

    • Multi-channel messaging
    • Isolated group context
    • Main admin/self-chat channel
    • Scheduled tasks
    • Web access

    +5 more

What to look for in a Claude Code - CLI alternative

Look for support for the Model Context Protocol (MCP) and tool-use capabilities that let the agent read files, run commands, and interact with external APIs. Evaluate context window handling for large codebases and whether the tool supports multiple underlying LLM backends. Local-first operation with no data exfiltration is a key property for teams with proprietary code.