Overview
OpenClaude is an open-source coding-agent CLI that runs anywhere and uses anything. It talks to OpenAI-compatible APIs, Gemini (API key or Vertex AI), GitHub Models, Codex and Codex OAuth, Ollama, and a long list of partner gateways, while keeping a single terminal-first workflow: prompts, bash and file tools, grep and glob, subagents, tasks, MCP, slash commands, and streaming output. A bundled VS Code extension adds launch integration.
Key Features
- One CLI across cloud APIs and local model backends, with guided provider setup and saved profiles via
/provider - Coding-agent toolset in one place: bash, file tools, grep/glob, agents, tasks, MCP, and web tools with pluggable search backends
- Session management: resume or fork conversations by session ID, a
/sessionsmanager, and deep search across conversation contents with a background model - Background sessions: run long non-interactive prompts detached (
--bg), thenps,logs, andkillthem - Fastest paths for common setups: OpenAI via two env vars, local Ollama, GitHub Models onboarding via
/onboard-github - Its own configuration namespace (
~/.openclaude) — no Claude Code install or.claudedirectory required
Use Cases
- Running a terminal coding agent against whichever provider you already pay for or run locally
- Switching between cloud models and local Ollama models without changing tools or workflows
- Kicking off long refactors or test-fix loops as detached background sessions
- Reusing MCP servers, custom slash commands, and subagent workflows across providers
Technical Details
- TypeScript CLI distributed as
@twigpine/openclaudeon npm (Node 24+ required); a Bun toolchain is only needed for source builds, and the repo is also mirrored to an alternate git host - Provider abstraction covers 20+ backends: any OpenAI-compatible
/v1server, Gemini API key and Vertex AI ADC, GitHub Models OAuth onboarding, Codex OAuth (browser sign-in with secure credential storage), and Ollama;/providersaves profiles in.openclaude-profile.jsonand per-provider env vars are mapped automatically - Background sessions run as local child processes with no daemon or network service; state and logs live under
~/.openclaude/bg-sessions/, with explicit terminal-state recording (exited/failed/killed/stale) - Conversation forking (
--fork-session) branches the transcript into a new session ID without touching the working tree; deep session search sends bounded transcript excerpts (first/last 50 messages, 2,000 chars) to a background model - Keeps its own config in
~/.openclaudeand~/.openclaude.jsonand deliberately does not read~/.claudeorCLAUDE_CONFIG_DIR
