Related ToolsClaude CodeAiderCody

OpenClaude Forks Leaked Claude Code to Run With GPT-4, Gemini, or Any Local Model

ChatGPT by OpenAI
Image: OpenAI

Someone built this fast. A developer going by Gitlawb has published OpenClaude, a fork of the Claude Code source that was leaked earlier this year, modified to accept any LLM (large language model) backend - OpenAI's GPT-4, Google's Gemini, models running locally on your own machine, or any API-compatible endpoint.

Claude Code is Anthropic's terminal-based AI coding tool. It reads your codebase, writes and edits files, runs commands, and handles multi-step coding tasks without you directing each move. Before OpenClaude, it worked exclusively with Anthropic's Claude models.

The fork changes that. By swapping the model-routing layer, OpenClaude lets you point the Claude Code interface at whatever model you prefer - whether for cost, privacy, or because you want to benchmark how different models handle identical coding tasks.

The Legal Problem at the Foundation

Claude Code's source was not released by Anthropic - it leaked. Building on leaked proprietary code puts OpenClaude in legally precarious territory. Anthropic has not publicly commented on either the leak or this fork.

That matters if you're considering using or contributing to the project. It is not an officially sanctioned open-source release. A takedown notice could wipe the repository. Using leaked software commercially carries meaningfully different legal exposure than running it as a personal experiment.

Routing GPT-4 or Local Models Through Claude Code's Interface

For developers who like Claude Code's workflow but want model flexibility, this is worth watching. The terminal-native, agentic approach Claude Code ships with - where the AI plans and executes sequences of file edits and commands autonomously - doesn't exist in quite the same form from OpenAI or Google's own tooling. If OpenClaude stabilizes, it could fill that gap.

The more durable effect may be pressure on Anthropic itself. An unofficial multi-model version circulating in the open is not a comfortable situation for a company that monetizes Claude model access. Anthropic may respond by officially supporting more flexible routing - or by pursuing takedowns aggressively. Either outcome changes the market.