Back to Learn
⌨️NEWIntermediateAI Coding

OpenCode CLI: Open-Source Claude Code Alternative

30 min read

OpenCode CLI lets you run powerful coding agents locally without tying yourself to a single vendor.

Installation

npm install -g opencode-cli
opencode init

Connect Ollama

Point OpenCode at your local Ollama instance for fully offline workflows — ideal for sensitive codebases.

Compare with alternatives

ToolLocal LLMCopilot subOpen source
OpenCodeYesYesYes
Bolt.newPartialNoPartial

Choose based on privacy requirements and whether you need browser-based or terminal-native flows.