# OpenCode — Open-Source AI Coding Agent for Terminal > Open-source AI coding agent with 140K+ stars. TUI-first design, LSP integration, works with Claude, OpenAI, Google, or local models. Two built-in agents: build and plan. MIT license. ## Install Save as a script file and run: ## Quick Use Install OpenCode (pick one method): ```bash # Quick install curl -fsSL https://opencode.ai/install | bash # Or via npm npm i -g opencode-ai@latest # Or via Homebrew brew install anomalyco/tap/opencode ``` Then run in any project directory: ```bash opencode ``` --- ## Intro OpenCode is the open-source AI coding agent for the terminal with 140,000+ GitHub stars — one of the fastest-growing developer tools in 2025-2026. It features a TUI-first design with built-in LSP support, two agents (build for full dev access, plan for read-only analysis), and works with any LLM provider including Claude, OpenAI, Google, and local models. Best for developers who want an alternative to Claude Code or Codex that is fully open-source and provider-agnostic. Setup time: under 1 minute. Compare with: [Codex CLI vs Claude Code guide](https://tokrepo.com/en/guide/codex-cli-vs-claude-code) on TokRepo. --- ## OpenCode — The Open-Source AI Coding Agent ### Why OpenCode - **Not locked to any provider** — use Claude, GPT-4, Gemini, Llama, or any model - **Terminal-native** — beautiful TUI that developers actually want to use - **LSP integration** — real language understanding, not just text matching - **Client/server architecture** — run remotely on beefy machines, connect from anywhere - **Desktop app** — available for macOS, Windows, and Linux ### Two Built-in Agents | Agent | Access | Use Case | |-------|--------|----------| | **build** | Full read/write/execute | Implement features, fix bugs, run tests | | **plan** | Read-only analysis | Understand code, plan architecture, review | ### Installation Methods ```bash # Quick install (recommended) curl -fsSL https://opencode.ai/install | bash # npm npm i -g opencode-ai@latest # Homebrew (macOS) brew install anomalyco/tap/opencode # Scoop (Windows) scoop bucket add anomalyco https://github.com/anomalyco/scoop-bucket.git scoop install opencode # Pacman (Arch Linux) pacman -S opencode ``` ### Key Features - **TUI-first design** — purpose-built terminal interface - **Language Server Protocol** — real code understanding - **Custom commands** — extend with your own slash commands - **GitHub Actions bot** — run as CI/CD agent - **Multi-model support** — 75+ LLM providers - **Client/server mode** — remote development support - **MIT licensed** — truly open source ### FAQ **Q: What is OpenCode?** A: OpenCode is a free, open-source AI coding agent that runs in your terminal. It supports 75+ LLM providers and features two built-in agents (build and plan) with native LSP integration. **Q: How does OpenCode compare to Claude Code?** A: OpenCode is fully open-source (MIT) and provider-agnostic, while Claude Code is Anthropic-specific. OpenCode has a TUI-first design with client/server architecture for remote development. **Q: Is OpenCode free?** A: Yes, OpenCode is free and open-source under the MIT license. You only pay for the LLM API you choose to use. --- ## Source & Thanks > Created by [anomalyco](https://github.com/anomalyco). Licensed under MIT. > > [OpenCode](https://github.com/anomalyco/opencode) — ⭐ 140,000+ Thanks to the Anomaly team for building a truly open alternative for AI-assisted coding. --- ## 快速使用 安装 OpenCode: ```bash curl -fsSL https://opencode.ai/install | bash ``` 然后在项目目录运行: ```bash opencode ``` --- ## 简介 OpenCode 是开源 AI 编码 Agent,GitHub 140,000+ star,2025-2026 年增长最快的开发者工具之一。TUI 优先设计,内置 LSP 支持,两个 Agent(build 全权限开发、plan 只读分析),支持 Claude、OpenAI、Google 及本地模型。适合想要完全开源且不绑定供应商的 AI 编码工具的开发者。 --- ## OpenCode — 开源 AI 编码 Agent ### 核心优势 - **不绑定供应商** — Claude、GPT-4、Gemini、Llama 等任意模型 - **终端原生** — 精心设计的 TUI 界面 - **LSP 集成** — 真正的语言理解 - **客户端/服务器架构** — 远程开发支持 - **桌面应用** — macOS、Windows、Linux ### 两个内置 Agent | Agent | 权限 | 用途 | |-------|------|------| | **build** | 完全读写执行 | 开发功能、修 bug、跑测试 | | **plan** | 只读分析 | 理解代码、规划架构、审查 | ### FAQ **Q: OpenCode 是什么?** A: 免费开源的终端 AI 编码 Agent,支持 75+ LLM 供应商,MIT 许可。 **Q: 和 Claude Code 比怎么样?** A: OpenCode 完全开源且不绑定供应商,Claude Code 只能用 Anthropic 模型。OpenCode 有 TUI 设计和远程开发能力。 --- ## 来源与感谢 > Created by [anomalyco](https://github.com/anomalyco). Licensed under MIT. > > [OpenCode](https://github.com/anomalyco/opencode) — ⭐ 140,000+ --- Source: https://tokrepo.com/en/workflows/4374a5c2-33ce-11f1-9bc6-00163e2b0d79 Author: AI Open Source