openclaude  by Gitlawb

Universal coding agent CLI

Created 1 week ago

New!

20,482 stars

Top 2.4% on SourcePulse

GitHubView on GitHub
Project Summary

OpenClaude enables users to leverage the powerful tool-executing capabilities of Claude Code with a wide array of Large Language Models (LLMs), including OpenAI's GPT series, Gemini, DeepSeek, Ollama, and over 200 others via OpenAI-compatible APIs. This project addresses the limitation of being tied to Anthropic's proprietary models, offering significant flexibility for developers and researchers seeking to integrate advanced coding agents into their workflows without vendor lock-in. The primary benefit is the ability to use Claude Code's sophisticated tool system with the LLM of one's choice.

How It Works

The core innovation is an OpenAI-compatible provider shim (src/services/api/openaiShim.ts) that sits between the Claude Code application and the chosen LLM API. This shim translates Anthropic's specific message formats, tool usage definitions (tool_use/tool_result), server-sent event (SSE) streaming, and system prompt structures into their equivalents for the OpenAI Chat Completions API. Consequently, the rest of the Claude Code system operates as if it were interacting directly with Anthropic, unaware that it is communicating with a different model provider.

Quick Start & Requirements

Installation is straightforward via npm: npm install -g @gitlawb/openclaude. Alternatively, it can be built from source using Bun 1.3.11+ or run directly with Bun. Key requirements include Node.js/npm/Bun and potentially ripgrep. Essential environment variables for operation are CLAUDE_CODE_USE_OPENAI=1, OPENAI_API_KEY (unless using local models), and OPENAI_MODEL (e.g., gpt-4o). An optional OPENAI_BASE_URL can be set for custom API endpoints.

Highlighted Details

  • Full support for Claude Code's toolset: Bash, FileRead/Write/Edit, Grep, Glob, Agents, Tasks, MCP, LSP, NotebookEdit, WebFetch, WebSearch.
  • Real-time token streaming and multi-step tool chain execution.
  • Capability to process Base64 encoded and URL-based images for vision models.
  • Includes useful slash commands like /commit, /review, /diff, and /doctor.
  • Supports sub-agent creation and a persistent memory system.

Maintenance & Community

OpenClaude is a fork of instructkr/claude-code, derived from a source code leak exposed on March 31, 2026. The project explicitly states it is not affiliated with or endorsed by Anthropic. No specific community channels (like Discord or Slack) or roadmap links are provided in the README.

Licensing & Compatibility

The OpenAI shim additions are released into the public domain. However, the original Claude Code source code remains subject to Anthropic's terms of use. This dual licensing status, combined with the origin from a source leak, may impose restrictions on commercial use or integration into closed-source projects, warranting careful legal review.

Limitations & Caveats

Anthropic-specific features such as the extended "thinking mode" and prompt caching are intentionally disabled. The effectiveness of agentic tool use is highly dependent on the underlying LLM's capabilities, with performance varying significantly across different models. The project's foundation on leaked source code introduces potential legal and ethical considerations.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
338
Issues (30d)
226
Star History
20,715 stars in the last 10 days

Explore Similar Projects

Feedback? Help us improve.