whatisgithub

What is opencode?

opencode-ai/opencode — explained in plain English

Analysis updated 2026-06-24

12,530GoAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A now-archived terminal AI coding assistant in Go that lets you chat with AI models, run shell commands, and edit project files, all from the terminal. The project continues as Crush under the Charm team.

Mindmap

mindmap
  root((OpenCode))
    What it does
      Terminal AI assistant
      Code chat and editing
    AI providers
      OpenAI and Claude
      Gemini Groq and more
    Features
      Shell command execution
      Session history SQLite
      Auto-compact
    Status
      Archived
      Continues as Crush
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run an AI coding assistant entirely inside the terminal without a browser or separate app.

USE CASE 2

Switch between multiple AI providers (OpenAI, Claude, Gemini, Groq) using a single tool and one API key per service.

USE CASE 3

Resume a previous coding session by reloading conversation history saved locally in a SQLite database.

What is it built with?

GoSQLiteBubble Tea

How does it compare?

opencode-ai/opencodeibm/saramaheroiclabs/nakama
Stars12,53012,48112,597
LanguageGoGoGo
Setup difficultymoderatemoderatemoderate
Complexity3/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires at least one AI provider API key (OpenAI, Anthropic, Google, Groq, etc.) before first use.

No license is stated in the explanation, check the repository for terms.

So what is it?

OpenCode was a terminal-based AI coding assistant written in Go. It provided a text-based interface inside the terminal for asking AI models to help write, debug, or explain code. This repository has since been archived, and the project continues under the name Crush, developed by the original author in collaboration with the Charm team. While it was active, OpenCode supported multiple AI providers from a single tool: OpenAI, Anthropic Claude, Google Gemini, Groq, AWS Bedrock, Azure OpenAI, and OpenRouter. A developer would configure an API key for whichever service they had access to and then start chatting. The AI could not only respond to questions but also take direct actions: running shell commands, reading and modifying files in the current project, and tracking what changed during a session. The interface was built using a Go library called Bubble Tea, which makes it possible to build structured, navigable screens inside a terminal. A vim-style text editor was integrated for composing longer messages, and conversation history was saved to a local SQLite database so sessions could be resumed later. One notable feature was auto-compact: when a conversation grew long enough to approach the AI model'''s memory limit, the tool would automatically summarize the session and continue from that summary, avoiding errors caused by exceeding the context window. Language Server Protocol support was also included, which let the editor offer the same kind of code-awareness features found in full IDEs, such as understanding types and references in the code being edited. Development of OpenCode has moved to the Crush repository under the charmbracelet organization on GitHub.

Copy-paste prompts

Prompt 1
I'm setting up the OpenCode terminal AI assistant with an Anthropic Claude API key. Walk me through the configuration steps and how to start my first coding session.
Prompt 2
OpenCode's auto-compact feature summarized my long session. How do I review what was summarized and continue the conversation from that point?
Prompt 3
Show me how OpenCode uses Language Server Protocol to provide code-aware suggestions, what types of hints and references does it expose inside the terminal editor?

Frequently asked questions

What is opencode?

A now-archived terminal AI coding assistant in Go that lets you chat with AI models, run shell commands, and edit project files, all from the terminal. The project continues as Crush under the Charm team.

What language is opencode written in?

Mainly Go. The stack also includes Go, SQLite, Bubble Tea.

What license does opencode use?

No license is stated in the explanation, check the repository for terms.

How hard is opencode to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is opencode for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.