What is OpenCode?
OpenCode is a Go-based CLI application that brings AI assistance directly to your terminal. It provides a beautiful TUI (Terminal User Interface) for interacting with various AI models to help with coding tasks, debugging, refactoring, and more. Built with Bubble Tea, OpenCode offers a smooth, responsive terminal experience that feels native to your development workflow.Key features
Multiple AI providers
Support for OpenAI, Anthropic Claude, Google Gemini, AWS Bedrock, Groq, Azure OpenAI, GitHub Copilot, and OpenRouter
Interactive TUI
Beautiful terminal interface with vim-like editor, syntax highlighting, and smooth animations
Session management
Save and manage multiple conversation sessions with automatic context summarization
Tool integration
AI can execute commands, search files, modify code, and integrate with LSP for code intelligence
Custom commands
Create reusable commands with named arguments for common workflows
MCP protocol
Extend capabilities through Model Context Protocol with external tools and services
Quick links
Installation
Get started with OpenCode using our install script, Homebrew, AUR, or Go
Quickstart guide
Run your first AI assistant session in minutes
Configuration
Configure AI providers, LSP, MCP servers, and customize your setup
Features
Explore powerful features like custom commands, file tracking, and auto-compact
How it works
- Start OpenCode in any project directory
- Select your AI model from multiple providers (Claude, GPT-4, Gemini, etc.)
- Chat with AI using natural language to get coding help
- AI uses tools to read files, execute commands, and modify code
- Review and approve changes with a built-in permission system
- Track changes across your session with automatic file history
Architecture
OpenCode is built with a modular architecture written in Go:- cmd: Command-line interface using Cobra
- internal/app: Core application services
- internal/config: Configuration management
- internal/db: SQLite database operations and migrations
- internal/llm: LLM providers and tools integration
- internal/tui: Terminal UI components built with Bubble Tea
- internal/lsp: Language Server Protocol integration
- internal/session: Session and message management
Non-interactive mode
OpenCode also supports non-interactive prompt mode for scripting and automation:Community
OpenCode has been archived and continued as Crush by the original author and the Charm team.
- Press
Ctrl+Pin OpenCode to list available actions - Report issues at github.com/opencode-ai/opencode
- Watch the YouTube overview
Next steps
Install OpenCode
Follow the installation guide to get OpenCode on your system