Opencode
2 min read
OpenCode
OpenCode is an open-source AI coding agent available as a terminal interface (TUI), desktop app, or IDE extension. It is designed to act as a senior developer pair programmer, capable of planning, coding, and fixing issues directly in your codebase.
Key Features
- Interface: Runs primarily in the terminal with a rich TUI, but also supports IDEs and a "Zen" mode.
- Modes:
- Plan Mode: The agent analyzes your request and proposes a detailed plan without modifying code. You can iterate on this plan before approval.
- Build Mode: The agent executes the plan, writing code, running commands, and fixing errors.
- Configuration: Highly customizable via
opencode.jsonor the/configcommand. You can configure:- Providers: Connect to any LLM provider (Anthropic, OpenAI, etc.).
- Tools: Enable or disable specific capabilities.
- Themes: Customize the look and feel.
- Commands:
/init: Initialize a project and create anAGENTS.mdfile to help the agent understand your codebase./connect: secure authentication with providers./undo//redo: Revert or re-apply agent changes.
Usage
- Install:
npm install -g opencode-aior viacurl. - Run: Navigate to your project and type
opencode. - Interact:
- Ask questions about your codebase (
@to mention files). - Request features or refactors.
- Use Plan Mode (Tab key) for complex tasks to agree on a strategy first.
- Ask questions about your codebase (