OpenCode

OpenCode is an open-source AI coding agent developed by Anomaly that operates across terminal environments, desktop applications, and IDE extensions. It functions as an interactive developer assistant capable of reading codebases, executing terminal workflows, and orchestrating multi-file code modifications with integrated language intelligence. In day-to-day workflows, OpenCode connects to over 75 LLM providers via Models.dev, local model runtimes, or direct integrations like Claude, GPT, and Gemini. Developers can leverage existing subscriptions by authenticating directly with GitHub Copilot or ChatGPT Plus/Pro accounts, or utilize free models and OpenCode Zen—a curated tier of benchmarked models optimized specifically for agentic coding tasks. The agent executes within the terminal or standalone desktop interface, allowing users to spawn concurrent agents across project workspaces. OpenCode differentiates itself through automatic Language Server Protocol (LSP) integration, dynamically loading the appropriate LSPs to provide the underlying LLM with precise structural code navigation and type awareness. It also supports native multi-session orchestration on a single project, shareable session links for collaborative debugging, and a privacy-focused architecture that does not store proprietary code or workspace context. OpenCode is fully open source and free to install, supporting standard package managers across macOS, Linux, and Windows, alongside enterprise configurations for air-gapped or sensitive environments.

Tags: ai agent, cli, code assistant, coding agent, developer tools, OpenSource

Visit OpenCode

Key features

  • Automated LSP Integration — Automatically discovers and boots relevant Language Server Protocols to feed precise type definitions and symbol context to the model. - Multi-Session Orchestration — Spawns and manages multiple agents concurrently within the same repository to work on separate tasks in parallel. - Flexible Model & Provider Routing — Connects to 75+ LLM providers via Models.dev, local runtimes, or direct providers including Claude, GPT, Gemini, and OpenCode Zen. - Existing Subscription Authentication — Allows direct sign-in with GitHub Copilot or ChatGPT Plus/Pro accounts to reuse active AI subscriptions. - Shareable Session URLs — Generates shareable links to terminal and agent sessions for code review, documentation, or team debugging. - Multi-Interface Support — Available as a CLI/terminal tool, desktop application with tabbed workspaces across macOS, Windows, and Linux, and IDE extensions. - Privacy-First Data Architecture — Operates without caching or storing user source code and workspace context on external servers.

Use cases

Use Case: Parallel Feature Development and Refactoring A developer working on a large monorepo needs to refactor legacy database utilities while simultaneously writing unit tests for a new API endpoint. Using OpenCode's multi-session capabilities, the developer initializes two parallel agents in the same repository workspace, assigning one to handle test coverage while the other analyzes and updates database schemas.

Use Case: Zero-Config Type-Safe Refactoring via LSP When performing structural refactoring across complex TypeScript or Go codebases, OpenCode automatically activates the project's native LSPs. The model utilizes real-time diagnostics, symbol references, and type definitions supplied by the LSP to ensure modifications resolve compilation and type errors before finalizing diffs.

Use Case: Collaborative Session Debugging An engineer encounters a tricky edge case during an autonomous agent troubleshooting run in the terminal. The developer generates a shareable session link from OpenCode, sending the execution trace and prompt context to a teammate to inspect the agent's reasoning steps and diff outputs.

Who it is for

OpenCode is designed for software engineers, DevOps practitioners, and development teams who want an open-source terminal or desktop agent that integrates directly with existing subscriptions like Copilot or ChatGPT Plus. It is particularly well-suited for developers requiring LSP-grade context awareness and zero external code retention. It is less suited for non-technical users seeking graphical no-code app builders.

Install guide

Installation Install OpenCode using the official install script or your package manager of choice: bash # Via Shell Script curl -fsSL https://opencode.ai/install | bash # Via Homebrew (macOS/Linux) brew install opencode # Via npm or Bun npm install -g opencode-ai # or bun add -g opencode-ai

First Run 1. Launch OpenCode in your project root: bash cd /path/to/your/project opencode 2. Select your preferred model provider. You can log in using GitHub to use your existing Copilot subscription, authenticate with OpenAI for ChatGPT Plus/Pro access, supply custom API keys, or connect to local models. 3. Verify LSP initialization in the console output when OpenCode indexes the workspace.

Example Session Prompt OpenCode to diagnose and fix a failing test suite using integrated LSP diagnostics: bash opencode "Run tests with pytest, inspect failures using LSP references in auth/service.py, and update the token validation logic."

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • Plandex — Plandex is an open-source terminal-based AI coding agent designed to handle complex, multi-file engineering tasks in large codebases. Created by…
  • OpenHands — OpenHands (formerly OpenDevin) is an open-source autonomous AI software development agent and orchestration platform. It provides an extensible runtime environment…
  • Subtask — Subtask is an open-source CLI agent harness and orchestration tool developed by zippoxer in Go. It is built to coordinate…
  • pi-reflect — pi-reflect is an open-source agent harness and self-improvement extension for pi coding agents, developed by jo-inc. It inspects agent session…
  • EchoCoding — EchoCoding is an open-source agent harness and audio-augmented developer tooling layer created by launsion-boop. Designed to run alongside AI coding…
  • OSOP Agent Rules — OSOP Agent Rules is an open-source orchestration harness and rule repository developed by Archie0125 (osop.ai) designed to standardize agent behavior,…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories