OpenCode

AI-powered coding tool that works in your terminal

Quick summary

OpenCode is an AI-powered coding tool that runs directly in your terminal. It helps with code generation, explanation, review, and refactoring -- understanding full project context to provide relevant assistance.

Common tasks

Basic Usage

opencode

Basic Usage

opencode "describe this code"

Basic Usage

opencode "explain this function"

Basic Usage

opencode --help

What is it?

OpenCode is an AI-powered coding tool that runs directly in your terminal. It helps with code generation, explanation, review, and refactoring -- understanding full project context to provide relevant assistance.

Basic Usage

Start interactive session:

$opencode

Ask about code:

$opencode "describe this code"
$opencode "explain this function"

Help:

$opencode --help

Tips

Works best when run from the project root -- it can understand the full project context.
Try opencode "explain this function" on selected code for quick understanding of unfamiliar codebases.