Imagine this: you sit down at your terminal, type opencode "Add user authentication with JWT", and watch as an AI agent reads your entire codebase, plans the implementation, writes the code, runs the tests, and creates a perfect pull request â all while you review the results.
This is not a demo video. This is OpenCode.
OpenCode is the fastest-growing open-source AI coding agent on GitHub, with over 120,000 stars. Built in Go, it runs directly in your terminal, understands your entire project, and can edit files, execute commands, manage git, and deploy code â all through natural language conversation.
This tutorial will take you from zero to productive in about 10 minutes.
There are many AI coding tools out there. What sets OpenCode apart?
It’s a true agent, not a chatbot. Traditional AI assistants wait for you to ask a question, then reply. OpenCode actively analyzes problems, formulates plans, executes changes, and verifies results â like having a senior engineer working alongside you who takes initiative.
It lives in your terminal. No context-switching between browser tabs and your editor. OpenCode is the AI that meets you where you already work.
Provider-agnostic. OpenCode supports 75+ LLM providers â Anthropic, OpenAI, Google Gemini, Groq, and even local models through Ollama. You can switch providers mid-session with a single command.
Truly open source. Licensed under MIT, self-hostable, no data leaves your infrastructure unless you choose.
Note: The official Homebrew formula (brew install opencode) is maintained by the Homebrew team and updated less frequently. The OpenCode tap above always has the latest release.
This scans your project structure, identifies key files and patterns, and creates an AGENTS.md file in your project root. This file teaches OpenCode about your codebase â its architecture, conventions, and style.
Commit your AGENTS.md to git! Your whole team will benefit from OpenCode understanding the project context.
OpenCode connects to your project’s Language Server Protocol (LSP) servers, giving it real-time code intelligence â go-to-definition, find references, live diagnostics â for languages like TypeScript, Python, Go, and Rust.
OpenCode supports the Model Context Protocol, letting the AI connect to external tools like databases, APIs, and file systems. Configure MCP servers in your opencode.json project config.
Start with small tasks. Let OpenCode prove itself on a focused issue before handing it a major refactor.
Review the plan first. Use Plan mode (Tab) on complex tasks â the plan reveals whether OpenCode understood the problem before it starts writing code.
Commit before asking for changes. OpenCode works with your current state. A clean working tree helps it reason about changes clearly.
Customize with AGENTS.md. The /init generated file is a starting point. Edit it to add project-specific conventions, API documentation, and architectural decisions.
Use /model to optimize costs. Use a powerful model for complex reasoning and a cheaper model for simple tasks, switching mid-session.
OpenCode represents a new category of development tool â the terminal-native AI coding agent. It’s open source, provider-agnostic, and deeply integrated into the workflows developers already use.
In 10 minutes, you can go from nothing to having an AI agent that understands your codebase, writes production code, runs your tests, and manages your git workflow. The barrier to entry is remarkably low: one install command, one /init, and you’re productive.
The project is evolving rapidly with an active open-source community. Whether you’re a solo developer looking to accelerate your workflow or a team evaluating AI coding tools, OpenCode is worth your attention.