Open-source AI coding agent supporting 75+ LLM providers with terminal/desktop/IDE interfaces, Plan/Build dual-agent modes, designed for code comprehension, feature development, and code modification.
OpenCode is an open-source AI coding agent supporting 75+ LLM providers (including local models), available as Terminal UI (TUI), desktop application, and IDE extension.
Core Features#
- Dual-agent mode: Build agent with full access for development work, Plan agent in read-only mode for analysis and code exploration
- LSP support: Automatically loads language servers suitable for LLM
- Multi-session: Launch multiple agents in parallel on the same project
- Share links: Share any session link for reference or debugging
- Privacy-first: Does not store user code or context data
- Multi-provider support: GitHub Copilot and ChatGPT Plus/Pro account login integration
Installation#
# Quick install (recommended)
curl -fsSL https://opencode.ai/install | bash
# Node.js package managers
npm i -g opencode-ai@latest
bun i -g opencode-ai@latest
# Homebrew (macOS/Linux)
brew install anomalyco/tap/opencode
# Docker
docker run -it --rm ghcr.io/anomalyco/opencode
Quick Start#
cd /path/to/project
opencode
/init
/connect # Configure AI provider
Key Operations#
Tabkey: Switch Plan/Build modes@key: Fuzzy search project files/undo: Undo changes/share: Create share link
Architecture#
- Client/server architecture with remote control support
- Monorepo structure using Bun workspaces
- Core packages: CLI tool, Tauri desktop app, Web app, JavaScript SDK, Slack integration
Tech Stack#
- Runtime: Bun 1.3.9
- Frontend: SolidJS
- Build: Vite 7.1.4
- UI: Tailwind CSS 4.1.11
- AI SDK: ai 5.0.124
- Backend: Hono 4.10.7
- Database: Drizzle ORM
- Auth: OpenAuth
Development Guidelines#
- Avoid
try/catchandanytypes - Prefer Bun APIs (e.g.,
Bun.file()) - Rely on type inference, avoid explicit type annotations
- Use snake_case for database field names
- Test real implementations, no mocks
Configuration#
AGENTS.md: Project root, helps OpenCode understand project structure and coding patterns, should be committed to Git
Use Cases#
| Scenario | Description |
|---|---|
| Codebase Exploration | Explain complex codebases, analyze unfamiliar modules |
| Feature Development | Plan mode for implementation plans, Build mode for execution |
| Code Refactoring | Modify functions, add logic, reuse across routes |
| Team Collaboration | Share session links, debugging and code review |
| Privacy-sensitive Environments | Local model support, no code data storage |
Project Status#
- Latest Version: v1.2.14
- Releases: 724
- Commits: 9,709+
- Contributors: 773+
- License: MIT