Run Claude Code workflows against any LLM — OpenAI, Gemini, Ollama, and 200+ backends — from a single terminal-first CLI.
OpenClaude is an open-source coding-agent CLI that breaks the lock between the Claude Code workflow and the Anthropic API. By shipping an OpenAI-compatible provider shim alongside the original agent loop, it lets developers point the same terminal interface at any backend: OpenAI, Gemini, GitHub Models, Codex, Ollama, Fireworks AI, Xiaomi MiMo, NEAR AI, Z.AI, and more — or any custom OpenAI-compatible endpoint.
The tool preserves the full coding-agent toolkit that makes Claude Code effective: Bash execution, file read/write/edit, grep, glob, multi-agent task spawning, MCP server connectivity, slash commands, and streaming output. Provider setup is handled through an interactive /provider command that saves named profiles to .openclaude-profile.json, eliminating the need to re-export environment variables on every session.
Background sessions (via openclaude --bg) allow long-running agentic tasks to run detached from the terminal, with named process management, log streaming with -f, and session lifecycle commands. A bundled VS Code extension provides launch integration and theme support without requiring a separate installation.
OpenClaude is released by the GitLawb community and is updated rapidly — 29 releases over roughly 80 days. The project carries a nuanced license: contributor modifications are MIT-licensed, while the underlying Claude Code derived code remains subject to Anthropic’s copyright and terms of service.
/provider so you can switch backends without re-exporting environment variables every sessionopenclaude --bg, with named session management, log streaming, and lifecycle controlsArchitecture OpenClaude follows a layered architecture with clear boundaries between the terminal UI layer built on React with Ink, the agent orchestration layer in QueryEngine, the tool execution layer behind Tool.ts, and the provider abstraction layer in the API client. The entry point handles CLI argument parsing, provider profile loading, and REPL initialization, then delegates the actual agent loop to QueryEngine which coordinates API calls, tool results, automatic context-window compaction, and multi-agent task dispatching. Agent swarms and background sessions are isolated behind well-defined task-type abstractions, and Bun’s compile-time feature flags enable dead-code elimination so production builds exclude coordinator and assistant modes unless explicitly enabled.
Tech Stack The runtime target is Node.js 22+ for end-users while Bun serves as the build toolchain. The terminal UI is built on React 19 with Ink and React Reconciler, enabling component-based interactive interfaces with real-time streaming. The Anthropic SDK is the primary API client, with an OpenAI-compatible shim routing requests to any of 15+ named providers. gRPC via @grpc/grpc-js handles the background daemon and remote session communication. MCP integration uses @modelcontextprotocol/sdk, Orama provides in-process vector and full-text search, Zod handles schema validation throughout, and a VS Code extension lives in a bundled subdirectory.
Code Quality The codebase has extensive test coverage with approximately 395 test files spanning the query engine, cost tracking, tool definitions, MCP integration, CLI entrypoints, skills, agent routing, and provider clients, all running under Bun’s native test runner. TypeScript strict mode and dedicated type-test compilation catch interface mismatches at build time. ESLint enforces project-specific rules including a custom no-top-level-side-effects rule. Error handling uses typed error classes and consistent API error categorization patterns. A dedicated privacy verification script is part of CI to guard against unintended data exfiltration.
What Makes It Unique The dual-build approach is the standout design choice: the same codebase compiles both a Claude Code-compatible SDK entrypoint and an OpenAI-compatible shim, so any tool or script written for Claude Code can be redirected to a different backend with a single environment variable. The GitHub Copilot sub-agent serialization system for controlling premium request consumption, named background sessions with process management, and compile-time feature flags via Bun’s bundler for lean production builds are differentiators that most LLM CLI forks do not implement.
OpenClaude carries a dual-layer license that any self-hoster should understand before deploying. The contributor modifications — the multi-provider shim, provider profile system, background sessions, and everything added on top of the original codebase — are offered under MIT. The underlying derived code, however, remains subject to Anthropic’s copyright and their Commercial Terms of Service, which the LICENSE file explicitly acknowledges the project does not have Anthropic’s authorization to distribute. This means the legal posture for self-hosters is genuinely uncertain, and teams with strict IP compliance requirements should evaluate their own position before using it in production.
Operationally, OpenClaude is a CLI process, not a server, which keeps self-hosting lightweight. You install it globally via npm, configure a provider profile with /provider, and you are running. There is no persistent daemon beyond optional background sessions, no database, and no network service to maintain. For teams that want to standardize a provider configuration across machines, .openclaude-profile.json is the mechanism — it is a user-level file containing API keys and base URLs that can be templated and distributed via dotfiles or secrets management. The VS Code extension requires a manual install step from the vscode-extension/ directory.
There is no official managed or paid tier for OpenClaude itself — it is purely self-hosted. The trade-offs compared to using Claude Code directly with an Anthropic subscription are significant: you gain provider flexibility and open-source auditability, but lose Anthropic’s first-party support, guaranteed compatibility with future Claude Code SDK updates, and the legal clarity of using software under its intended license. Projects that rely heavily on Anthropic-specific features such as extended thinking, computer use, or the artifacts API may find those features degrade or disappear when routed through non-Anthropic backends.
AI Code Assistants · AI Development
Orchestrate an army of AI coding agents—Claude Code, Codex, Gemini CLI, and more—running simultaneously in isolated git worktrees from a single Electron desktop app.
AI Code Assistants · AI Development
The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.
Developer Tools · AI Development · AI Code Assistants
Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.