Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

openclaude

> AI 编程
Open source

runs anywhere. uses anything

30.5K stars0 likes2 views
WebsiteGitHub

About

runs anywhere. uses anything

OpenClaude is an open-source coding-agent CLI for cloud and local model providers.

Use OpenAI-compatible APIs, Gemini, GitHub Models, Codex OAuth, Codex, Ollama, Atomic Chat, and other supported backends while keeping one terminal-first workflow: prompts, tools, agents, MCP, slash commands, and streaming output. OpenClaude is also mirrored to GitLawb: gitlawb.com/node/repos/z6MkqDnb/openclaude

Quick Start | Setup Guides | Providers | Development | VS Code Extension | Partners | Community

Partners

  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://bankr.bot">
    
  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://atomic.chat/">
    
  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://mimo.mi.com">
    
  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://www.atlascloud.ai/">
    
  </a>
</td>
GitLawb Bankr.bot Atomic Chat Xiaomi MiMo Atlas Cloud
    </picture>
  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://novita.ai/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="docs/assets/novita-logo-dark.svg">
      
    </picture>
  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://www.apismart.ai">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="docs/assets/apismart-logo-dark.png">
      
    </picture>
  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://concentrate.ai/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="docs/assets/concentrate-logo-dark.svg">
      
    </picture>
  </a>
</td>
<td align="center" width="150" height="80">
  <a href="https://exa.ai/">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="docs/assets/exa-logo-dark.svg">
      
    </picture>
  </a>
</td>
AI/ML API Novita AI ApiSmart Concentrate Exa

Why OpenClaude

  • One CLI across cloud APIs and local model backends — no per-provider tooling
  • Guided provider setup and saved profiles with /provider
  • Coding-agent workflows in one place: bash, file tools, grep, glob, agents, tasks, MCP, and web tools
  • A bundled VS Code extension for launch integration and theme support
  • A pixel-art hero companion who fires an arrow every time you press Enter (really — see Meet your buddy)

Quick Start

Install

OpenClaude requires Node.js >=22.0.0 for npm installs and runtime. Bun is only needed for source builds and local development.

bash
npm install -g @gitlawb/openclaude@latest

If you're on Arch Linux, you can install OpenClaude from the community-maintained AUR package:

bash
paru -S openclaude

If the install later reports ripgrep not found, install ripgrep system-wide and confirm rg --version works in the same terminal before starting OpenClaude.

Verify / troubleshoot installed version:

bash
openclaude --version
npm view @gitlawb/openclaude dist-tags
npm install -g @gitlawb/openclaude@latest

Start

bash
openclaude

Inside OpenClaude:

  • run /provider for guided provider setup and saved profiles
  • run /onboard-github for GitHub Models onboarding

Note: OpenClaude does not automatically load project .env files. We recommend using the /provider command for setup, which saves provider profiles and credentials in .openclaude-profile.json. If you prefer environment variables, export them explicitly or run openclaude --provider-env-file .env for provider/setup variables. Export runtime/debug knobs from your shell or launcher.

Resume or fork a conversation

Resume an existing conversation by session ID, or continue the most recent conversation in the current directory:

bash
openclaude --resume <session-id>
openclaude --continue

Add --fork-session to branch the conversation history into a new session ID instead of reusing the original transcript:

bash
openclaude --resume <session-id> --fork-session
openclaude --continue --fork-session

Forking is conversation branching only. It does not create filesystem isolation, copy your working tree, or create a git worktree branch.

Background sessions

Run long non-interactive prompts detached from the current terminal:

bash
openclaude --bg "fix failing tests"
openclaude --bg --name auth-refactor "refactor auth middleware"
openclaude ps
openclaude logs auth-refactor
openclaude logs auth-refactor -f
openclaude kill auth-refactor

Background sessions are local child processes. OpenClaude does not start a daemon or network service, and permission/provider/model/settings flags are passed to the child process the same way they are for a foreground --print run. Session metadata and logs are stored under the resolved OpenClaude config directory, usually ~/.openclaude/bg-sessions/; OPENCLAUDE_CONFIG_DIR can point OpenClaude somewhere else. CLAUDE_CONFIG_DIR is ignored for OpenClaude background-session storage. Session names can be reused after older sessions reach a terminal state; use the session ID to inspect older logs with the same name. A naturally finished session is recorded as exited when its process returns zero and failed when it returns nonzero or handles a termination signal. stale remains the conservative result when the process disappears without an observed outcome; an explicit successful openclaude kill is recorded as killed, and killed takes precedence over a natural exited or failed outcome for the same process. Terminal outcomes are stored separately under bg-sessions/terminal/; deleting that directory makes finished sessions fall back to liveness-derived status. OpenClaude does not infer POSIX signal names on Windows. Unobservable force termination, host crashes, and power loss remain stale on every platform.

openclaude attach <id-or-name> currently reports the matching session and points to openclaude logs <id> -f; full terminal reattach is not implemented for local background sessions yet.

OpenClaude config cutover

OpenClaude stores its own config under ~/.openclaude and ~/.openclaude.json by default. It does not read ~/.claude, project .claude/ directories, or CLAUDE_CONFIG_DIR; new users can start with an empty OpenClaude config and do not need Claude Code installed.

