explaingit

anomalyco/opencode

🔥 Hot155,799TypeScriptAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

Open-source AI coding agent you run locally in your terminal, works with any AI provider, and gives you two modes: full-access build agent and read-only plan agent for exploring code.

Mindmap

mindmap
  root((repo))
    What it does
      AI coding agent
      Terminal interface
      Provider agnostic
      Two agent modes
    Key features
      Build agent
      Plan agent
      LSP support
      Client-server arch
    Use cases
      Real development work
      Explore codebases
      Plan changes safely
    Tech stack
      TypeScript
      Node.js
      LSP protocol
    Installation
      npm install
      Homebrew
      One-line script
    Audience
      Developers
      AI enthusiasts

Things people build with this

USE CASE 1

Write and modify code in your terminal with AI assistance while keeping full control over which provider you use.

USE CASE 2

Explore an unfamiliar codebase safely using the read-only plan agent before making any changes.

USE CASE 3

Run complex multi-step coding tasks and searches by invoking the internal general subagent with an at-mention.

Tech stack

TypeScriptNode.jsLSP

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Node.js runtime and API key configuration for an AI provider (OpenAI, Anthropic, etc.).

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

OpenCode is described in its README as an open-source AI coding agent. The basic problem it tackles is helping developers do real coding work alongside an AI assistant directly from the terminal, while keeping the whole tool open and not tied to any single AI provider. Instead of relying on a closed product, you install OpenCode locally and let it explore, plan, and modify your codebase with you. OpenCode includes two built-in agents you can switch between with the Tab key. The first is build, the default full-access agent intended for actual development work. The second is plan, a read-only agent that denies file edits by default and asks permission before running shell commands; the README recommends it for exploring unfamiliar codebases or thinking through changes. There is also an internal general subagent that can be invoked with an at-mention for complex searches and multistep tasks. The architecture is client and server, which the README says allows OpenCode to run on your computer while you drive it remotely from a mobile app, with the terminal interface being one of several possible clients. There is opt-in LSP support for richer code awareness. Installation is offered via a one-line install script, npm and other JavaScript package managers, brew, scoop, choco, pacman, AUR, mise, and Nix, plus a beta desktop app for macOS, Windows, and Linux. You would use OpenCode when you want an AI coding agent inside your terminal that you can point at any provider you choose, including Claude, OpenAI, Google, OpenCode Zen, or local models. The README's FAQ frames it as similar in capability to Claude Code but fully open source and provider-agnostic. It is written primarily in TypeScript. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Help me set up OpenCode locally and connect it to Claude as my AI provider so I can start coding in the terminal.
Prompt 2
I want to explore a large codebase I'm unfamiliar with, show me how to use OpenCode's plan agent to read and understand the code without accidentally modifying anything.
Prompt 3
How do I switch between OpenCode's build and plan agents, and what's the difference in what each one can do?
Prompt 4
Set up OpenCode to work with a local language model instead of a cloud provider, and explain how the client-server architecture lets me use it from my phone.
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.