The OpenCode native CLI, opencode-native, is a Rust client for OpenCode,
built from its oc-rust branch. Each build is an unsigned
prerelease for Linux x64, Linux arm64, macOS arm64,
and Windows x64, for testers.
Watch as video (MP4, 1080p).
The client alone, against a TypeScript server that is already running (median of 8 runs):
opencode 2.2.7 |
opencode-native 0.0.0-rs-2 |
|
|---|---|---|
| time to first frame | 118 ms | 5.8 ms |
| client peak memory, 20 prompts | 319 MB | 44 MB |
| client CPU time, 20 prompts | 3.92 s | 0.17 s |
The client starts its own server (--standalone):
opencode 2.2.7 |
opencode-native 0.0.0-rs-2 |
|
|---|---|---|
| time to first frame | 314 ms | 219 ms |
| client + server peak memory | 604 MB | 410 MB |
| client + server CPU time, 20 prompts | 6.93 s | 2.79 s |
opencode-native replaces only the client: the TypeScript server holds 374 of its 410 MB. The method, raw data, and
machine (AMD Ryzen 7 9800X3D, Linux) are in docs/benchmark.md.
opencode-native uses OpenTUI's Rust bindings, which drive the same native library as the TypeScript CLI's
@opentui/core. So the screens, keys, and themes match, and a parity harness compares the two clients. It talks to
the same TypeScript server: it finds or starts the background service, --server <url> attaches to one, and
--standalone starts a private one. Sessions and cli.json are shared.
What differs:
- Server plugins run in the TypeScript server and work as before.
- TypeScript TUI plugins do not run;
/pluginslists them as skipped. - Native TUI plugins (
.so,.dylib) load instead: see the quick start. opencode-native upgradedoes not update a preview build; re-run the install script.- There is no
/restart; useopencode-native service restart. - HTTPS trusts the system's root certificates;
NODE_EXTRA_CA_CERTSis ignored. - 14 languages are syntax-highlighted; others show as plain text.
The full list is in
parity/deviations.
curl -fsSL https://raw.githubusercontent.com/simonklee/opencode-native-preview/main/install.sh | bashThis checks the newest build against SHA256SUMS and installs it to ~/.local/bin/opencode-native (or
$OPENCODE_NATIVE_INSTALL_DIR). Run it again to update. Linux builds need glibc 2.35 or newer. To verify an archive's
build attestation: gh attestation verify opencode-native-<version>-<target>.tar.gz --repo simonklee/opencode-native-preview.
On Debian and Ubuntu, download the .deb from the latest release
and run sudo apt install ./opencode-native_*.deb.
Install the TypeScript CLI, 2.2.7 or newer, on PATH (or set OPENCODE_TS_BIN to it): npm i -g @opencode/cli.
To keep the client's tabs apart from opencode's, set OPENCODE_TUI_CHANNEL=native-preview.
The binary has only an ad-hoc signature. If you downloaded an archive with a browser, run
xattr -d com.apple.quarantine opencode-native.
Download opencode-native-<version>-x86_64-pc-windows-msvc.zip from the
latest release and extract it; keep opentui.dll next
to opencode-native.exe. If Windows blocks the download, run Unblock-File on the zip before extracting. Install the
TypeScript CLI with npm i -g @opencode/cli. Each build is tested on GitHub's Windows Server 2025 runner, with the TUI
on a pseudoconsole (ConPTY); no other terminal is tested.
Include the output of opencode-native --version and the end of ~/.local/share/opencode/log/opencode.log.