If you previously used OpenClaude with .claude paths, migrate intentionally: copy only the settings, commands, agents, skills, scheduled tasks, or other files you personally created for OpenClaude into the matching .openclaude location. Do not blanket-copy .claude, and do not copy Claude Code credentials or auth files. For provider authentication, prefer running OpenClaude's provider setup again or exporting provider-specific environment variables.

Fastest OpenAI setup

macOS / Linux:

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

openclaude

Windows PowerShell:

powershell
$env:CLAUDE_CODE_USE_OPENAI="1"
$env:OPENAI_API_KEY="sk-your-key-here"
$env:OPENAI_MODEL="gpt-4o"

openclaude

Fastest local Ollama setup

macOS / Linux:

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

openclaude

Windows PowerShell:

powershell
$env:CLAUDE_CODE_USE_OPENAI="1"
$env:OPENAI_BASE_URL="http://localhost:11434/v1"
$env:OPENAI_MODEL="qwen2.5-coder:7b"

openclaude

For Ollama, OpenClaude uses Ollama's native chat API and requests a 32768-token context window on each chat request so same-session history is not silently truncated by Ollama's OpenAI-compatible shim. Set OPENCLAUDE_OLLAMA_NUM_CTX or OLLAMA_CONTEXT_LENGTH if you need a different request-level context size. See Advanced Setup for verification with ollama ps.

Setup Guides

Beginner-friendly guides:

  • Non-Technical Setup
  • Windows Quick Start
  • macOS / Linux Quick Start

Advanced and source-build guides:

  • Advanced Setup
  • Smart Auto-Routing
  • Agent Routing and Step Limits
  • Headless gRPC Server
  • Repo Map (codebase intelligence)
  • Skills
  • Android Install

Supported Providers

Provider Setup Path Notes
OpenAI-compatible /provider or env vars Works with OpenAI, OpenRouter, DeepSeek, Groq, Mistral, LM Studio, and other compatible /v1 servers
Z.AI GLM Coding Plan /provider or OpenAI-compatible env vars Uses OPENAI_API_KEY at https://api.z.ai/api/coding/paas/v4, defaults to glm-5.2, and offers the vision-capable glm-5.3-flash option
AI/ML API /provider or AIMLAPI_API_KEY (setup guide) Uses https://api.aimlapi.com/v1, auto-detects the OpenAI-compatible route from AIMLAPI_API_KEY, sends OpenClaude attribution headers, and discovers chat-capable models from the public /models catalog
Concentrate /provider or CONCENTRATE_API_KEY Unified OpenAI-compatible gateway at https://api.concentrate.ai/v1; defaults to deepseek-v4-flash and auto-discovers the chat model catalog
LLMTR /provider or OpenAI-compatible env vars Multi-model gateway at https://llmtr.com/v1; /provider and --provider llmtr default to deepseek/deepseek-v4-flash, while raw env setup must set OPENAI_BASE_URL=https://llmtr.com/v1 and OPENAI_MODEL; accepts LLMTR_API_KEY or OPENAI_API_KEY after the route is selected and discovers tool-capable Chat Completions models from the public catalog
Command Code /provider or OpenAI-compatible env vars Hybrid OpenAI-compatible gateway at https://api.commandcode.ai/provider/v1; /provider and --provider commandcode default to deepseek/deepseek-v4-flash, while raw env setup must set OPENAI_BASE_URL=https://api.commandcode.ai/provider/v1 and OPENAI_MODEL; requires CMD_API_KEY, COMMANDCODE_API_KEY, or the official COMMAND_CODE_API_KEY after the route is selected and discovers Chat Completions models from the public catalog. Claude models are unsupported by

Issues· 67 open

View all issuesOpen on GitHub
  • #2242

    Generalize store stripping for OpenAI-compat routes with Anthropic backends (stop the per-host whack-a-mole)

    Updated Sep 28, 2026
  • #2240

    Add Requesty as a first-class OpenAI-compatible gateway

    Updated Sep 28, 2026
  • #2105

    Feature request: ACP stdio server for JetBrains AI Chat and CLion 2026.2

    Updated Sep 26, 2026
  • #1971

    Feature: Parity on bypass auto-accept tier — --dangerously-skip-permissions, sandbox-gate relaxation, and defaultMode persistence (Shift+Tab toggle already exists)

    Updated Sep 24, 2026
  • #2238

    Prompt window formatting issue when using /color

    Updated Sep 23, 2026
  • #2223

    [Feature Request] Add /sessions and /resume commands with session deletion

    enhancementUpdated Sep 19, 2026
  • #2231

    Set custom query time out

    Updated Sep 16, 2026
  • #2230

    Subagents cannot request interactive tool permissions from the parent session

    Updated Sep 16, 2026
  • #2212

    Add API Route as a first-class OpenAI-compatible gateway

    new: provider/gatewayUpdated Sep 13, 2026
  • #2198

    Image pasting broken on Linux in versions after 0.21.0

    Updated Sep 11, 2026

> Tags

TypeScriptaiai-agentai-toolscli

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.