opencode  by opencode-ai

CLI tool for terminal-based AI coding assistance

Created 10 months ago
9,954 stars

Top 5.1% on SourcePulse

GitHubView on GitHub
Project Summary

OpenCode is a Go-based terminal AI assistant designed to enhance developer productivity by integrating AI-powered coding assistance directly into the command line. It offers a rich TUI experience for interacting with various LLM providers, managing conversations, and executing code-related tasks.

How It Works

OpenCode leverages a modular architecture with a TUI built using Bubble Tea. It supports multiple AI providers (OpenAI, Anthropic, Gemini, etc.) and features session management, tool integration (command execution, file manipulation), a Vim-like editor, LSP integration for code intelligence, and file change tracking. Its Model Context Protocol (MCP) allows for external tool integration via stdio or SSE.

Quick Start & Requirements

  • Install: curl -fsSL https://opencode.ai/install | bash or brew install opencode-ai/tap/opencode
  • Prerequisites: Go 1.24.0+ for building from source. API keys for desired AI providers are required.
  • Setup: Installation via script or Homebrew is quick. Configuration involves setting API keys via environment variables or a JSON file.
  • Docs: https://opencode.ai/

Highlighted Details

  • Supports a wide array of AI models from OpenAI, Anthropic, Google Gemini, AWS Bedrock, Groq, and Azure OpenAI.
  • Integrates Language Server Protocol (LSP) for code intelligence, currently exposing diagnostics to the AI.
  • Features a robust set of built-in tools for file operations, shell commands, and code searching (e.g., glob, grep, write, bash, sourcegraph).
  • Implements the Model Context Protocol (MCP) for extensible tool integration.

Maintenance & Community

  • Key contributors include @isaacphi and @adamdottv.
  • Contributions are welcome via pull requests.

Licensing & Compatibility

  • Licensed under the MIT License, permitting commercial use and closed-source linking.

Limitations & Caveats

This project is in early development and not production-ready. Features may change or be incomplete. While LSP integration supports the full protocol, only diagnostics are currently exposed to the AI assistant.

Health Check
Last Commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
569 stars in the last 30 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), Simon Willison Simon Willison(Coauthor of Django), and
1 more.

mistral-vibe by mistralai

4.1%
3k
Conversational CLI coding agent for project interaction
Created 1 month ago
Updated 3 days ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Tobi Lutke Tobi Lutke(Cofounder of Shopify), and
33 more.

opencode by anomalyco

26.5%
60k
CLI tool for AI-assisted coding in the terminal
Created 8 months ago
Updated 15 hours ago
Feedback? Help us improve.