SuperAPIAI Directory

opencode-rust

github.com · AI coding

opencode-rust is a Rust implementation of OpenCode, providing three interfaces—CLI, TUI, and HTTP server—for a local AI coding agent. It supports session management, tool execution, MCP, LSP, and a TypeScript plugin bridge, with no container runtime required. Install via npm, Homebrew, or install.sh; requires Node 18+ and provider keys.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

opencode-rust is a Rust rewrite of OpenCode, positioned as an open-source AI coding agent that provides three usage interfaces—CLI, TUI, and HTTP server—for running an AI agent locally, without requiring a container runtime such as Docker.

Main capabilities include: creating, continuing, forking, importing/exporting, and parent-child linking of sessions; unified registration of 22 built-in tools and live MCP tools; path-scoped permission control (the last matching rule takes effect); multi-provider routing, reasoning effort control, and streaming tool calls; TypeScript plugin bridge, MCP stdio/HTTP, and LSP extensions; using SQLite to store sessions, messages, and parts. It includes two built-in agents: build (full-permission development by default) and plan (read-only analysis), switchable via Tab, and additional agents can be defined in the configuration file.

Usage: installation is supported via npm (Linux, macOS, Windows), Homebrew (macOS and Linux), and install.sh. npm installation uses precompiled binary packages, automatically selected by platform; Homebrew builds from source, and the first installation pulls the Rust toolchain; install.sh fingerprints .rs files and the Cargo manifest, skipping rebuilds when the code is unchanged. After installation, use it via the opr command, but opr behaves slightly differently depending on the installation method: under npm it is a dispatch script, while under Homebrew and install.sh it is the engine binary itself. Running requires Node 18+, because the plugin bridge and MCP server startup depend on Node child processes. Provider keys must be configured before the first run.

Use cases: local AI-assisted coding, code analysis and exploration, integrating agent capabilities via the HTTP server, and extending agent functionality with MCP tools.

Limitations: run mode has not yet been verified end-to-end on a real paid provider; free OpenRouter models reject tool mode, and paid models return 402 when out of quota. The project uses the MIT license and is not affiliated with the OpenCode team.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools