Appearance
๐ OpenCode โ
OpenCode is an open-source terminal-based AI coding agent built by AnomalyCo. It's model-agnostic, supports 75+ LLM providers, and runs directly in your terminal with full file-system access - a free, community-driven alternative to Claude Code.
๐ Tool Datasheet โ
| Metric | Details |
|---|---|
| Tool Name | OpenCode |
| Category | Open-Source Terminal Coding Agent |
| Purpose | Terminal-based AI pair-programming with full codebase access, shell integration, and MCP support. |
| Developer | AnomalyCo |
| License | Open Source |
| Install | npm install -g opencode-ai or `curl -fsSL https://opencode.ai/install |
| Website | opencode.ai |
| GitHub | github.com/anomalyco/opencode |
๐ ๏ธ Capabilities โ
- Codebase Understanding: Indexes project structure, understands dependencies, finds relevant files for any task.
- Full File Operations: Reads, edits, creates, and deletes files. Applies patches. Refactors across multiple files.
- Shell Integration: Runs build commands, test suites, linters. Parses error output. Debugs failures autonomously.
- Git Workflow: Stages changes, writes commit messages, creates branches, pushes - full version control from terminal.
- Model-Agnostic: 75+ providers. Use Claude Opus for complex architecture, GPT-5.6 for broad generation, DeepSeek for cost-sensitive work, or local models via Ollama.
- MCP Support: Connect to any MCP server for extended tool capabilities.
- AGENTS.md Convention: Hierarchical project instructions that guide agent behavior - define coding standards, test requirements, and repo conventions.
๐งญ Step-by-Step Setup โ
1. Install โ
bash
npm install -g opencode-aiOr use the curl installer:
bash
curl -fsSL https://opencode.ai/install | bash2. Start a Session โ
Navigate to your project and run:
bash
cd ~/your-project
opencodeOpenCode reads your project files, indexes the codebase, and waits for instructions in its terminal TUI.
3. Your First Task โ
Inside the session, describe what you want:
text
Add input validation to the user registration endpoint in src/api/users.tsOpenCode searches the codebase, finds the relevant files, proposes edits, applies them, and can run tests to verify.
4. Multi-Session Work โ
OpenCode supports multiple concurrent sessions. Run opencode in different terminal tabs for different projects or tasks.
๐ก Sample Workflows โ
- Code Migration: "Migrate all Express routes in src/routes/ to FastAPI, update type annotations, and verify endpoints with pytest"
- Bug Hunt: "Find all instances of potential null pointer dereferences in the auth module and add guard clauses"
- Documentation: "Generate JSDoc comments for all exported functions in src/lib/ - follow the existing style in src/lib/crypto.ts"