vakandi / opencode-rust
git clone https://github.com/vakandi/opencode-rust.git
v0.1.5 · 4d ago
The open source AI coding agent, in Rust. CLI, TUI and HTTP server for local AI agents — no Docker required.
—
stars, 24h
+73
stars, 7 days · #695
+73
stars, 30 days · #3,082
73
★ total · +73% this week
1
forks · 0 open issues
Star history starts 2026-10-20; the chart appears after the second daily snapshot.
LanguageRust
LicenseMIT
Created2026-10-13 (7d ago)
Last push4d ago
Watchers0
OwnerUser
GitHub topics
Links
- GitHub: github.com/vakandi/opencode-rust
- Homepage: https://vakandi.github.io/opencode-rust/
- Releases · Issues · Hacker News mentions
README excerpt
opencode-rust The open source AI coding agent, in Rust. A Rust implementation of OpenCode — CLI, TUI and HTTP server for local AI agents. Sessions, tool execution, MCP, LSP and a TypeScript plugin bridge, with no container runtime. --- ## Installation Three supported surfaces. They install the same engine under the same `opr` command, but they are **not** interchangeable — `opr` is a dispatcher in some and the engine binary itself in others. ### npm — Linux, macOS, Windows [code] The launcher is a Node script, which is what makes Windows work at all — `install.sh` writes a bash `case` statement that Windows cannot execute. Install never compiles. Prebuilt binaries arrive as separate packages, one per platform, and npm pulls only the one your machine needs: - `opencode-rust-darwin-arm64` · `opencode-rust-darwin-x64` - `opencode-rust-linux-x64-gnu` · `opencode-rust-linux-arm64-gnu` · `opencode-rust-linux-x64-musl` - `opencode-rust-win32-x64-msvc` If no binary matches your platform the installer prints the alternatives and exits cleanly, rather than failing your install or forcing a Rust toolchain on you. Building from source is always an explicit choice. ### Homebrew — macOS and Linux [code] Installs `opr` and nothing else. This formula never writes a binary named `opencode` into your Homebrew prefix, so it cannot shadow the upstream opencode CLI if you have it installed. The formula builds from source, so the first install pulls a Rust toolchain as a build dependency — which is exactly the work npm refuses to do during `npm install`. ### From source [code] `install.sh` fingerprints every `.rs` file plus `Cargo.toml`/`Cargo.lock`. Re-running it when the code is unchanged skips the rebuild entirely; `--force` rebuilds regardless. [code] > **`opr` behaves slightly differently per install.** Through npm it is a dispatching script, so > `opr --some-flag` becomes `opencode tui --some-flag`. Through Homebrew and `install.sh` it is the > engine binary itself (Homebrew installs it under the name `opr`), so the same command becomes > `--some-flag` and is rejected — name the subcommand instead (`opr tui --some-flag`). ### Named-agent shortcuts `install.sh` also installs one shortcut per agent, each running a single prompt as that agent: [code] No prompt given → usage on stderr and exit 2. ### Requirements Node 18+. The engine spawns Node subprocesses for its plugin bridge and launches MCP servers through `npx`, so Node is required regardless of how it was installed. A provider key is needed before the first run: [code] --- ## Why Rust OpenCode's engine was TypeScript. It held conversation history in RAM, re-derived the full tool schema set on every LLM step, and kept per-directory instance state (MCP servers, LSP servers, plugins) unbounded and never evicted. A Docker runtime existed to *contain* that. It wasn't enough. Five teams of five agents pinned the CPU at 99% on a MacBook Pro M5 and the machine became unusable. That was the limit, n