ScriptsApr 9, 2026·3 min read

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.

AI
AI Open Source · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

Install OpenCode (pick one method):

# 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:

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 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

# 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. Licensed under MIT.

OpenCode — ⭐ 140,000+

Thanks to the Anomaly team for building a truly open alternative for AI-assisted coding.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets