opencode-ai/opencode

A powerful AI coding agent. Built for the terminal.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 26 minutes ago
Added to GitGenius on August 9th, 2026
Created on March 16th, 2025
Open Issues & Pull Requests: 158 (+0)
GitHub issues: Enabled
Number of forks: 1,767
Total Stargazers: 13,626 (+0)
Total Subscribers: 56 (+0)

Issue Activity (beta)

Open issues: 116
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 422 days
Stale 30+ days: 116
Stale 90+ days: 116

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (4)
  • bug (2)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 3.0 hours
Mean response time: 2.2 days
90th percentile: 6.1 days
Tracked items: 148

Most active contributors

Sign in to see contributor activity.

Detailed Description

OpenCode is a terminal-based AI coding agent written in Go that integrates multiple large language models into a single command-line interface. The project is now archived, with development continuing under the name Crush, developed by the original author and the Charm team. The repository serves as a historical record of the original OpenCode implementation.

The application provides a Terminal User Interface built with Bubble Tea, enabling developers to interact with AI models directly from their terminal for coding assistance, debugging, and other development tasks. OpenCode supports an extensive range of AI providers including OpenAI, Anthropic Claude, Google Gemini, AWS Bedrock, Groq, Azure OpenAI, and OpenRouter. The supported models span multiple families such as GPT-4 variants, Claude 3 and 4 series, Gemini 2.0 and 2.5 versions, and specialized models like O1, O3, and Llama variants.

The core functionality includes session management capabilities that allow users to save and manage multiple conversation sessions with persistent storage through SQLite databases. OpenCode features an integrated vim-like editor for composing messages and supports opening external editors for more complex text composition. The application includes Language Server Protocol integration for enhanced code intelligence and file change tracking to visualize modifications during sessions.

A distinctive feature is the auto-compact functionality that monitors token usage during conversations and automatically triggers summarization when usage approaches ninety-five percent of the model's context window limit. This prevents context overflow errors by creating new sessions with summaries, allowing users to continue work without losing conversation history. The AI assistant has access to various tools including file operations, command execution, file searching, and code modification capabilities.

OpenCode operates in both interactive and non-interactive modes. The interactive mode provides a full Terminal User Interface with extensive keyboard shortcuts for navigation and control. Non-interactive mode allows users to pass prompts directly as command-line arguments, making the tool suitable for scripting and automation workflows. The non-interactive mode supports multiple output formats including plain text and JSON, with optional spinner animation that can be disabled for automated workflows.

Configuration is flexible, supporting multiple locations including the home directory, XDG config directories, and local project directories. Users can configure the application through JSON configuration files or environment variables for API keys and service endpoints. The application allows customization of the shell used for command execution and supports named arguments for creating powerful custom commands with multiple placeholders.

The keyboard shortcut system is comprehensive, with global shortcuts for application control, chat-specific shortcuts for message management, editor shortcuts for text composition, and specialized shortcuts for dialogs and permission management. Users can switch between sessions, select different AI models, manage permissions for AI operations, and view application logs through dedicated keyboard-driven interfaces.

The project was in early development at the time of archival, with features subject to change. The repository includes detailed documentation of supported models, configuration options, installation methods including Homebrew and AUR packages, and comprehensive usage instructions for both interactive and non-interactive modes.

opencode
by
opencode-aiopencode-ai/opencode

Repository Details

Fetching additional details & charts...