$npx opencode@latest
Terminal-Native AI Coding Assistant
An open-source CLI tool that brings AI-powered coding assistance directly to your terminal. Write better code, faster.
Why OpenCode?
Terminal Native
Works directly in your terminal. No browser, no IDE plugin needed.
Multiple Models
Support for Claude, GPT-4, Gemini, and local models via Ollama.
Agent Mode
Let AI handle complex tasks autonomously with file editing and command execution.
Open Source
Fully open source. Inspect, modify, and contribute to the codebase.
Quick Start
1Install OpenCode
$
curl -fsSL https://opencode.ai/install.sh | sh2Configure your API key
$
export ANTHROPIC_API_KEY=your-api-key3Start coding with AI
$
opencodeNeed more help? Check out our detailed getting started guide