opencode  by sst

CLI tool for AI-assisted coding in the terminal

created 3 months ago
15,642 stars

Top 3.1% on sourcepulse

GitHubView on GitHub
Project Summary

OpenCode is a Go-based CLI application that provides a terminal-based AI assistant for developers. It offers an interactive TUI for coding assistance, debugging, and task automation, supporting multiple AI providers and offering features like session management, tool integration, and LSP support.

How It Works

OpenCode leverages the Bubble Tea framework for its TUI, enabling a rich terminal experience. It integrates with various AI providers (OpenAI, Anthropic, Google Gemini, AWS Bedrock, Groq, Azure OpenAI, OpenRouter) via API keys. The assistant can execute shell commands, interact with files, and utilize LSP for code intelligence. Custom commands and Model Context Protocol (MCP) allow for extended functionality and integration with external tools.

Quick Start & Requirements

  • Install: curl -fsSL https://opencode.ai/install | bash (or via Homebrew: brew install sst/tap/opencode, or Go: go install github.com/sst/opencode@latest)
  • Prerequisites: Go 1.24.0+ for building from source. API keys for desired AI providers.
  • Configuration: Via JSON files (~/.opencode.json, ~/.config/opencode/.opencode.json, ./.opencode.json) or environment variables.
  • Docs: https://opencode.ai/

Highlighted Details

  • Supports a wide range of AI models from multiple providers.
  • Features a Vim-like editor and external editor support.
  • Integrates with Language Server Protocol (LSP) for code intelligence (diagnostics currently exposed to AI).
  • Implements Model Context Protocol (MCP) for external tool integration.
  • Offers extensive customization for themes and shell configuration.

Maintenance & Community

  • Acknowledges contributions from @isaacphi and @adamdottv.
  • Open to contributions via pull requests.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

  • The project is in "Early Development" and not production-ready, with potential for feature changes or incompleteness.
  • While LSP integration is present, only diagnostics are currently exposed to the AI assistant.
Health Check
Last commit

20 hours ago

Responsiveness

Inactive

Pull Requests (30d)
284
Issues (30d)
580
Star History
16,408 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
5 more.

LibreChat by danny-avila

0.8%
29k
Enhanced ChatGPT clone for self-hosting
created 2 years ago
updated 1 day ago
Feedback? Help us improve.