OpenClaude

OpenClaude is an open-source, multi-provider coding-agent CLI that originated as a fork of Claude Code and has since been substantially modified to remove provider lock-in. It keeps the Claude Code workflow shape (prompts, tools, agents, MCP, slash commands, streaming output) but lets the user point

Canonical version: OpenClaude.

OpenClaude is an open-source, multi-provider coding-agent CLI that originated as a fork of Claude Code and has since been substantially modified to remove provider lock-in. It keeps the Claude Code workflow shape (prompts, tools, agents, MCP, slash commands, streaming output) but lets the user point it at OpenAI-compatible APIs, Gemini, GitHub Models, Codex OAuth, Codex, Ollama, Atomic Chat, Bedrock, Vertex, and Foundry as backends.

It is an independent community project; not affiliated with, endorsed by, or sponsored by Anthropic. The project ships under MIT license and explicitly notes that "Claude" and "Claude Code" remain Anthropic trademarks.

Positioning is essentially "the Claude Code experience without the model lock-in"; the same niche OpenCode occupies from the SST side and that OpenClaw occupied earlier as a personal-assistant fork. Compared to Aider, Kimi CLI, Gemini CLI, and GitHub Copilot CLI, OpenClaude's differentiator is heritage; it is the closest user-experience match to Claude Code itself because the codebase started there.

Key features

  • Multi-provider routing: OpenAI-compatible (OpenAI, OpenRouter, DeepSeek, Groq, Mistral, LM Studio), Hicap, Gemini, GitHub Models, Codex OAuth, Codex CLI auth, Ollama, Atomic Chat, Bedrock, Vertex, Foundry.
  • Provider profiles: /provider slash command for guided setup and saved profiles; /onboard-github for GitHub Models onboarding.
  • Agent routing: per-subagent model assignment via ~/.openclaude.json; route Explore, Plan, general-purpose, frontend-dev to different backends for cost or capability reasons.
  • Tool surface: Bash, file read/write/edit, grep, glob, agents, tasks, slash commands; same shape as Claude Code.
  • Model Context Protocol (MCP) support for third-party tools.
  • Web search and fetch: free DuckDuckGo fallback for non-Anthropic models out of the box; optional Firecrawl path via FIRECRAWL_API_KEY for JS-rendered pages and a more reliable search API.
  • Streaming output and multi-step tool loops with progress events.
  • Image inputs (URL or base64) for providers that support vision.
  • Headless gRPC server on localhost:50051 for embedding the agent in CI, custom UIs, or other applications; bidirectional streaming with permission prompts via action_required events. Proto file at src/proto/openclaude.proto for non-JS clients.
  • VS Code extension bundled in vscode-extension/openclaude-vscode/ for launch integration and provider-aware control-center UI.

Install and start

npm install -g @gitlawb/openclaude
openclaude

Requires ripgrep available on PATH. Inside the session, /provider walks through provider setup.

Fastest OpenAI setup:

export CLAUDE_CODE_USE_OPENAI=1
export OPENAI_API_KEY=sk-your-key-here
export OPENAI_MODEL=gpt-4o
openclaude

Fastest local Ollama setup:

export CLAUDE_CODE_USE_OPENAI=1
export OPENAI_BASE_URL=http://localhost:11434/v1
export OPENAI_MODEL=qwen2.5-coder:7b
openclaude

If Ollama is installed, ollama launch openclaude --model <name> skips the env-var dance and routes all API traffic through the local Ollama instance.

Source build

Built with Bun and TypeScript:

bun install
bun run build
node dist/cli.mjs

Repository layout

  • src/ — core CLI/runtime
  • scripts/ — build, verification, maintenance
  • docs/ — setup and contributor docs
  • python/ — standalone Python helpers
  • vscode-extension/openclaude-vscode/ — VS Code extension
  • bin/ — CLI launcher entrypoints

Caveats

  • Anthropic-specific features may not exist on other providers; tool-call quality depends heavily on the chosen model.
  • Smaller local models can struggle with long multi-step tool flows.
  • Some providers cap output tokens lower than the CLI defaults.
  • DuckDuckGo fallback search scrapes results and may be rate-limited or blocked; Firecrawl is the supported alternative.
  • api_key values stored in ~/.openclaude.json are plaintext; do not commit.

References


About Sébastien

I'm Sébastien Dubois, and I'm on a mission to help knowledge workers escape information overload. After 20+ years in IT and seeing too many brilliant minds drowning in digital chaos, I've decided to help people build systems that actually work. Through the Knowii Community, my courses, products & services and my Website/Newsletter, I share practical and battle-tested systems.

I write about Knowledge Work, Personal Knowledge Management, Note-taking, Lifelong Learning, Personal Organization, Productivity, and more. I also craft lovely digital products and tools.

If you want to follow my work, then become a member and join our community.

Ready to get to the next level?

If you're tired of information overwhelm and ready to build a reliable knowledge system:

Found this valuable? Share it with someone who needs it.

Join 6,000+ readers. Get practical systems for knowledge & AI. Free.

Subscribe ✨

Free: Knowledge System Checklist

A clear roadmap to building your own knowledge system. Subscribe and get it straight to your inbox.

6,000+ readers. No spam. Unsubscribe anytime.