0xwilliamortiz/openclaude-improved

runs anywhere. uses anything

569 ★81 forksTypeScriptUpdated 11d ago

What you need to know

Open-source CLI coding agent (OpenClaude) that runs cloud APIs, gateways, and local models with the same tools/agents/workflow as Claude Code; built from source, requires Node >=22 and Bun. An independent community project, not affiliated with Anthropic.

Install

cd openclaude-main && bun install
bun run build
npm install -g .
openclaude

Usage

  • Run /provider inside OpenClaude for guided interactive setup (credentials saved to .openclaude-profile.json)
  • Or env vars: CLAUDE_CODE_USE_OPENAI=1, OPENAI_API_KEY=..., OPENAI_MODEL=gpt-4o, then openclaude
  • openclaude --continue / --resume <session-id> / --resume <session-id> --fork-session
  • openclaude --bg "fix failing tests"; openclaude ps / logs <name> / kill <name> for background sessions

Key features

  • 20+ providers: OpenAI-compatible endpoints (OpenRouter, DeepSeek, Groq, Mistral, LM Studio), Ollama (local, no key), Gemini, GitHub Models (/onboard-github), Codex OAuth, Bedrock/Vertex/Foundry, Z.AI GLM, Fireworks, Cloudflare Workers AI, and more
  • Full toolset: Bash, read/write/edit, grep, glob, agents, tasks, MCP, slash commands; streaming, vision (where provider supports), repo map (PageRank, /repomap), per-agent provider/model routing
  • Bundled VS Code extension (launch integration, Control Center, in-editor chat); headless gRPC bidirectional server for CI and custom UIs
  • Background sessions as plain local child processes (no daemon); WebSearch via DuckDuckGo free by default with optional FIRECRAWL_API_KEY
  • Ollama integration talks native chat API with 32768-token window per request so same-session history isn't trimmed

Best for

Developers who want a Claude-Code-style CLI agent but prefer non-Anthropic models (OpenAI, local Ollama, OpenRouter, GitHub Models, etc.) with the same workflow.

Caveats

  • Not affiliated with, endorsed by, or sponsored by Anthropic; 'Claude'/'Claude Code' are Anthropic trademarks; derived Claude Code code remains Anthropic's (MIT for modifications)
  • Requires Node >=22 (enforced by engines.node) and Bun; built from source, no prebuilt binaries
  • Does NOT read ~/.claude, project .claude/ dirs, or CLAUDE_CONFIG_DIR — owns ~/.openclaude/ and ~/.openclaude.json; migrate by copying only files you wrote
  • Anthropic-only features don't exist on every backend; tool quality tracks model quality (small local models struggle with long multi-step tool loops); some providers cap output below CLI defaults
  • Project .env files are not auto-loaded (use --provider-env-file .env); ripgrep must be installed system-wide
Platforms: Windows · macOS · LinuxClients: VS Code

Reviewed 2026-08-07

Topics

agentic-aiaiai-agentai-codingai-coding-agentai-coding-agentsai-coding-assistantanthropicclaudeclaude-codeclicoding-agentgeminigemini-aigemini-clillmmcpmodel-context-protocolopenrouter
View on GitHub ↗
Stars
569★
Forks
81
Language
TypeScript
License
NOASSERTION
Created
2026-07-26
Last push
2026-07-26