selfhostedworld.com logoselfhostedworld.com
Type to search software and tags...

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.

2 alternatives listed
  1. 1opencode logo
    142.1k
    MIT Licensefully-open

    OpenCode is an open source AI coding agent designed for developers who want to work from the terminal. It provides a TUI-focused workflow for coding, planning, and code exploration, and the README emphasizes that it is provider-agnostic rather than tied to a single model vendor. The project is aimed at people who want an agentic coding assistant with flexibility in deployment and model choice. It includes built-in agents for full-access development work and read-only analysis, plus a general subagent for complex searches. The README also notes a desktop app beta and a client/server architecture, which suggests the tool can be used locally while being controlled remotely from other clients.

    Cloud OptionalDockerPackageBinary
    Install:dockerpackage-managerbinarysource

    Features:

    • terminal-based AI coding agent
    • desktop application beta
    • built-in build agent
    • built-in plan agent
    • general subagent

    +4 more

  2. 2crush logo
    22.9k
    fsl-1-1-mitfully-open

    Crush is a terminal-based coding assistant for developers who want to use large language models from inside their existing shell workflow. It is designed to connect a user’s codebase, tools, and contextual signals to a chosen LLM provider, and it supports a broad range of model backends including OpenAI-compatible and Anthropic-compatible APIs. The project emphasizes session-based work, letting users maintain multiple contexts per project and switch models during a session without losing context. It also integrates with language servers for richer code awareness and supports Model Context Protocol servers for extending its capabilities. Crush is distributed across many platforms and is available through package managers, native binaries, and source installation, making it suitable for users who want a configurable, cross-platform AI coding tool in the terminal.

    Cloud RequiredPackageBinary
    Install:package-managerbinarysource

    Features:

    • multi-model support
    • switch LLMs mid-session
    • multiple work sessions
    • LSP context integration
    • MCP server support

    +2 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.