# OpenClaude

> Open-source terminal coding-agent CLI that works with OpenAI-compatible APIs, Gemini, GitHub Models, Codex, Ollama and other cloud or local model backends.

Stars: 34.2k · Language: TypeScript · Categories: AI

- Repository: https://github.com/Twigpine/openclaude
- Website: https://openclaude.twigpine.com
- Page: https://www.trmn.sh/tools/openclaude

## Install

- npm: `npm install -g @gitlawb/openclaude@latest`
- AUR (Arch Linux): `paru -S openclaude`

## Overview

OpenClaude is an open-source coding-agent CLI that runs in the terminal and connects to multiple cloud and local model providers. Supported backends include OpenAI-compatible APIs, Gemini, GitHub Models, Codex OAuth, Codex, Ollama, and Atomic Chat. It keeps a single workflow of prompts, tools, agents, MCP, slash commands, and streaming output regardless of which provider is in use.

Inside the session, `/provider` runs guided provider setup and saves profiles and credentials to `.openclaude-profile.json`, and `/onboard-github` handles GitHub Models onboarding. Provider settings can also come from exported environment variables (for example `CLAUDE_CODE_USE_OPENAI`, `OPENAI_API_KEY`, `OPENAI_MODEL`) or from `openclaude --provider-env-file .env`. Project `.env` files are not loaded automatically. The agent toolset covers bash, file tools, grep, glob, agents, tasks, MCP, and web tools. A bundled VS Code extension provides launch integration and theme support.

Session handling includes `--resume <session-id>` and `--continue` to pick up earlier conversations, plus `--fork-session` to branch history into a new session ID (conversation branching only, with no filesystem isolation or git worktree). Background sessions run as local child processes with `openclaude --bg "prompt"`, optionally named with `--name`, and are managed with `openclaude ps`, `openclaude logs <name> -f`, and `openclaude kill <name>`. No daemon is started, and logs are stored under `~/.openclaude/bg-sessions/`.

OpenClaude keeps its configuration separate in `~/.openclaude` and `~/.openclaude.json`, and does not read `~/.claude` or require Claude Code. It needs Node.js 22 or later (Bun is only needed for source builds) and ripgrep installed on the system. It is aimed at developers who want a terminal coding agent that can switch between hosted and local models.

### Installation

```bash
# via npm
npm install -g @gitlawb/openclaude@latest
```

```bash
# via AUR (Arch Linux)
paru -S openclaude
```

## Alternatives

- [Continue](https://www.trmn.sh/tools/continue.md): Open-source coding agent distributed as a CLI, VS Code extension, and JetBrains plugin. Repository is read-only after the final 2.0.0 release. (TypeScript, 36.4k stars)
- [oh-my-pi](https://www.trmn.sh/tools/oh-my-pi.md): Terminal coding agent (fork of Pi) with LSP and DAP debugger integration, subagents, Python/Bun execution, and in-process native tools. Supports 60+ providers. (TypeScript, 37.0k stars)
- [Qwen Code](https://www.trmn.sh/tools/qwen-code.md): Open-source AI coding agent that runs in the terminal, with IDE plugins, desktop app, SDKs, and multi-provider model support (OpenAI, Anthropic, Gemini, Qwen). (TypeScript, 28.8k stars)
- [Kilo Code](https://www.trmn.sh/tools/kilocode.md): Open source AI coding agent for VS Code, JetBrains, and the terminal, with 500+ selectable models at provider pricing and an autonomous mode for CI/CD. (TypeScript, 27.8k stars)
- [OmO](https://www.trmn.sh/tools/oh-my-openagent.md): Terminal coding agent run through the omo command. It runs on senpi, a fork of pi, and can split a job into parallel agents across multiple models. (TypeScript, 70.4k stars)

---

Canonical: https://www.trmn.sh/tools/openclaude
