Skip to content

OpenCode

A terminal-based AI coding assistant written in Go; the project is archived and has moved to Crush.

Stars
13.8k
Forks
3.2k
Licence
MIT
Language
Go
Last update
1.1 years ago
Type
CLI

This repository is archived and no longer maintained.

What it is

OpenCode is a command-line application that gives you an AI assistant inside your terminal. It has a text-based interface where you chat with AI models about coding tasks, and the assistant can run commands, search files, and modify code. The repository is archived and its README says development continued under the name Crush, so new users should look there instead.

  • Ask the assistant to debug an error message from your project
  • Have the assistant search files and propose or make code changes
  • Run a single prompt non-interactively from a script
  • Keep multiple conversation sessions and return to them later

Great for

  • Developers who want an AI coding helper inside a terminal rather than a browser or IDE
  • People who already have API keys for one of the supported model providers
  • Those who want to compare or switch between several AI model providers

Not ideal for

  • Anyone who needs an actively maintained tool: the repository is archived and its last push was 2025-09-18
  • Production use: the README says the project is in early development and not ready for production
  • People who do not want an AI agent to run commands and edit files on their machine

How to get it

  1. 1

    Install with a package manager

    You'll need: Homebrew, AUR helper, or Go toolchain, depending on install method

    Install with Homebrew (macOS and Linux)

    brew install opencode-ai/tap/opencode

    Install with Go

    go install github.com/opencode-ai/opencode@latest
  2. 2

    Run it

    • Set an API key for a supported provider, such as ANTHROPIC_API_KEY or OPENAI_API_KEY
    • Run opencode in the directory of your project
    • Type a request into the terminal interface
  3. 3

    Get the most out of it

    • Create a .opencode.json config file to choose models and providers per agent
    • Enable or disable auto compact through the autoCompact setting
    • Configure LSP support for code intelligence, for example with gopls for Go
    • Add MCP servers through the mcpServers config section
    • Use opencode -d to start with debug logging when troubleshooting

Downloads

Strengths

  • Supports many AI providers, including OpenAI, Anthropic, Google Gemini, and AWS Bedrock
  • Stores conversations and sessions locally in a SQLite database
  • Includes an auto compact feature that summarizes long conversations near the model's context limit

Trade-offs

  • Archived, so it no longer receives updates; the README points to Crush for ongoing work
  • README labels it early development with features that may change or break
  • Requires your own API keys or subscriptions for the model providers

How it compares

ProjectStarsTypeLevelUpdatedBest for
opencode (this)13.8kCLIbeginner1.1 years agoDevelopers who want an AI coding helper inside a terminal rather than a browser or IDE
oh-my-pi37.5kCLIintermediate4 days agoDevelopers who want an AI agent working inside a terminal on their own codebase
repomix29.1kCLIbeginner5 days agoDevelopers who want to ask an AI assistant questions about a whole project
jcode21.4kCLIintermediate4 days agoDevelopers who want several AI coding agents working on one repo at the same time
opencodex18.2kDev toolintermediate4 days agoDevelopers who already use Codex or Claude Code and want to try other model providers
edict17kAI model / agentadvanced1 months agoDevelopers already running OpenClaw who want a multi-agent workflow with visible task history

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.