$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.

opencode-terminal — 80x24
~$ opencode init my-project
Project initialized successfully!
my-project(main)$ opencode assist "Refactor the login component"
Analyzing project structure...
I found src/components/Login.tsx. Based on your request, I suggest:
  • Extract validation logic to a custom hook
  • Implement proper error handling
  • Add loading state indicators
my-project$

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 | sh
2Configure your API key
$export ANTHROPIC_API_KEY=your-api-key
3Start coding with AI
$opencode